Commit Graph

84 Commits

Author SHA1 Message Date
Peter Hamilton c3696a9877 Merge pull request #335 from OpenKMIP/feat/add-config-extended-key-usage
Add server config option controlling certificate client auth
2017-09-14 13:32:52 -04:00
Peter Hamilton 4c6bbae452 Add server config option controlling certificate client auth
This change adds a server configuration option to control the
enforcement of TLS certificate client authentication. Before,
client TLS certificates had to include the extended key usage
extension with the clientAuth bit set to be used as sources of
client identity. The new configuration option,
enable_tls_client_auth, allows server admins to enable/disable
this requirement. The configuration setting is optional and the
server defaults to the original enforcing behavior if it is not
set. Admins must explicitly set the option to False to disable
enforcement.
2017-09-14 13:16:24 -04:00
alishamayor fa548a7ebe Add REVOKE to list of supported server ops
As defined in _process_query, the list of supported server operations is missing REVOKE.
2017-08-29 17:42:55 -07:00
Peter Hamilton fc7224e20d Add SignatureVerify support to the server
This change adds the SignatureVerify operation to the server. Unit
tests covering the additions are included. The Query operation has
been updated to reflect this addition.
2017-08-29 16:11:26 -04:00
Peter Hamilton 48ef434922 Add signature verification support
This change adds signature verification support to the server
cryptography engine. Only RSA-based signatures are currently
supported. Unit tests have been added to verify the new
functionality.
2017-08-29 13:09:56 -04:00
Dane Fichter d48b590c35 This change adds Sign operation support to the server. 2017-08-28 12:47:23 -04:00
Dane df06aa8ad8 Add engine support for sign operation
This change adds the sign operation functionality
to the cryptography engine.
2017-08-25 10:31:11 -04:00
Peter Hamilton 89c997c337 Add support for asymmetric encryption and decryption
This change updates the encrypt/decrypt support in the cryptography
engine to support asymmetric key algorithms, specifically RSA. Unit
tests have been added to validate the new functionality.
2017-08-14 21:10:12 -04:00
Peter Hamilton 0009bb2b5a Enforce server support for DeriveKey truncation
This change updates DeriveKey support in the software server to
enforce key truncation. If the derived key is longer than the
requested cryptographic length, the derived key is truncated to
fit the requested length. A unit test has been added to cover
this update.
2017-08-09 15:58:03 -04:00
Peter Hamilton a4b7b433b4 Add Decrypt support to the server
This change adds the Decrypt operation to the server. Support is
currently limited to symmetric decryption only. The decryption key
used with the operation must be in the Active state and it must
have the Decrypt bit set in its cryptographic usage mask.
2017-07-27 12:03:27 -04:00
Peter Hamilton 90fafe8713 Add DeriveKey support to the server
This change adds the DeriveKey operation to the server. Unit tests
covering the new additions are included. The Query operation has
also been updated to reflect this addition.
2017-07-25 13:20:16 -04:00
Peter Hamilton 50b0ae9fee Add server support for Getting wrapped keys
This change adds support for retrieving wrapped keys from the KMIP
server. The only supported key wrapping algorithm currently is
the AES-based NIST Key Wrap algorithm (RFC 3394). MAC/signing is
not supported for key wrapping. Attribute-bundling with the wrapped
key value is not supported. Wrapping of the entire key block TTLV
encoding is not supported. Various additional error cases are
included and checked for.

Unit tests covering the additions to Get are included.
2017-07-25 09:50:11 -04:00
Peter Hamilton 448cf229f6 Fix key wrapping support in the cryptography engine
This change fixes key wrapping support in the cryptography engine.
The original implementation used a CryptographicAlgorithm enum to
determine what key wrapping algorithm to use for key wrapping.
Closer inspection of the KMIP spec indicates that a BlockCipherMode
enum should be used instead. The engine has been updated to reflect
this change, as have the corresponding key wrapping unit tests.
2017-07-24 12:40:46 -04:00
Peter Hamilton f71500446f Add key wrapping support to the cryptography engine
This change adds key wrapping support to the CryptographyEngine,
supporting RFC 3394, AES Key Wrap, only. Numerous unit tests from
using test vectors from RFC 3394 are included.
2017-07-24 10:24:25 -04:00
Peter Hamilton ba47813553 Update the Get request and response payloads
This change updates the Get payloads to reflect current coding
styles. It streamlines payload usage and makes it easier to create
and access payload fields. A new unit test suite dedicated to the
Get payloads is added. Surrounding code in the client/server and
associated utilities and unit tests are updated to reflect these
changes.
2017-07-20 12:36:42 -04:00
Peter Hamilton db81d9b16e Merge pull request #299 from OpenKMIP/feat/add-derive
Add key derivation support to the server cryptography engine
2017-07-10 15:58:02 -04:00
Peter Hamilton 86e49b4c35 Add key derivation support to the server cryptography engine
This change adds key derivation functionality to the cryptographic
engine, adding support for multiple key derivation methods,
including encrypting, hashing, HMACing, and specific algorithms
like PBKDF2 and NIST 800-108. Numerous unit tests are included
from established cryptographic testing sources to verify the
added functionality.
2017-07-10 14:19:25 -04:00
Hao Shen b55a051b26 Add Name attribute filtering of locate for server 2017-06-30 12:27:00 -07:00
Peter Hamilton 60bd56066e Add decryption support to the server cryptography engine
This change adds decryption functionality to the cryptographic
engine used by the server. It supports a variety of symmetric
decryption algorithms and block cipher modes. Asymmetric
decryption support will be added in a future patch.

Unit tests and minor updates to surrounding code are included.
2017-06-27 14:21:59 -04:00
Peter Hamilton de575303ce Add Encrypt operation support to the server
This change adds the Encrypt operation to the server. Support is
currently limited to symmetric encryption only. The encryption key
used with the operation must be in the Active state and it must
have the Encrypt bit set in its cryptographic usage mask.
2017-06-19 10:59:40 -04:00
Peter Hamilton 7bc613417b Add encryption support to the server cryptography engine
This change adds encryption functionality to the cryptographic
engine used by the server. It supports a variety of symmetric
encryption algorithms and block cipher modes. Asymmetric encryption
support will be added in a future patch.

Unit tests and minor updates to surrounding core code are included.
2017-06-16 16:03:30 -04:00
Peter Hamilton 471d0a1ad8 Updating the CryptographicParameters struct
This change updates the CryptographicParameters struct, removing the
primitive class wrappers that it used to use for attribute values
and replacing them with struct properties that internally manage the
primitive objects directly. This gutting and regutting necessitates
cascading changes to every part of the library that used these
internal primitive class wrappers, including unit tests, client and
client tests, and attribute factory handlers. All of these have been
updated to reflect the correct usage of the CryptographicParameters
struct.

This change also adds in additional attribute members for the
CryptographicParameters struct to bring it up to spec with KMIP 1.2.
2017-05-24 15:39: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 3897455469 Add state check for Destroy operation. 2017-04-21 09:32:26 -07: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 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 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 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 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
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
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
Hao Shen ac1206082c Add MAC operation support for server 2017-02-02 13:25:22 -08:00
Hao Shen e8b63eb9d3 Add MAC operation support in cryptography engine 2017-01-25 13:10:41 -08: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 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 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 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 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 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 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 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 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