Commit Graph

70 Commits

Author SHA1 Message Date
Peter Hamilton e371273457 Fixing bug with dangling file handle when setting __version__
This change fixes a bug whereby a file handle was left unclosed after
being used to dynamically set __version__.
2015-06-25 14:27:31 -04:00
Peter Hamilton 2ec52ef34d PyKMIP - Release 0.3.3
This update includes several new features and bug fixes:
* Add the core ManagedObject class hierarchy for the new Pie API
* Add updated Boolean primitive implementation and test suite
* Add integration tests for symmetric key creation and registration
* Update demo and client logging to log at the INFO level by default
* Update README with improved testing instructions
* Fix bug causing enumerations to be encoded as signed integers
* Fix bug with mismatched EncodingOption tag
* Fix bug with relative path use for version number handling
* Fix bug with Integer primitive breaking on valid long integer values
2015-06-25 08:58:47 -04:00
Peter Hamilton 8516c52820 Merge pull request #37 from OpenKMIP/bug/fix-integer-accepting-longs
Fixing bug with Integer accepting long values
2015-06-25 07:59:04 -04:00
Peter Hamilton 0069f0d9fb Merge pull request #36 from hadesto/dev/hadi/integration-tests/release/symmetric-keys
Added integration tests for testing symmetric keys
2015-06-25 07:55:52 -04:00
Hadi Esiely d1e6ff49c8 Added integration tests for testing symmetric keys 2015-06-24 15:56:47 -04:00
Peter Hamilton 87f05f90bf Fixing bug with Integer accepting long values
This change fixes a bug with the Integer primitive that caused it to
break when accepting long integer values. As long as the long integer
value can be represented by a signed 32-bit integer, it is considered
valid. Test cases have been added to check for this condition and the
validation routine for Integer has been updated to raise appropriate
errors.
2015-06-24 13:42:04 -04:00
Peter Hamilton 5025925388 Merge pull request #34 from callidus/bug-fixes
A few bug fixes in objects
2015-06-24 12:52:11 -04:00
Peter Hamilton b38b58c2f4 Fixing relative path bug when looking up library version
This change fixes the use of relative paths used to fetch the PyKMIP
library version number in kmip/__init__.py and setup.py. The absolute
path of the file is now dynamically generated and used instead. Tests
are included to verify that the __version__ attribute is set properly.
2015-06-24 12:31:53 -04:00
Tim Kelsey dae65b46c4 A few bug fixes in objects 2015-06-24 15:34:53 +01:00
Peter Hamilton ef58a8f90b Merge pull request #28 from OpenKMIP/feat/finish-boolean-primitive
Finishing Boolean primitive implementation
2015-06-23 14:13:26 -04:00
Peter Hamilton a90e0f0b98 Adding additional cryptographic base classes
This change adds two additional abstract base classes for the Pie
ManagedObject object hierarchy: CryptographicObject and Key. Test suites
are provided for each base class, using a dummy subclass of each for
testing. The object test suite package structure is also modified to
collect all ManagedObject subclass tests in one package.
2015-06-23 13:25:31 -04:00
Peter Hamilton ac6a9edec7 Merge pull request #26 from OpenKMIP/bug/add-test-for-unsigned-enum
Adding test case for bug with unsigned Enumeration encoding
2015-06-19 13:54:48 -04:00
Peter Hamilton 272f9ffcbc Merge pull request #21 from OpenKMIP/feat/add-pie-managed-object
Adding the ManagedObject base class
2015-06-18 08:14:21 -04:00
Peter Hamilton 3ecb63aaf5 Finishing Boolean primitive implementation
This change finishes the Boolean primitive implementation, including a
complete test suite for the Boolean class.
2015-06-17 14:10:31 -04:00
Peter Hamilton 25c4aa90a5 Adding the ManagedObject base class
This change adds ManagedObject, the abstract base class of the
simplified KMIP object hierarchy. It defines a set of attributes common
to all KMIP objects and registers placeholder methods to be implemented
by all subclasses. A basic test suite is included, using a dummy
ManagedObject subclass for testing.
2015-06-17 10:45:47 -04:00
Peter Hamilton 64d30343a1 Adding test case for bug with unsigned Enumeration encoding
This change adds a test case that verifies a fix for a bug with how
Enumerations were encoded as signed instead of unsigned integers. The
validation check for Enumerations has also been updated to be more
concise.
2015-06-16 14:33:56 -04:00
Peter Hamilton 4d92d1fa95 Merge pull request #24 from rellerreller/dev/unsigned-integer
Enumerations are Unsigned Integers
2015-06-16 13:56:51 -04:00
Peter Hamilton 3ec0e833eb Updating client and demo logging
This change updates various logging statements for the KMIP client and
demo suites, ensuring that the default logging level for the library is
at the INFO level and that all demo logging is at the INFO level.
2015-06-16 07:46:25 -04:00
Nathan Reller 1d3a8e462a Enumerations are Unsigned Integers
Enumerations are to be encoded as four byte unsigned integers. They
were previously being sent as signed integers. This caused failures
when trying to transmit values that are extensions. Extensions contain
the value 8 hex in the first nibble of the first byte.
2015-06-15 11:37:41 -04:00
Peter Hamilton 8efdded9ba Adding version module to improve version handling
This change adds a top-level version module to hold the version
definition for the library. This is then used in both kmip/__init__.py
and setup.py, allowing version inspection on import of the library and
automatic syncing of the version across the project.
2015-06-11 14:25:55 -04:00
Nate 12bd1b1031 Merge pull request #19 from OpenKMIP/maint/add-pie-package
Adding the pie package for the simplified PyKMIP API
2015-06-09 09:28:40 -04:00
Nate 074505c77b Merge pull request #18 from OpenKMIP/maint/add-primitives-test-package
Adding a primitives test package to the unit test suite
2015-06-09 09:27:53 -04:00
Peter Hamilton 16617972c6 Adding the pie package for the simplified PyKMIP API
This change adds the pie package, which will be used for the simplified
PyKMIP API, which will be officially known as the Pie API.
2015-06-05 11:46:00 -04:00
Peter Hamilton 984fe318cd Adding a primitives test package to the unit test suite
This change adds a primitives test package to the unit test suite to
contain future test suites for primitive testing. The current primitives
test suite has been moved to this new package.
2015-06-04 10:38:07 -04:00
Peter Hamilton 1bc568c175 Removing old and out-of-date demo scripts
This change removes the original top-level set of demo scripts in
kmip/demos in favor of the functioning and up-to-date unit demo scripts
located in kmip/demos/units.
2015-06-04 09:29:58 -04:00
Peter Hamilton ab3298c6d1 Fixing infinite recursion bug with object inheritance
This change removes all references to self.__class__. In object
hierarchies with multiple levels of inheritance, using self.__class__
can cause an infinite loop when resolving references to parent classes.
2015-06-02 11:16:42 -04:00
Peter Hamilton 6606c989fb Adding config argument to integration test suite
This change adds a pytest config argument, allowing the integration test
suite to be run with the client configured with a specific section from
the PyKMIP configuration file. A simple integration test class is added
to demonstrate how to use the client created using the config argument.

To run the integration test suite with a specific configuration, use:

$ tox -e integration -- --config <config-section>

where <config-section> is the name of the config file section to use for
the PyKMIP client.
2015-05-20 12:08:59 -04:00
Peter Hamilton 23574dc33c Reorganizing test suite and updating tox configuration
This change reorganizes the test suite, splitting it into two separate
test suites, one for unit tests and one for integration tests. The tox
configuration is also updated to reflect this change. Invoking tox now
runs the unit tests by default. A separate tox environment is used to
run the integration tests.
2015-05-14 13:13:10 -04:00
Peter Hamilton 5ee85c3f9c Updating demo utilities to support creating Certificates
This change updates the unit demo utilities, adding in support for the
creation, registration, and retrieval of X.509 Certificate objects.
Support includes an example encoding of a Certificate as well as updated
logging routines to display retrieved Certificate data.
2015-05-07 16:51:17 -04:00
Peter Hamilton 195671d4bf Adding support for the Certificate managed object
This change polishes and reorganizes the implementation of the
Certificate managed object and its required subclasses. It adds in
documentation and test suites for all modified classes and updates the
SecretFactory to support creating default Certificate objects.
2015-05-05 14:55:34 -04:00
Peter Hamilton cb550aef7a Fixing invalid tag for the KeyMaterialStruct 2015-04-28 08:29:21 -04:00
Peter Hamilton b7f67bcaa2 Updating the SecretFactory to create Public and PrivateKeys with data 2015-04-20 14:43:50 -04:00
Peter Hamilton 3c29d5f743 Merge pull request #7 from callidus/more-object-type
Adding handling for SecretData and OpaqueData objects
2015-04-14 13:25:59 -04:00
Tim Kelsey 751ae8e3b0 Adding handling for SecretData and OpaqueData objects
Secret Data (2.2.7) can now be registered
Opaque Object (2.2.8) can now be registered

This required the adding of a NONE type to the OpaqueDataType enum
with the value of 0. This is not indicated by the standard but we
needed some value to satisfy response decoding.

Also fixed get demo

This has been tested vs a HP Atalla ESKM HSM
2015-04-14 13:28:11 +01:00
Peter Hamilton bea9bf08b2 Adding KMIP profile information to the client
This change updates the client with the KMIP profile information of the
conformance clauses and authentication suites that the client supports.
Several new methods are added to the client, allowing for the retrieval
and basic predicate querying of the profile data. A new test suite has
also been added to test this new capability.
2015-04-09 10:45:59 -04:00
Peter Hamilton 43ecea23a6 Updating the Register unit demo
This change updates the Register unit demo, adding support for the
registration of different types of secret objects. The changes required
to support this include implementation updates to the KeyValue backing
objects.
2015-03-13 16:31:39 -04:00
Peter Hamilton d263302077 Updating the Get unit demo
This change updates the Get unit demo, adding support for:
* the additional display of key-related objects
* the passing of more arguments to the client (e.g., KeyFormatType)
* the retrieval of Public/PrivateKeys
2015-03-13 15:01:52 -04:00
Peter Hamilton 3e11002567 Adding support for Digest
This change adds support for the Digest attribute, including updates and
unit test suites for all dependent KMIP objects.
2015-03-10 11:57:35 -04:00
Peter Hamilton f784b67f3a Updating the CreateKeyPair demo
This change updates the CreateKeyPair demo, adding the following items:
* a name option for specifying the name of the key pair to create
* a CryptographicUsageMask attribute sent with the CreateKeyPair request
* enhanced attribute logging for private/public key template attributes
2015-03-10 11:29:08 -04:00
Peter Hamilton 908aece78a Adding custom configuration support
This change updates the KMIP client to support the custom selection of
client configuration options. This makes it easy to dynamically create
clients that connect to different backends. All unit demos have been
updated to support this feature.
2015-02-27 10:48:07 -05:00
Peter Hamilton 80ee64e600 Adding support for the Query operation
This change adds support for the Query operation, including updates to
the KMIP client and core object libraries, the KMIP client and core unit
test suites, and a Query unit demo.
2015-02-23 17:18:05 -05:00
Peter Hamilton 0c4f9cd9d0 Updating application attributes
This change updates the various Application attributes, adding inline
documentation, and reorganizing the different related test suites. Minor
updates to supporting primitive objects are included.
2015-02-23 14:13:21 -05:00
Peter Hamilton 0cd2d3dab6 Fixing format string indices
This change adds indices to all format strings, ensuring
interoperability with Python 2.6.
2015-02-23 09:52:15 -05:00
Peter Hamilton f6b420d2db Adding support for the DiscoverVersions operation
This change adds support for the DiscoverVersions operation, including
updates to the KMIP client, the client and KMIP core test suites, and a
DiscoverVersions unit demo.
2015-01-23 15:26:28 -05:00
Peter Hamilton 7ce5a74315 Merge branch 'feat/unit-demos' 2015-01-22 12:56:46 -05:00
Peter Hamilton ff533ff4bb Adding support for the RekeyKeyPair operation
This change adds support for the ReKeyKeyPair operation, adding in
required KMIP objects and updating the KMIP client. Minor changes to the
server are included in preparation for future changes. The unit test
suite has been updated accordingly.
2015-01-21 11:41:08 -05:00
Peter Hamilton 87575e1a15 Adding unit demos
This change adds a suite of unit demos which demonstrate how to use
individual KMIP client operations. These demos also feature better
argument handling, which will eventually be ported to the rest of the
demo suite. Some added debug logging is included.
2015-01-19 09:37:32 -05:00
Peter Hamilton c6d6db3dfe Adding support for the CreateKeyPair operation
This change adds support for the CreateKeyPair operation, adding in
required KMIP attributes and objects and updating the KMIP client. Minor
changes to the server are also made in preparation for future changes.
The unit test suite has been updated accordingly.
2015-01-09 13:11:05 -05:00
Peter Hamilton 6cbb3159ca Adding payload factories
This change adds a set of payload factories to the factory suite, which
handle the construction of default request/response payload objects for
KMIP operations. These factories replace the use of payload operation
dictionaries for dynamic payload object lookup. A payload factory test
suite and minor logging tweaks are included.
2014-12-11 13:32:17 -05:00
Peter Hamilton 3918c320fd Adding OperationPolicyName
This change adds the OperationPolicyName attribute, extending support to
the AttributeValueFactory. Test cases are included for the creation
process for both the factory and the individual attribute.
2014-12-11 13:32:17 -05:00