Commit Graph

124 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 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 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 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 a11bb8da05 Add KMIP 1.4 enumerations
This change updates the set of supported enumerations to include
those added by KMIP 1.4
2017-08-15 16:07:28 -04:00
dane-fichter a910dccf07 Adding request and response payloads for the Sign operation 2017-07-05 10:03:58 -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 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 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 1e6b043ab8 Update the KeyWrappingData struct
This change updates the KeyWrappingData struct to conform with
current library styles. This struct is used with key data to
represent a wrapped key and will be used by future patches to
support key wrapping functionality. Updated unit tests matching
the new additions are included.
2017-07-18 10:31:05 -04:00
Peter Hamilton 0e0e1465e9 Update the KeyWrappingSpecification struct
This change updates the KeyWrappingSpecification struct to conform
with current library styles. This struct is used for key wrapping
functionality and will be used in future patches. Updated unit
tests matching the new additions are included.
2017-07-16 14:41:44 -04:00
Peter Hamilton 2e15a1ca3b Update the MACSignatureKeyInformation struct
This change updates the MACSignatureKeyInformation struct to
conform with current library styles. This struct is used for key
wrapping functionality and will be leveraged by future patches.
Updated unit tests matching the new additions are included.
2017-07-15 13:08:06 -04:00
Peter Hamilton e5d29f031f Update the EncryptionKeyInformation struct
This change updates the EncryptionKeyInformation struct to conform
with current library styles. This struct is used for key wrapping
functionality and will be leveraged by future patches. Updated
unit tests matching the new additions are included.
2017-07-13 15:12:26 -04:00
Peter Hamilton 344cce83da Add request and response payloads for the DeriveKey operation
This change adds request/response payloads for the DeriveKey
operation, updating the payload factories to support DeriveKey.
Unit tests for the payloads and payload factories are included.
The inequality operator was also added to the TemplateAttribute
struct to support the DeriveKey payload unit tests; differences
in Python2.7 and 3+ led to comparison failures.
2017-06-23 18:28:02 -04:00
Peter Hamilton 38ee408b21 Merge pull request #293 from OpenKMIP/feat/add-derivation-parameters
Add the DerivationParameters struct
2017-06-23 18:22:11 -04:00
Peter Hamilton ed22fb15f9 Add the DerivationParameters struct
This change adds support for the DerivationParameters struct,
which is needed for DeriveKey support. Unit tests are included to
cover all newly added code.
2017-06-21 11:14:07 -04:00
Peter Hamilton 3db0bfe88f Add request and response payloads for the Decrypt operation
This change adds request and response payloads for Decrypt
operation, updating the payload factories to support Decrypt
payloads. Unit tests for all new code are included.
2017-06-20 17:12:29 -04:00
Peter Hamilton 920dce73f4 Merge pull request #289 from OpenKMIP/feat/add-encrypt
Add encryption support to the server cryptography engine
2017-06-19 10:38:58 -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 0f13e0e494 Adding request and response payloads for the Encrypt operation
This change adds request and response payloads for the Encrypt
operation, updating the payload factories to support Encrypt
payloads. Unit tests for all new code are included.
2017-05-31 16:47:19 -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
Hao Shen 8f16558b76 rename compromise_date to compromise_occurrence_date 2017-04-21 12:24:48 -07: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 a2696b722f Add necessary objects/attributes and payloads for MAC operation 2017-01-30 14:50:40 -08: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 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 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 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 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 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 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 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 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 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 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 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 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
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
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