Commit Graph

274 Commits

Author SHA1 Message Date
Peter Hamilton e77dcadf41 Fixing violations of E722 for flake8 checks
This change fixes violations of E722, the use of except without
specifying an exception type. For now the high-level Exception
class is used as a generic catchall. In the future these cases
will be updated to handle the specific exceptions expected.
2017-10-23 08:43:36 -04:00
Peter Hamilton 626798b327 Merge pull request #355 from OpenKMIP/feat/remove-client-api
Remove the KmipClient API class
2017-10-24 09:42:24 -04:00
Peter Hamilton fdb9218795 Remove the KmipClient API class
This change removes the redundant KmipClient API class from the
pie package. The ProxyKmipClient is the main client going forward
and there is no need for a generic API against which to develop
new clients. If this is needed in the future, it is trivial to
restore.
2017-10-11 10:45:04 -04:00
Peter Hamilton 179a84b268 Rename the CertificateTypeEnum enum to CertificateType
This change renames the CertificateTypeEnum enumeration to
CertificateType, matching the naming schemes of all other
enumerations. This is a backwards incompatible change and
will break any scripts or programs that use the current
CertificateTypeEnum name.
2017-10-11 08:24:55 -04:00
Peter Hamilton 721e7f3717 Add a ProxyKmipClient integation test for registering wrapped keys
This change adds a ProxyKmipClient integration test that verifies
that a wrapped key can be registered with the server and can then
be retrieved, along with all of its key wrapping metadata. Minor
updates to the underlying metadata handling are included.
2017-10-04 17:35:09 -04:00
Peter Hamilton 9acf38568f Update key wrapping data structures to support dict arguments
This change makes several minor updates to different structs
pertaining to key wrapping, allowing these structs to accept and
process dict arguments. Unit tests have been updated to reflect
this change.
2017-10-04 16:58:35 -04:00
Peter Hamilton 0bfbb1a982 Add a ProxyKmipClient integration test for getting wrapped keys
This change adds an integration test for the ProxyKmipClient that
verifies that Get can be used with a key wrapping specification
to retrieve a key cryptographically wrapped with another key.
2017-10-02 01:23:13 -04:00
Peter Hamilton 6df0315d41 Merge pull request #347 from OpenKMIP/feat/add-key-wrapping-data-model
Update the object data model to support storing key wrapping data
2017-10-02 01:19:23 -04:00
Peter Hamilton fc86e1bef4 Update the object data model to support storing key wrapping data
This change updates the KMIP object model to support explicitly
storing key wrapping data attributes. Key wrapping data is treated
externally as a dictionary and is stored as individual fields in
the back end. Various unit tests have been updated and added to
support these additions.
2017-09-30 16:56:02 -04:00
Peter Hamilton 6fa4999cc5 Updating the ProxyKmipClient to support getting wrapped keys
This change updates the ProxyKmipClient, allowing Get operation
calls to retrieve wrapped keys by providing key wrapping
specification information with the request. Unit tests have been
added and updated to reflect this change.
2017-09-30 12:14:14 -04:00
Peter Hamilton 69a7b49d32 Add a logging level configuration option
This change adds a logging level configuration option for the
server, allowing the admin to control what server activity gets
collected for logging. Unit tests have been added and updated to
cover this new configuration setting.
2017-09-27 17:41:14 -04:00
Peter Hamilton 3b147c765e Add a ProxyKmipClient integration test for encrypting data
This change adds a ProxyKmipClient integration test verifying that
the Encrypt and Decrypt operations work in tandem.
2017-09-26 21:27:17 -04:00
Peter Hamilton 6d222e113a Add a ProxyKmipClient integration test for signing data
This change adds a ProxyKmipClient integration test verifying that
the Sign and SignatureVerify operations work in tandem.
2017-09-26 20:17:04 -04:00
Peter Hamilton 657e1c70fb Add asymmetric usage mask support to the ProxyKmipClient
This change updates ProxyKmipClient support for the CreateKeyPair
operation, adding in optional arguments allowing the user to
specify the cryptographic usage masks for the public and private
keys that will be created. Unit tests have been added to cover
this change.
2017-09-26 17:42:01 -04:00
Peter Hamilton 98db0dfe73 Update how private keys are handled when signing data
This change updates how private key bytes are loaded when signing
data. The prior approach required binascii to unhexlify the byte
string. The current approach removes this requirement, matching
the rest of the library. All unit tests have been updated to
reflect this change.
2017-09-26 16:15:13 -04:00
Peter Hamilton 833b936603 Merge pull request #338 from OpenKMIP/feat/update-client-close
Updating the ProxyKmipClient to simplify closing
2017-09-21 14:24:40 -04:00
Peter Hamilton 82a7b8a741 Update payload management
This change updates payload management, streamlining the import
process for kmip.core.messages.payloads. Now any request or
response payload is accessible by importing payloads. All code
importing and using individual payload modules has been updated
to use this new approach.
2017-09-21 13:37:55 -04:00
Peter Hamilton 31a1d1cec4 Updating the ProxyKmipClient to simplify closing
This change updates the ProxyKmipClient close method, allowing
it to be called without error even when the client connection is
not open. The client unit tests have been updated to reflect this.
2017-09-21 12:57:44 -04:00
Peter Hamilton ee857ca4a3 Adding custom TLS cipher suite config option
This change adds a server configuration option, tls_cipher_suites,
allowing the server admin to specify a list of cipher suites to be
used when establishing TLS connections with clients. The custom
list supports both cipher suite specification and OpenSSL suite
naming conventions. The list is filtered through a KMIP-approved
set of cipher suites, and then through a set of cipher suites
suitable for the configured authentication suite. Additional debug
logging has been added to the server to provide transparency on
this process.
2017-09-20 11:40:52 -04:00
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
Peter Hamilton 5c20fe9b3e Merge pull request #330 from danetrain/feat/sign-add-client-support
Add Sign operation support to clients.
2017-09-12 12:25:00 -04:00
Peter Hamilton a60c65f191 Merge pull request #331 from alishamayor/patch-1
Add REVOKE to list of supported server ops
2017-09-12 10:14:20 -04:00
Dane 22daacf5e9 Add Sign operation to clients 2017-09-07 11:14:40 -04:00
alishamayor 50546f2d92 Updated query tests to include Revoke 2017-09-06 17:37:50 -07:00
Edward Betts 0f249a0121 correct spelling mistake 2017-09-01 21:18:15 +01:00
Peter Hamilton 64b6177fe7 Add SignatureVerify support to the clients
This change adds SignatureVerify support to the KMIPProxy and
ProxyKmipClient clients, including unit tests to cover the new
functionality.
2017-08-29 16:41:11 -04: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 df74c854b7 Merge pull request #325 from OpenKMIP/feat/add-signature-verify-payloads
Add payloads for the SignatureVerify operation
2017-08-21 16:53:21 -04:00
Peter Hamilton c5cf2c3846 Merge pull request #323 from OpenKMIP/feat/add-encrypt-decrypt-demos
Add ProxyKmipClient demos for the Encrypt / Decrypt operations
2017-08-21 16:52:44 -04:00
Peter Hamilton a6d3b944ab Add payloads for the SignatureVerify operation
This change adds request and response payloads for the
SignatureVerify operation. Payload factories have been updated to
support SignatureVerify and new unit test suites have been added
to cover the new payload code.
2017-08-18 10:41:03 -04:00
Peter Hamilton b0d454da9a Add ProxyKmipClient demos for the Encrypt / Decrypt operations
This change adds demos for the ProxyKmipClient, demonstrating how
to encrypt and decrypt messages. Demo utilities have been updated
to support the new demo scripts and the KMIPProxy client has been
updated to correctly return operation results.
2017-08-15 11:10:57 -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 5758c6dd1e Merge pull request #321 from OpenKMIP/feat/enforce-derive-key-length
Enforce server support for DeriveKey truncation
2017-08-10 17:30:32 -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 56b8a9f04b Add DeriveKey integration tests for the ProxyKmipClient
This change adds several integration tests that exercise the
DeriveKey functionality supported by the ProxyKmipClient. These
tests pass when run against the PyKMIP software server.
2017-08-09 15:37:46 -04:00
Peter Hamilton 015368161c Fix integration test errors involving Get payloads
This change fixes a series of bugs in the integration test suite
introduced by the previous Get payload update. The integration
test suite now runs successfully against the PyKMIP software
server.
2017-08-09 13:51:29 -04:00
Peter Hamilton 357ac022c4 Merge pull request #317 from OpenKMIP/feat/add-derive-key-to-clients
Add DeriveKey support to the clients
2017-08-09 13:05:13 -04:00
Peter Hamilton 6071c938b6 Add DeriveKey support to the clients
This change adds DeriveKey operation support to the KMIPProxy and
ProxyKmipClient clients, including unit tests to cover the new
functionality.
2017-08-08 14:54:48 -04:00
Peter Hamilton 278a54320c Merge pull request #297 from OpenKMIP/feat/add-decrypt-to-clients
Add Decrypt support to the clients
2017-07-27 12:31:33 -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 7c6e45f549 Fix bug generating detached instance errors in server tests
This patch fixes a bug that generates intermittent sqlalchemy
DetachedInstanceErrors during the KMIP server engine unit test
execution. Specifically, this fix disables instance expiration on
commit for the sqlalchemy sessions used throughout the unit tests,
allowing access to instance attributes even if the instance is
detached from a session.

Fixes #312
2017-07-27 11:38:07 -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 615889f7eb Merge pull request #307 from OpenKMIP/feat/update-key-wrapping-data
Update the KeyWrappingData struct
2017-07-24 12:13:58 -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