Commit Graph

84 Commits

Author SHA1 Message Date
Peter Hamilton 4d6ba8a964 Add server persistence for operation policy names
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.
2016-10-06 09:36:19 -04:00
Peter Hamilton bcb5e7d948 Merge pull request #192 from OpenKMIP/feat/add-client-cert-auth
Adding session extraction of client identity from certificates
2016-10-04 14:55:14 -04:00
Peter Hamilton 91606db711 Fixing server failure on missing request credential
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
2016-10-03 11:10:42 -04:00
Peter Hamilton 8fd6349152 Adding session extraction of client identity from certificates
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.
2016-09-13 15:30:08 -04:00
Nathan Reller 7096ed63f3 Added KMIP Server Entry Point
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
2016-04-11 10:27:57 -04:00
Peter 477669f620 Updating the KmipEngine logging for operation handling
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.
2016-04-07 10:04:33 -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 9a994637d9 Fixing bug with in-memory SQLite storage
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.
2016-04-05 09:57:50 -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 Hamilton 77f1b1223c Merge pull request #155 from OpenKMIP/maint/add-server-deprecate
Adding a pending deprecation warning to old server
2016-04-04 15:58:54 -04:00
Peter edf4e4dcc9 Integrating the KmipEngine with the KmipSession
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.
2016-04-04 10:48:53 -04:00
Peter e01a9142e5 Linking the loggers for the different KmipServer components
This change renames the loggers for different KmipServer components,
ensuring that all server logs are processed by the same kmip.server
logger.
2016-04-04 10:39:06 -04:00
Peter ab17f672ce Adding a pending deprecation warning to old server
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.
2016-03-31 10:47:11 -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
Peter 934fc7b93e Adding KmipEngine support for CreateKeyPair
This change adds support for the CreateKeyPair operation to the
KmipEngine. New exceptions and test cases are included.
2016-03-29 08:09:29 -04:00
Peter 22b8a84361 Adding KmipEngine support for Create
This change adds support for the Create operation to the KmipEngine. New
exceptions and test cases are included.
2016-03-29 07:57:18 -04:00
Peter Hamilton 8cc7c5f8e0 Merge pull request #149 from viktorTarasov/fix/session/session_name
fix: session: 'expected str instance, NoneType found'
2016-03-28 16:47:24 -04:00
Viktor Tarasov d996c268df fix session: 'expected str instance, NoneType found'
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
2016-03-28 22:01:28 +02:00
Peter Hamilton 995d458654 Merge pull request #146 from OpenKMIP/feat/add-kmip-engine-register
Adding KmipEngine support for Register
2016-03-25 09:40:29 -04:00
Peter 89cba73821 Adding KmipEngine support for Register
This change adds support for the Register operation to the KmipEngine.
New exceptions and test cases are included.
2016-03-21 11:22:47 -04:00
Peter 0a499b7b12 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:22:07 -04: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 abd11c6327 Merge pull request #110 from viktorTarasov/feature/services-server-use-EOF
services/server: use EOF exception
2016-03-18 12:54:33 -04:00
Peter 6ecbe7bdda Adding KmipEngine support for Get
This change adds support for the Get operation to the KmipEngine. New
exceptions and test cases are included.
2016-03-15 16:15:35 -04:00
Peter 27befcb85c Adding KmipEngine support for Destroy
This change adds support for the Destroy operation to the KmipEngine.
New exceptions and test cases are included.
2016-03-14 08:21:27 -04:00
Peter 55113a70f8 Adding the KmipEngine
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.
2016-03-08 15:15:17 -05:00
Viktor Tarasov 8b877fd4d2 services/server: use EOF exception ...
... 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
2016-02-23 12:51:40 +01:00
Peter Hamilton cfb85190fa Merge pull request #128 from viktorTarasov/feature/discover-versions/server
server: implement 'discover-versions'
2016-02-22 10:46:41 -05:00
Viktor Tarasov c9df034e48 server: implement 'discover-versions' 2016-02-18 14:35:30 +01:00
Viktor Tarasov 2b9d19c35f service/server: fix Locate.Payload member name 2016-02-17 17:26:10 +01:00
Peter d316d29b60 Adding KmipSession
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.
2016-02-09 18:05:57 -05:00
Peter 53d6b1776e Adding the CryptographyEngine
This changes adds the CryptographyEngine, which uses pyca/cryptography
to create symmetric and asymmetric keys. A test suite is included.
2016-01-29 13:29:36 -05:00
Peter 54b446f2d5 Adding server.crypto package and initial API
This changes adds the kmip.services.server.crypto package and the
initial API for the CryptographicEngine hierarchy.
2016-01-18 16:36:52 -05:00
Peter Hamilton a04a014a8a Reorganizing the server code
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.
2015-09-29 14:22:03 -04:00