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.
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.
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.
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.
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
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.
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
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
... 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
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.
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>
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.
This feature enables the PyKMIP library to switch between KMIP service provider
hosts in the event one of them is unavailable. To list more than than one host,
include all necessary host IP addresses separated by commas in the "host" field
in the pykmip.conf file.
Signed-off-by: Hadi Esiely <hadi.esiely-barrera@jhuapl.edu>
This change creates a new subpackage under services, server, which now
holds all of the software server related code. References to different
pieces of the server code base are updated accordingly.
This change updates the Enumeration primitive, adding a fresh
implementation and documentation. An updated unit test suite for the
primitive is included. Numerous changes to Enumeration usage across the
library are also included to comply with the updated implementation.
This change adds support for the GetAttributeList operation to the
KMIPProxy client. It adds a new result object for the operation along
with an integration test demonstrating how the operation can be used.
Client unit test cases are also included.
This change adds support for a customizable timeout option for the KMIP
client. The client will stop attempting connections or operations once
the timeout is exceeded instead of waiting for the default system
timeout. The default timeouts is 30 seconds.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
This change is primarily a reorganization of the message payload code
originally found in kmip/core/messages/operations.py. The code from that
module has been moved to a new package, kmip.core.messages.payloads, and
split into separate modules according to each supported KMIP operation.
The surrounding KMIP codebase has been updated to use the new package
structure and a placeholder test suite has been put in place for future
tests. This change does NOT include test cases as these would primarily
be a refactoring from the current test suite found in
kmip/tests/core/messages/test_messages.py and that work has not been
done yet.
This change adds the server key and cert files from kmip/demos/certs to
the MANIFEST.in and setup.py files. These files are being added to
resolve missing file issues when using the default config values.
In cases where a user is instantiating a KMIPClient and passing
ca_cert=None an exception will be raised with newer versions of
Python(2.7.8+). This exception is based on the missing server.crt file
that is specified in the default configuration.
Likewise, when instantiating a KMIPServer with keyfile=None or
certfile=None the default values will be used. This will also cause an
exception with newer versions of Python.
Although it may be unlikely that an end user would instantiate these
classes without providing cert and key files, there are cases(namely
testing) where it is acceptable to pass None values for these files. In
these cases the files should be present to allow proper execution.
Changes
* adding server.crt and server.key to MANIFEST.in and setup.py
* correcting mismatched default values for KMIPServer certfile and
keyfile
This change adds username and password configuration options to the
client section of the configuration file. These options are used to
create KMIP Credential objects for authenticating connections to a KMIP
appliance.
The KMIP proxy now uses these options when handling operation calls. If
no credential is provided, the proxy will automatically create one from
the config file. If either the username or the password is unspecified,
an error is generated. If neither are specified, no credential is
created. Only username/password credentials are currently supported.
The KMIP proxy test suite now includes test cases covering this
functionality.
Adds a configuration file to allow users to modify settings for the
client and server. The configured settings can be overridden by
directly passing values when a kmip server or client is initialized.
Additionally, if the config file or config options are not found,
pre-set default values will be used.
This change includes several new features to PyKMIP, including:
* support for Python 3.3 and 3.4
* support for KMIP client/server SSL connections
* removal of all Thrift library dependencies
This implementation supports version 1.1 of the KMIP spec. The
library supports the following operations for SymmetricKey objects:
create
register
get
destroy