Commit Graph

394 Commits

Author SHA1 Message Date
Hao Shen ac6e117676 fix compromise_occurrence_date None handling in pie revoke 2017-04-25 13:13:31 -07:00
Peter Hamilton 4617ae5280 Merge pull request #283 from vbnmmnbv/rename_compromise_occurrence_date
rename compromise_date to compromise_occurrence_date in revoke reques…
2017-04-21 15:52:04 -04:00
Hao Shen 8f16558b76 rename compromise_date to compromise_occurrence_date 2017-04-21 12:24:48 -07:00
Peter Hamilton 901f2d8097 Merge pull request #282 from vbnmmnbv/add_reset_mock
add missing reset_mock of logger in server revoke operation tests
2017-04-21 15:12:09 -04:00
Peter Hamilton a7c627d28f Merge pull request #274 from vbnmmnbv/destroy_state_permission_server
Add state check for Destroy operation.
2017-04-21 15:06:29 -04:00
Hao Shen 1c565b37f3 add missing reset_mock of logger in server revoke operation tests 2017-04-21 09:50:29 -07:00
Hao Shen 3897455469 Add state check for Destroy operation. 2017-04-21 09:32:26 -07:00
Peter Hamilton f7e0e55955 Merge pull request #276 from vbnmmnbv/create_crypo_usage_mask
Add crypto_usage_masks argument to pie Create operation
2017-04-21 11:01:55 -04:00
Peter Hamilton fda5e32fa0 Merge pull request #271 from vbnmmnbv/revoke_server
Add initial Revoke operation support for server.
2017-04-21 10:31:09 -04:00
Hao Shen 74075d502c Add Revoke operation support for pie client 2017-04-20 10:19:10 -07:00
Hao Shen a2b7194c08 Add crypto_usage_masks argument to pie Create operation 2017-04-19 21:07:32 -07:00
Hao Shen 0229a83acf Add initial Revoke operation support for server.
See the TODO in _process_revoke for more info.
2017-04-19 15:27:51 -07:00
Peter Hamilton e26e0748af Merge pull request #280 from vbnmmnbv/api_activate_locate_mac
Add the missing locate/activate KmipClient abstractmethod definition
2017-04-19 18:07:56 -04:00
Peter Hamilton 5678c21903 Merge pull request #273 from vbnmmnbv/mac_state_permission_server
Add state/crypto usage mask checks for MAC operation
2017-04-19 18:02:46 -04:00
Hao Shen ec4dae707c Add the missing locate/activate KmipClient abstractmethod definition 2017-04-14 11:19:50 -07:00
Peter Hamilton fae811528b Fixing stringent uid value checks in the ProxyKmipClient
This change loosens the input requirements for ProxyKmipClient
operations that accept a secret UID. Operations like Get and
Destroy used to require a string value but are allowed in the
KMIP specification to take no value at all. This change updates
the ProxyKmipClient to properly reflect the specification. The
underlying KMIPProxy client is mostly unchanged.

Closes #261
2017-04-12 17:41:13 -04:00
Hao Shen a0673dc111 Add state/crypto usage mask checks for MAC operation 2017-04-11 18:16:54 -07:00
Peter Hamilton 1d2a337ee0 Update the server Query results to match current features
This change updates the server results returned by the Query
operation to match the current set of supported features. The tests
for Query have been updated to better reflect testing across KMIP
versions.
2017-04-11 16:43:43 -04:00
Peter Hamilton 28e1e809d1 Merge pull request #275 from vbnmmnbv/KmipOperationFailure
Modify KmipOperationFailure to expose status/reason/message attributes
2017-04-06 08:54:16 -04:00
Hao Shen 16d79283f2 Modify KmipOperationFailure to expose status/reason/message attributes 2017-04-04 11:36:05 -07:00
Hao Shen 5967b55148 Fixing stringent argument checks for MAC operation 2017-03-30 14:32:42 -07:00
Hao Shen eda50d657a fix activate uid none check 2017-03-29 20:23:06 -07:00
Hao Shen de1d9c5646 Add Activate operation support for pie client 2017-03-29 11:55:48 -07:00
Peter Hamilton 5fc2e26527 Merge pull request #259 from OpenKMIP/maint/cleanup-old-server-code
Removing deprecated server code and supporting infrastructure
2017-03-28 09:37:10 -04:00
Peter Hamilton cbcb5b97bf Merge pull request #263 from vbnmmnbv/locate_pie
Add Locate operation support for pie client
2017-02-15 10:40:15 -05:00
Hao Shen b8b2d43347 Add minimum Locate operation support for server.
Currently it will return all the existing managed objects with the restriction of operation
policy only. No other filterings.

Closes #258
2017-02-14 18:09:10 -08:00
Hao Shen f0934fd08a Add Locate operation support for pie client 2017-02-14 17:59:52 -08:00
Peter Hamilton c584ac0cb5 Removing deprecated server code and supporting infrastructure
This change removes the original KMIPServer implementation, along
with all supporting classes. The KmipServer implementation is the
only supported server implementation going forward.
2017-02-08 15:29:10 -05:00
Peter Hamilton d9cf4c148a Merge pull request #256 from vbnmmnbv/server
Add MAC operation support for server
2017-02-03 12:11:41 -05:00
Hao Shen ac1206082c Add MAC operation support for server 2017-02-02 13:25:22 -08:00
Peter Hamilton 7fca09fa75 Merge pull request #254 from vbnmmnbv/client
Add MAC operation support at client side
2017-02-02 13:09:51 -05:00
Hao Shen 2d45f33d43 Add MAC operation support for client 2017-01-31 14:48:19 -08:00
Peter Hamilton 84fe76e15d Merge pull request #255 from vbnmmnbv/payload
Add necessary objects/attributes and payloads for MAC operation
2017-01-31 11:11:54 -05:00
Hao Shen a2696b722f Add necessary objects/attributes and payloads for MAC operation 2017-01-30 14:50:40 -08:00
Peter Hamilton 4dbf6b8e79 Merge pull request #246 from OpenKMIP/maint/drop-support-for-python2.6
Remove support for Python2.6
2017-01-30 09:29:47 -05:00
Hao Shen e8b63eb9d3 Add MAC operation support in cryptography engine 2017-01-25 13:10:41 -08:00
Peter Hamilton 47898365ba Fixing the KMIPProxy CreateKeyPair demo script
This change fixes a bug with the CreateKeyPair demo script for the
KMIPProxy client. The key pair name was never included with the
create request due to variable name overuse. This change fixes the
variable names thereby fixing the demo script.

Fixes #249
2017-01-10 13:37:50 -05:00
Peter Hamilton c5ca3297f3 Remove support for Python2.6
This change removes PyKMIP support for Python2.6. The last release
of Python2.6 occurred in October 2013, over 3 years ago. It also
does not support security features needed to use PyKMIP according
to best practices. This change drops tox and TravisCI settings for
Python2.6 and updates setup to no longer categorize the library as
Python2.6 compliant. The README has been updated accordingly.

Closes #116
2017-01-09 14:53:25 -05:00
Peter Hamilton 57c703c52f Refactor access control enforcement in the server
This change restructures how access controls are enforced for
different server operations, pulling common code into a shared
method for reuse. The server unit tests have been updated to
reflect this change.
2017-01-09 10:34:14 -05:00
Peter Hamilton 1bd5366a62 Adding support for the InitialDate attribute
This change updates the server and managed object set to support
the InitialDate attribute. The InitialDate is set when the Create,
CreateKeyPair, and Register operations are invoked and can be
listed and retrieved with the GetAttributeList and GetAttributes
operations respectively. The server unit tests have been updated
to reflect these changes.
2017-01-08 12:07:22 -05:00
Peter Hamilton 089d126b04 Adding server support for the GetAttributeList operation
This change adds support for the GetAttributeList operation. The
user can specify the ID of a managed object and get back a list
containing the names of all attributes currently set on the object.
The user can also omit the ID and the server will default to using
the ID placeholder for the object ID. New server tests have been
added to cover this feature. The GetAttributeList payloads have
also been updated for consistency with other payloads, requiring
minor updates in other clients and unit tests.
2017-01-05 18:43:11 -05:00
Peter Hamilton 28209bd60a Fixes a bug with socket interrupt handling under Python3.5
This change fixes a bug introduced with the addition of Python3.5
support. In Python3.5, SIGINT is silently ignored for system calls
(e.g., socket.accept) if the SIGINT signal handler does not raise
an exception. This causes the server to delay shutdown when
receiving SIGINT until after a new connection has been made. This
change updates the server's SIGINT signal handler to raise the
correct exception and updates the error handling code while serving
connections to account for this change in SIGINT processing. This
allows the server to shutdown immediately upon receiving SIGINT.
The server unit tests are updated to account for this change.
2017-01-04 16:05:45 -05:00
Peter Hamilton bbc2d8e58a Merge pull request #238 from cfs-pure/master
Unit test fixes
2017-01-04 13:24:24 -05:00
Charles Stephens 5be11db648 Unit test fixes
Fix unittests for compatibility between Python 2 and 3.
2017-01-04 10:04:10 -08:00
Peter Hamilton 36f0583adf Fixes a mismapped polymorphic identity for X509Certificate objects
This change updates the polymorphic identity used by
X509Certificate objects. The original identity was already used by
the base Certificate object, causing sqlalchemy to raise a warning
when used. This change resolves the identity reassignment and
prevents the warning from being displayed.
2017-01-04 12:01:39 -05:00
Peter Hamilton 239ec7102d Fixes how open is mocked in the server test suite
This change updates how the built-in open function is mocked in
the PyKMIP server test suite. On some platforms the old approach
was insufficient. This change explicitly references the builtins
module for Python3+, removing the old module-based mock.
2017-01-04 11:29:30 -05:00
Peter Hamilton b1f73d811c Fixing a bug with multithreading support with the SQLite backend
This change fixes a bug that could occur when accessing the server
with multiple threads or processes. The SQLite backend by default
does not support multithreading. This change updates how the
SQLite backend is instantiated, preventing error generation when
using multiple clients simultaenously. The server unit test suite
has been updated to cover the change.
2016-12-17 14:57:38 -05:00
Peter Hamilton 0df3866837 PyKMIP - Release 0.6.0
This update includes new operations and features for the clients
and server, in addition to other minor updates and bug fixes:

* Add support for Python 3.5
* Add support for the State and OperationPolicyName attributes
* Add server support for the Activate and GetAttributes operations
* Add server support for certificate-based client authentication
* Add server support for object access control via operation policy
* Add server support for loading of user-defined operation policies
* Add client support for the GetAttributes operation
* Update clients to support operation policy names with objects
* Update ProxyKmipClient to support names when creating new objects
* Remove coveralls integration
* Fix bug with server termination on missing request credential
* Fix bug with closing the client while unconnected to a server
* Fix bug with default values overriding server conf file settings
* Fix bug with early server termination on bad client certificates
* Fix bug with deprecated usage of the bandit config file
* Fix bug with ProxyKmipClient registering unset object attributes
2016-12-14 14:55:58 -05:00
Peter Hamilton 065cc0cec1 Updating server to enable the Activate operation
This change updates the PyKMIP server to enable the Activate
operation. Server unit tests are updated to account for this
change.
2016-12-07 19:27:05 -05:00
Peter Hamilton 131addf967 Merge pull request #231 from OpenKMIP/bug/handle-missing-object-attribute
Updating the server to handle errors during attribute lookup
2016-12-07 19:25:21 -05:00
Peter Hamilton 9738c2ba7f Fixing a bug with attribute handling in ProxyKmipClient.register
This change fixes a bug in the ProxyKmipClient, specifically in
the register method. The client would create attributes for the
object to register, regardless if those attributes were set on
the object. This could cause attribute value overwrites, deleting
valid default values with empty values. This change adds checks
to ensure these attributes are not created with the request if
they are not set on the object. The client unit tests have been
updated to reflect this change.
2016-12-07 09:57:57 -05:00
Peter Hamilton e2841f1ee5 Updating the server to handle errors during attribute lookup
This change updates the server to better handle exceptions thrown
while looking up the value of different attributes on managed
objects. Some managed objects in PyKMIP don't currently support
attributes they are supposed to. This can cause lookup errors
when using GetAttributes. This change suppresses any exceptions
and simply returns None for the missing attribute value. The
server unit tests have been updated to account for this change.
2016-12-07 09:13:38 -05:00
Peter Hamilton fc0d95ebb9 Adding GetAttributes support to the PyKMIP clients
This change adds support for the GetAttributes operation to the
PyKMIP clients. Demo scripts showing how to use the new operation
will be included in a future update. Client test cases have been
added and updated to reflect the new operation.
2016-12-06 20:42:17 -05:00
Peter Hamilton c59cfeeef9 Adding server support for the GetAttributes operation
This change adds server support for the GetAttributes operation.
The user can specify an object ID and an attribute list to get
the values of the attributes listed from the specified object.
The user can also omit either argument; the server will default
to using the ID placeholder and all viable attributes respectively.
Only a subset of the standard attributes are supported right now.
New tests have been added to cover the new feature.

Closes #185
Closes #211
Closes #218
2016-12-06 20:24:29 -05:00
Peter Hamilton 264ef64e0b Merge pull request #226 from OpenKMIP/bug/fix-textstring-write-value
Removing TextString check to encode characters when writing bytes
2016-12-06 20:23:39 -05:00
Peter Hamilton 843df7d2b1 Removing TextString check to encode characters when writing bytes
This change removes extraneous code in the TextString primitive
that would conditionally encode the individual string characters
depending upon the version of Python being used. This code caused
errors when using Unicode strings in Python 2.7 and below.
2016-12-06 14:32:22 -05:00
Peter Hamilton 27140daa78 Updating the attribute value factory to support ObjectType values
This change updates the attribute value factory to allow for the
creation of ObjectType attributes with values provided by the
caller. Unit tests have been added to cover this change.
2016-12-06 14:15:16 -05:00
Jonathan Seawright 10030cd173 Fix pep8 errors 2016-12-05 13:29:09 -06:00
Jonathan Seawright 7b25780a4e Created test suite for `attribute_factory`
Resolves CR changes for #208
2016-12-05 13:14:22 -06:00
Jonathan Seawright 9ba479e4d3 Add optional 'name' argument to create and create_key_pair functions
The ProxyKmipClient now allows you to optionally provide a name
when performing a `Create` or a `Create Key Pair`. If not specified,
the name is excluded from the request.

 * For `create`, users specify `name`
 * For `create_key_pair`, users specify `private_name` and `public_name`

Resolves #208
2016-12-03 21:37:35 -06:00
Peter Hamilton 94aacc1897 Fixes premature server shutdown on receiving invalid certificate
This change fixes a bug with the server where the server would
prematurely shutdown upon receiving a client connection using an
invalid certificate. The server will now withstand bad client
connections. The impacted server unit tests have been updated to
reflect the bug fix.
2016-12-01 14:40:30 -05:00
Peter Hamilton 38e7635fc7 Fixes configuration settings override by default script values
This change fixes a bug with parameter handling when invoking
the server's main routine. The default values provided for the
parameters would override any configuration file settings if
the main routine was used to run the server. To fix this, the
default values were removed, requiring the user to explicitly
specify parameter values if they want them to override the
configuration settings. The parameter doc strings have been
updated to match these changes.

Fixes #217
2016-12-01 11:44:43 -05:00
Peter Hamilton 181b34b6cb Updating payload factories to reflect new KMIP operations
This change updates the payload factories, adding placeholder
support for operations added in KMIP 1.3. It also updates old
placeholders with now supported payloads. The corresponding
unit test suites have been updated to match the additions.
2016-11-29 15:42:05 -05:00
Peter Hamilton 381e072bb7 Updating the server to allow optional policy_path values
This change updates the server, updating how it processes config
values and allowing it to handle optional or ommitted policy_path
values. This fixes a bug where users could not leave the
policy_path config file unset, in addition to a bug that forced
users to use '/etc/pykmip/policies' as their policy directory.

Fixes #210
2016-11-28 13:49:19 -05:00
Peter Hamilton 0b69a0ac17 Adding payloads for the GetAttributes operation
This change adds the request and response payloads needed for the
GetAttributes operation. Test cases included.
2016-11-27 12:33:33 -05:00
Peter Hamilton b36c730f22 Adding string utilites to the Attribute object
This change adds str and repr utilities to the Attribute object. A
new test suite for Attribute object tests is included, however only
the tests for the string utilities are included with this patch.
The remaining Attribute tests will be implemented in a later patch.
2016-11-27 12:21:11 -05:00
Peter Hamilton a55310368f Updating the ApplicationSpecificInformation attribute
This change adds some utility methods, including equality operators
and string methods, to the ApplicationSpecificInformation attribute.
Unit tests covering the changes are included.
2016-11-27 11:23:11 -05:00
Peter Hamilton 23f6a05a54 Fixing minor pep8 whitespace error in test utilities 2016-11-17 15:09:21 -05:00
Peter Hamilton b7cc542d9a Adding server support for the Activate operation
This change adds support for the Activate operation to the server,
including additional server unit tests, a new IllegalOperation
exception, and updated state attribute support in Pie objects.

Fixes #186
2016-11-12 16:37:20 -05:00
Peter Hamilton aae1577e3c Fixing potential undefined variable error in client open
This change reorganizes some of the error handling code in the
client open routine, preventing the generation of an undefined
variable error. The net effect of the client open routine is
unchanged.

Fixes #199
2016-11-11 14:49:07 -05:00
Peter Hamilton 78f16e208a Fixing a client socket shutdown bug when unconnected
This change fixes a minor bug with the client shutdown routine,
where an error would get thrown when attempting to call shutdown
on an unconnected socket. This error is now caught and suppressed,
since the client is already shutting down. A new client unit test
is included to cover this change.
2016-11-11 12:51:39 -05:00
Peter Hamilton a9264e612f Merge pull request #198 from OpenKMIP/feat/add-operation-policy-loading
Adding dynamic operation policy loading to the KMIP server
2016-11-10 10:48:59 -05:00
Peter Hamilton 4a3769e113 Adding dynamic operation policy loading to the KMIP server
This change adds support for dynamic operation policy loading.
The server config file now supports a 'policy_path' option that
points to a filesystem directory. Each file in the directory
should contain a JSON policy object. The KMIP server will scan
this directory and attempt to load all valid policies it finds.
The results of this process will be logged.
2016-11-10 10:39:16 -05:00
Peter Hamilton 799891ea6b Merge pull request #197 from OpenKMIP/feat/add-object-ownership
Adding operation policy enforcement to the KMIP server engine
2016-10-20 12:28:27 -04:00
Peter Hamilton e0b0a5c7bf Adding operation policy enforcement to the KMIP server engine
This change adds enforcement of KMIP operation policies to the
server engine, specifically to the Get and Destroy operations.
Explicit object ownership is enforced as a result, with ownership
now a tracked internal server property of managed objects. Tests
for this new functionality are included.
2016-10-14 12:59:12 -04:00
Peter Hamilton 4d6ba8a964 Add server persistence for operation policy names
This change updates the KMIP engine to process and persist the
value of the operation policy name attribute when creating or
registering new managed objects. Tests are included for these
changes.
2016-10-06 09:36:19 -04:00
Peter Hamilton 894a7ac97d Adding operation policy name support to the client
This change adds operation policy name support to the pie client,
allowing you to optionally specify the policy name when creating
new symmetric keys and asymmetric key pairs. The operation policy
name can also be set on any pie object and will be sent with the
corresponding register request for new objects. Tests for these
additions are included.
2016-10-05 15:33:06 -04:00
Peter Hamilton bcb5e7d948 Merge pull request #192 from OpenKMIP/feat/add-client-cert-auth
Adding session extraction of client identity from certificates
2016-10-04 14:55:14 -04:00
Peter Hamilton 91606db711 Fixing server failure on missing request credential
This change fixes a bug in the KMIP server engine where a missing
request credential would cause the session to prematurely
terminate. Credential handling may require session termination
for missing credentials, but that decision should be made by
credential processing not request processing.

Fixes #193
2016-10-03 11:10:42 -04:00
Peter Hamilton 8fd6349152 Adding session extraction of client identity from certificates
This change updates the KmipSession, allowing it to extract client
identity from the client certificate of a TLS connection. The
certificate subject common name is used as the client identity if
the certificate has client authentication set in the extended key
usage extension.

This change breaks backwards compatibility. If a client certificate
does not define a client identity, the session will reject it and
shutdown the connection. Any client certificates used to connect
with the software server in the past will need to be replaced with
certificates that define a suitable client identity.
2016-09-13 15:30:08 -04:00
Peter Hamilton 765df8340a Adding default KMIP operation policies
This change adds enumerations and policy objects to support the
specification and enforcement of KMIP operation policies. A new
module, kmip.core.policy, is added to define the default policy
objects required by the KMIP specification.
2016-09-09 14:45:34 -04:00
Peter Hamilton f122f19621 Updating KMIP enumerations to support KMIP 1.2
This change updates the set of supported enumerations to include
all enumerations included in KMIP 1.2. Existing enumerations are
updated where required.
2016-08-30 14:34:16 -04:00
Peter Hamilton 65ad4c6111 Adding support for the State attribute
This change adds the State attribute, updating the attribute
factory to support creating it.
2016-08-27 17:13:47 -04:00
Peter Hamilton a8e1854953 Adding the State enumeration
This change adds the State enumeration to the enumerations set.
2016-08-27 16:39:42 -04:00
Peter Hamilton 35fb5c0c9b Merge pull request #163 from OpenKMIP/ver/prep-release-0-5-0
PyKMIP - Release 0.5.0
2016-04-14 08:06:16 -04:00
Peter 600479fd7c PyKMIP - Release 0.5.0
This update includes a new implementation of the PyKMIP software server,
in addition to other minor features and bug fixes:
* Add KmipServer server implementation
* Add KmipSession to manage threaded client/server connections
* Add KmipEngine for processing core server application logic
* Add KmipEngine support for CRUD operations for managed objects
* Add SQLAlchemy/SQLite support for KmipEngine data storage
* Add CryptographyEngine component for all cryptographic operations
* Add pending deprecation warning for Python 2.6 support
* Add pending deprecation warning for the KMIPServer implementation
* Add support for building Sphinx documentation
* Add support for SQLAlchemy tables to all Pie objects
* Add Python magic methods to Attribute and Name objects
* Add Attribute class unit tests
* Add bin script to run the KmipServer
* Add setup entry points to run the KmipServer
* Update DiscoverVersions demo with optional versions argument
* Update all demo scripts to setup their own logging infrastructure
* Update README with information on the KmipServer implementation
* Remove expired certificate files from the integration test suite
* Remove default package log configuration and configuration file
* Fix bug with Locate payload parsing optional values
* Fix bug with DateTime string tests and move to UTC representation
2016-04-14 07:58:09 -04:00
Nathan Reller 7096ed63f3 Added KMIP Server Entry Point
Added console_scripts to setup.py, and added an entry for
pykmip-server. The pykmip-server application will run the PyKMIP
server. The two command line options below will run the server.

python -m kmip.services.server.server
pykmip-server
2016-04-11 10:27:57 -04:00
Peter Hamilton 7c57416249 Merge pull request #162 from OpenKMIP/maint/add-server-logging
Updating the KmipEngine logging for operation handling
2016-04-07 11:05:39 -04:00
Peter 477669f620 Updating the KmipEngine logging for operation handling
This change adds some additional logging statements when processing
individual KMIP operations, providing additional information on
operation input and output. The associated tests have been updated
accordingly.
2016-04-07 10:04:33 -04:00
Peter 80d56453a5 Fixing bug with primary key reuse by SQLAlchemy
This change fixes a bug with the Pie object table definitions used by
SQLAlchemy to store managed objects and attributes for the PyKMIP
software server. While primary keys are specified for all tables, they
do not by default auto-increment with SQLAlchemy/SQLite, causing
collisions and uniqueness constraint violations when bulk testing with
the server. Add an explicit SQLite auto-increment tag to each table
prevents this from happening.
2016-04-07 09:46:01 -04:00
Peter Hamilton 6080a72084 Merge pull request #151 from viktorTarasov/fix/messages/error-response-without-operation
core messages: response batch item without 'operation'
2016-04-05 14:36:52 -04:00
Peter Hamilton 0ed92a1ea4 Merge pull request #150 from viktorTarasov/fix/service-client/batch-item-of-error-response
fix: kmip-client: batch item of error response
2016-04-05 14:28:34 -04:00
Peter Hamilton 9362abbce5 Merge pull request #156 from OpenKMIP/maint/remove-library-logging
Removing default log configuration and usage
2016-04-05 14:11:08 -04:00
Peter Hamilton b152941b68 Merge pull request #159 from OpenKMIP/bug/fix-early-close
Fixing bug terminating connection prematurely
2016-04-05 14:09:41 -04:00
Peter Hamilton 21b4731118 Merge pull request #160 from OpenKMIP/feat/use-file-based-backend
Fixing bug with in-memory SQLite storage
2016-04-05 14:07:49 -04:00
Peter 7374bcda25 Fixing bug with DateTime str test
An issue with local daylight savings time causes a comparison error in
some locales when checking against a hard-coded expected time string.
The DateTime primitive string representation has been updated to output
only UTC time strings.

Fixes #124
2016-04-05 14:00:14 -04:00
Peter Hamilton 0f7157536b Merge pull request #158 from OpenKMIP/maint/remove-old-certs
Removing out-of-date certificate files
2016-04-05 12:12:52 -04:00
Peter 4bc27425be Removing default log configuration and usage
This change removes the use of default logging settings in
kmip.__init__.py as well as the bundled logconfig.ini file. Logging
settings should be set by applications, not by underlying software
libraries. All demos have been updated to set their own logging
settings and to log at appropriate levels.
2016-04-05 11:49:27 -04:00
Peter 9a994637d9 Fixing bug with in-memory SQLite storage
This change swaps out the in-memory SQLite database for file-based data
storage. SQLAlchemy support for in-memory SQLite storage does not work
across threads. The new storage scheme stores all PyKMIP server data in
/tmp.
2016-04-05 09:57:50 -04:00
Peter b2714002b6 Fixing bug terminating connection prematurely
This change fixes a bug with the KmipSession connection handling logic
that would terminate the connection before actually receiving a
termination from the client. The corresponding unit tests have been
updated to reflect this fix.
2016-04-05 08:58:40 -04:00
Peter Hamilton 77f1b1223c Merge pull request #155 from OpenKMIP/maint/add-server-deprecate
Adding a pending deprecation warning to old server
2016-04-04 15:58:54 -04:00
Peter ec83ff6abe Removing out-of-date certificate files
This change removes the testing certificate files. They are expired.
2016-04-04 13:48:10 -04:00
Peter edf4e4dcc9 Integrating the KmipEngine with the KmipSession
This change adds KmipEngine support to the KmipSession. The session will
now pass on received requests for processing by the engine, handling any
results or errors that occur. The KmipSession test suite has been
updated to reflect this change.
2016-04-04 10:48:53 -04:00
Peter e01a9142e5 Linking the loggers for the different KmipServer components
This change renames the loggers for different KmipServer components,
ensuring that all server logs are processed by the same kmip.server
logger.
2016-04-04 10:39:06 -04:00
Peter ab17f672ce Adding a pending deprecation warning to old server
This change adds a simple warning that is triggered whenever the
KMIPServer class is instantiated. It advises the user to use the newer
KmipServer class. The KMIPServer will be removed in a future version of
PyKMIP.
2016-03-31 10:47:11 -04:00
Peter 702ba77715 Adding the KmipServer
This change adds the KmipServer, the front-end of the KMIP software
server. The KmipServer is in charge of loading configuration settings,
creating all major server components, and serving and managing client
connections. A KmipServerConfig tool is included to handle configuration
settings. Test cases for all new code are included.
2016-03-30 16:55:44 -04:00
Peter 934fc7b93e Adding KmipEngine support for CreateKeyPair
This change adds support for the CreateKeyPair operation to the
KmipEngine. New exceptions and test cases are included.
2016-03-29 08:09:29 -04:00
Peter 22b8a84361 Adding KmipEngine support for Create
This change adds support for the Create operation to the KmipEngine. New
exceptions and test cases are included.
2016-03-29 07:57:18 -04:00
Viktor Tarasov fec1aa1f4a messages: response batch item without 'operation'
Batch item of error response message can be without 'operation'
attribute
2016-03-29 11:42:01 +02:00
Viktor Tarasov 4684fc6650 fix: kmip-client: batch item of error response 2016-03-29 10:25:29 +02:00
Peter Hamilton 8cc7c5f8e0 Merge pull request #149 from viktorTarasov/fix/session/session_name
fix: session: 'expected str instance, NoneType found'
2016-03-28 16:47:24 -04:00
Viktor Tarasov d996c268df fix session: 'expected str instance, NoneType found'
When KmipSession instantiated without session name there is error:
File ".../PyKMIP/kmip/services/server/session.py", line 57, in __init__
    self._logger = logging.getLogger('.'.join((__name__, name)))
TypeError: sequence item 1: expected str instance, NoneType found
2016-03-28 22:01:28 +02:00
Peter Hamilton 995d458654 Merge pull request #146 from OpenKMIP/feat/add-kmip-engine-register
Adding KmipEngine support for Register
2016-03-25 09:40:29 -04:00
Peter 89cba73821 Adding KmipEngine support for Register
This change adds support for the Register operation to the KmipEngine.
New exceptions and test cases are included.
2016-03-21 11:22:47 -04:00
Peter 0a499b7b12 Adding an AttributePolicy system
This change adds a policy system that will be used by the KmipEngine to
track and organize rules for individual KMIP attributes. Comparison
operators for the Integer primitive and ProtocolVersion struct are added
to support the AttributePolicy. Tests for all new changes are included.
2016-03-21 11:22:07 -04:00
Peter 07a63c07c8 Adding an AttributePolicy system
This change adds a policy system that will be used by the KmipEngine to
track and organize rules for individual KMIP attributes. Comparison
operators for the Integer primitive and ProtocolVersion struct are added
to support the AttributePolicy. Tests for all new changes are included.
2016-03-21 11:11:46 -04:00
Peter Hamilton 9e074da553 Merge pull request #133 from viktorTarasov/feature/attributes/eq-for-name
attributes: 'eq' and 'repr' methods for Name attr.
2016-03-18 12:55:56 -04:00
Peter Hamilton abd11c6327 Merge pull request #110 from viktorTarasov/feature/services-server-use-EOF
services/server: use EOF exception
2016-03-18 12:54:33 -04:00
Peter 6ecbe7bdda Adding KmipEngine support for Get
This change adds support for the Get operation to the KmipEngine. New
exceptions and test cases are included.
2016-03-15 16:15:35 -04:00
Peter 27befcb85c Adding KmipEngine support for Destroy
This change adds support for the Destroy operation to the KmipEngine.
New exceptions and test cases are included.
2016-03-14 08:21:27 -04:00
Peter 55113a70f8 Adding the KmipEngine
This change adds the KmipEngine, the core processing component of the
KmipServer. The KmipEngine contains the KMIP application logic and
handles process request messages by batch. The engine handles logging
and error handling throughout the processing stack.
    
New server exceptions are added to handle new error cases. A test suite
is included.
2016-03-08 15:15:17 -05:00
Hadi Esiely a7c41c758b Add Attribute class unit tests
This pull request:

- Adds the comparison operators to the following classes:

 -- Attribute.AttributeName class

- Fixes bug in the "_create_cryptographic_parameters" function when "None" type parameters are used

- Adds read, write, and comparator unit tests for the Attribute class in the /kmip/core/objects.py file

Signed-off-by: Hadi Esiely <hadi.esiely-barrera@jhuapl.edu>
2016-03-01 10:53:29 -05:00
Viktor Tarasov c8d928d95a attributes: 'eq' and 'repr' methods for Name attr.
'eq', 'repr' and 'str' method are added to
Name, NameValue and NameType classes
2016-02-24 10:33:17 +01:00
Viktor Tarasov 8b877fd4d2 services/server: use EOF exception ...
... to gently indicate the end of request processing

Introduce 'RequestLengthMismatch' exception  dedicated for the
unexpected result of 'read' request operation

Unit tests for kmip-protocol
2016-02-23 12:51:40 +01:00
Viktor Tarasov ecca9552d3 demos: 'versions' argument for 'discover-versions' demo 2016-02-23 11:57:28 +01:00
Peter Hamilton 7b472b752b Merge pull request #132 from viktorTarasov/fix/request-payload/missing-argument-for-read-call
payload/locate: missing argument in 'read' calls
2016-02-22 10:49:55 -05:00
Peter Hamilton cfb85190fa Merge pull request #128 from viktorTarasov/feature/discover-versions/server
server: implement 'discover-versions'
2016-02-22 10:46:41 -05:00
Nathan Reller 043553c0e0 Added SQLAlchemy Code for X509 Certificates
The code for persisting X509 certificates in a database has been added
along with the corresponding unit tests.
2016-02-19 14:05:00 -05:00
Nathan Reller 771aea7b80 Added Class Type to Managed Object
SQLAlchemy requires a unique identifier for classes when using the
join table inheritence strategy. Previous commits were reusing the
object_type attribute of ManagedObject, but this strategy does not
work for classes that are subclasses of an object. This will be the
case for the Certificate object type because one such subclass will be
X509Certificate.
2016-02-19 11:50:08 -05:00
Peter Hamilton e967bb056d Merge pull request #136 from OpenKMIP/feat/sqlalchemy-secret
Added SQLAlchemy Code for Secret Data
2016-02-19 11:36:06 -05:00
Nathan Reller c3680f7609 Added SQLAlchemy Code for Asymmetric Keys
The code for persisting public and private keys in a database has been
added along with the corresponding unit tests.
2016-02-19 10:38:24 -05:00
Nathan Reller 8d6575fa36 Added SQLAlchemy Code for Secret Data
The SecretData class has the SQLAlchemy code in it to allow it be
stored in the database using the library.
2016-02-19 10:33:36 -05:00
Nathan Reller c21f07634b Added SQLAlchemy Code for Symmetric Key
The code for persisting symmetric keys in a database has been added
along with the corresponding unit tests.

The usage mask list for cryptographic objects is stored as an integer bitmask.
The conversion takes place with a new SQLAlchemy type.

Switched ManagedObject value type to VARBINARY. This prevents errors from
occuring when trying to convert to a string.
2016-02-19 09:23:51 -05:00
Viktor Tarasov c9df034e48 server: implement 'discover-versions' 2016-02-18 14:35:30 +01:00
Peter Hamilton 4d6caf1de7 Merge pull request #130 from viktorTarasov/fix/payload-storage-mask
service/server: fix Locate.Payload member name
2016-02-17 14:16:05 -05:00
Peter Hamilton 5eb1625a23 Merge pull request #131 from viktorTarasov/feature/utils/log-skey
utils: log symmetric key
2016-02-17 13:00:53 -05:00
Viktor Tarasov e0ea25a2c6 payload/locate: missing argument in 'read' calls
missing 'object_group_member' in request payload
2016-02-17 17:54:25 +01:00
Viktor Tarasov 8fe44e0e92 utils: log symmetric key 2016-02-17 17:40:50 +01:00
Viktor Tarasov 2b9d19c35f service/server: fix Locate.Payload member name 2016-02-17 17:26:10 +01:00
Nathan Reller e7a383cace Added SQLAlchemy Code to OpaqueData
Added the ORM code to be able to persist OpaqueData in a database.
This added the code to the base class ManagedObject as well. Unit
tests are added to demonstrate the code is working correctly.
2016-02-16 14:53:45 -05:00
Peter Hamilton 52c7103681 Merge pull request #123 from OpenKMIP/feat/add-kmip-session
Adding KmipSession
2016-02-15 09:25:14 -05:00
Peter Hamilton 92c7358237 Merge pull request #122 from OpenKMIP/feat/add-auth-suites
Adding KMIP authentication suites
2016-02-15 09:20:46 -05:00
Peter d316d29b60 Adding KmipSession
This change adds a KmipSession class that manages individual
client/server connections in a thread of execution separate from the
main thread. A test suite is included.
2016-02-09 18:05:57 -05:00
Peter Hamilton a0423352ab Merge pull request #115 from hadesto/dev/hadi/unit_tests/kmip_client/server_failover_release
Server Failover Unit Tests
2016-02-09 15:09:19 -05:00
Hadi Esiely bd9ac1c521 Server Failover Unit Tests
This pull request adds some unit tests for the server failover code that was recently merged.

Signed-off-by: Hadi Esiely <hadi.esiely-barrera@jhuapl.edu>
2016-02-09 14:13:22 -05:00
Peter a1fa021af3 Adding KMIP authentication suites
This change adds KMIP authentication suites, which define the TLS
protocols and cipher suites to use for establishing secure network
connections compliant with the KMIP specification. Test suites are
included.
2016-02-05 13:29:05 -05:00
Peter 53d6b1776e Adding the CryptographyEngine
This changes adds the CryptographyEngine, which uses pyca/cryptography
to create symmetric and asymmetric keys. A test suite is included.
2016-01-29 13:29:36 -05:00
Peter Hamilton 9d02201178 Merge pull request #120 from OpenKMIP/dev/add-cryptographic-engine-api
Adding server.crypto package and initial API
2016-01-29 13:27:14 -05:00
Peter 54b446f2d5 Adding server.crypto package and initial API
This changes adds the kmip.services.server.crypto package and the
initial API for the CryptographicEngine hierarchy.
2016-01-18 16:36:52 -05:00
Peter b7add2179d Adding pending deprecation warning for Python2.6
This change add a simple warning that is triggered whenever Python
2.6 is used with PyKMIP. It simply advises the user to use a newer
version of Python. For now, Python 2.6 can still be used with
PyKMIP.
2016-01-14 16:39:52 -05:00