Skip to content
Peter Hamilton edited this page Sep 11, 2017 · 5 revisions

Table of Contents


What algorithms are available for creating symmetric encryption keys? For asymmetric encryption keys (i.e., key pairs)?

The KMIP specification supports a wide variety of symmetric and asymmetric key algorithms. Support for these algorithms, including corresponding key lengths, will vary across different KMIP-compliant devices, so check with your KMIP vendor or with your appliance documentation to determine which ones are available.

Symmetric Key Algorithms

Asymmetric Key Algorithms

(*) - supported by the PyKMIP server

How does the PyKMIP server handle client identity and authentication?

Client authentication for the PyKMIP server is currently enforced by the validation of the client certificate used to establish the client/server TLS connection. If the client connects to the server with a certificate that has been signed by a certificate authority recognized by the server, the connection is allowed. If the server cannot validate the client's certificate, the connection is blocked and the client cannot access any objects stored on the server.

If client authentication succeeds, the identity of the client is obtained from the client's certificate. The client's certificate must have the extended key usage extension (see RFC 5280) marked for client authentication. This indicates that the certificate can be used to derive client identity. If the extension is present and marked correctly, the server will extract the common name from the certificate's subject distinguished name and use the common name as the identity of the client. If the extension is not present or is marked incorrectly, the server will not be able to derive the client's identity and will close the connection.

Once the client's identity is obtained, the client's request is processed as normal. The owner of any objects created by the client will be set to the client's identity (i.e., the common name). This common name is used in conjunction with KMIP operation policies to enforce object access control (see the next question for more information).

How does the PyKMIP server manage access control for the keys and objects it stores?

Access control for server objects is managed through KMIP operation policies. An operation policy is a set of permissions, indexed by object type and operation. For any KMIP object type and operation pair, the policy defines who is allowed to conduct the operation on the object type.

There are three basic permissions currently supported by KMIP: Allow All, Allow Owner, and Disallow All. An object type/operation pair mapped to the Allow All permission indicates that any client authenticated with the server can conduct the corresponding operation on any object of the corresponding type. The Allow Owner permission restricts the operation to any client authenticated and identified as the owner of the object. The Disallow All permission blocks any client from conducting the operation on the object and is usually reserved for static public objects or tasks that only the server itself is allowed to perform.

For example, let's examine a simple use case where a client wants to retrieve a symmetric key from the server. The client submits a Get request to the server, including the UUID of the symmetric key it wants to retrieve. The server will derive the client's identity and then lookup the object with the corresponding UUID. If the object is located, the server will check the object's operation policy attribute for the name of the operation policy associated with the object. The server will then use the operation policy, the client's identity, the object's type, the object's owner, and the operation to determine if the client can retrieve the symmetric key. If the operation policy has symmetric keys and the Get operation mapped to Allow All, the operation is allowed for the client regardless of the client's identity and the symmetric key is returned to the client. If the permission is set to Allow Owner, the server will return the symmetric key only if the client's identity matches the object's owner. If the permission is set to Disallow All, the server will refuse to return the symmetric key, regardless of the client's identity.

While an operation policy can cover every possible combination of object type and operation, it does not have to. If a policy does not cover a specific object type or operation, the server defaults to the safest option and acts as if the permission was set to Disallow All.

Each KMIP object is assigned an operation policy and owner upon creation. If no operation policy is included in the creation request, the server automatically assigns it the default operation policy. The default operation policy is defined in the KMIP specification and is built-in to the PyKMIP server; it cannot be redefined or overridden by the user or server administrator (see the next question for details on built-in operation policies).

In addition to the built-in operation policies, the PyKMIP server does allow users to define their own operation policies. An example policy file, policy.json, is included in the examples directory of the PyKMIP repository. Let's take a look at the first few lines from the policy:

{
"example": {
"CERTIFICATE": {
"LOCATE": "ALLOW_ALL",
"CHECK": "ALLOW_ALL",
...

The first piece of information in the policy file is the name of the policy, in this case example. The name maps to a set of object types, which in turn are mapped to a set of operations with associated permissions. In the snippet above, the first object type supported is CERTIFICATE followed by two supported operations, LOCATE and CHECK. Both operations are mapped to the ALLOW_ALL permission. Putting this all together, for the "example" policy certificate objects used with the Locate or Check operations are allowed for all clients, regardless of who owns the certificate being accessed. If you examine the full example file, you will see more operations listed, along with additional object types.

In general, a policy file is a basic JSON file that links a name for the policy to a table of object type/operation pairs that each map to one of the permissions defined above. Users can copy this policy file and edit it to create their own policies. Once the policy is ready, the server administrator can place it in the server's policy directory and restart the server to load in the new policy. The server administrator can configure which directory should act as the server's policy directory by setting the policy_path configuration option in the server's server.conf file. Note that it is up to the server administrator to ensure that user-defined policies do not overwrite each other by using identical policy names.

What built-in operation policies does the PyKMIP server support?

The PyKMIP server defines two built-in operation policies: default and public. Both of these policies are defined in the KMIP specification and each is a reserved policy; neither can be renamed or overridden by user-defined policies. The default policy is used for newly created objects that are not assigned a policy by their creators, though it can be used by creators intentionally. The public policy is intended for use with Template objects that are public to the entire user-base of the server.

The following tables define the permissions for each of the built-in policies.

default policy

Object TypeOperationPermission
CertificateLocateAllow All
CertificateCheckAllow All
CertificateGetAllow All
CertificateGet AttributesAllow All
CertificateGet Attribute ListAllow All
CertificateAdd AttributeAllow Owner
CertificateModify AttributeAllow Owner
CertificateDelete AttributeAllow Owner
CertificateObtain LeaseAllow All
CertificateActivateAllow Owner
CertificateRevokeAllow Owner
CertificateDestroyAllow Owner
CertificateArchiveAllow Owner
CertificateRecoverAllow Owner
Symmetric KeyRekeyAllow Owner
Symmetric KeyRekey Key PairAllow Owner
Symmetric KeyDerive KeyAllow Owner
Symmetric KeyLocateAllow Owner
Symmetric KeyCheckAllow Owner
Symmetric KeyGetAllow Owner
Symmetric KeyGet AttributesAllow Owner
Symmetric KeyGet Attribute ListAllow Owner
Symmetric KeyAdd AttributeAllow Owner
Symmetric KeyModify AttributeAllow Owner
Symmetric KeyDelete AttributeAllow Owner
Symmetric KeyObtain LeaseAllow Owner
Symmetric KeyGet Usage AllocationAllow Owner
Symmetric KeyActivateAllow Owner
Symmetric KeyRevokeAllow Owner
Symmetric KeyDestroyAllow Owner
Symmetric KeyArchiveAllow Owner
Symmetric KeyRecoverAllow Owner
Public KeyLocateAllow All
Public KeyCheckAllow All
Public KeyGetAllow All
Public KeyGet AttributesAllow All
Public KeyGet Attribute ListAllow All
Public KeyAdd AttributeAllow Owner
Public KeyModify AttributeAllow Owner
Public KeyDelete AttributeAllow Owner
Public KeyObtain LeaseAllow All
Public KeyActivateAllow Owner
Public KeyRevokeAllow Owner
Public KeyDestroyAllow Owner
Public KeyArchiveAllow Owner
Public KeyRecoverAllow Owner
Private KeyRekeyAllow Owner
Private KeyRekey Key PairAllow Owner
Private KeyDerive KeyAllow Owner
Private KeyLocateAllow Owner
Private KeyCheckAllow Owner
Private KeyGetAllow Owner
Private KeyGet AttributesAllow Owner
Private KeyGet Attribute ListAllow Owner
Private KeyAdd AttributeAllow Owner
Private KeyModify AttributeAllow Owner
Private KeyDelete AttributeAllow Owner
Private KeyObtain LeaseAllow Owner
Private KeyGet Usage AllocationAllow Owner
Private KeyActivateAllow Owner
Private KeyRevokeAllow Owner
Private KeyDestroyAllow Owner
Private KeyArchiveAllow Owner
Private KeyRecoverAllow Owner
Split KeyRekeyAllow Owner
Split KeyRekey Key PairAllow Owner
Split KeyDerive KeyAllow Owner
Split KeyLocateAllow Owner
Split KeyCheckAllow Owner
Split KeyGetAllow Owner
Split KeyGet AttributesAllow Owner
Split KeyGet Attribute ListAllow Owner
Split KeyAdd AttributeAllow Owner
Split KeyModify AttributeAllow Owner
Split KeyDelete AttributeAllow Owner
Split KeyObtain LeaseAllow Owner
Split KeyGet Usage AllocationAllow Owner
Split KeyActivateAllow Owner
Split KeyRevokeAllow Owner
Split KeyDestroyAllow Owner
Split KeyArchiveAllow Owner
Split KeyRecoverAllow Owner
TemplateLocateAllow Owner
TemplateGetAllow Owner
TemplateGet AttributesAllow Owner
TemplateGet Attribute ListAllow Owner
TemplateAdd AttributeAllow Owner
TemplateModify AttributeAllow Owner
TemplateDelete AttributeAllow Owner
TemplateDestroyAllow Owner
Secret DataRekeyAllow Owner
Secret DataRekey Key PairAllow Owner
Secret DataDerive KeyAllow Owner
Secret DataLocateAllow Owner
Secret DataCheckAllow Owner
Secret DataGetAllow Owner
Secret DataGet AttributesAllow Owner
Secret DataGet Attribute ListAllow Owner
Secret DataAdd AttributeAllow Owner
Secret DataModifyAllow Owner
Secret DataDelete AttributeAllow Owner
Secret DataObtain LeaseAllow Owner
Secret DataGet Usage AllocationAllow Owner
Secret DataActivateAllow Owner
Secret DataRevokeAllow Owner
Secret DataDestroyAllow Owner
Secret DataArchiveAllow Owner
Secret DataRecoverAllow Owner
Opaque DataRekeyAllow Owner
Opaque DataRekey Key PairAllow Owner
Opaque DataDerive KeyAllow Owner
Opaque DataLocateAllow Owner
Opaque DataCheckAllow Owner
Opaque DataGetAllow Owner
Opaque DataGet AttributesAllow Owner
Opaque DataGet Attribute ListAllow Owner
Opaque DataAdd AttributeAllow Owner
Opaque DataModify AttributeAllow Owner
Opaque DataDelete AttributeAllow Owner
Opaque DataObtain LeaseAllow Owner
Opaque DataGet Usage AllocationAllow Owner
Opaque DataActivateAllow Owner
Opaque DataRevokeAllow Owner
Opaque DataDestroyAllow Owner
Opaque DataArchiveAllow Owner
Opaque DataRecoverAllow Owner
PGP KeyRekeyAllow Owner
PGP KeyRekey Key PairAllow Owner
PGP KeyDerive KeyAllow Owner
PGP KeyLocateAllow Owner
PGP KeyCheckAllow Owner
PGP KeyGetAllow Owner
PGP KeyGet AttributesAllow Owner
PGP KeyGet Attribute ListAllow Owner
PGP KeyAdd AttributeAllow Owner
PGP KeyModify AttributeAllow Owner
PGP KeyDelete AttributeAllow Owner
PGP KeyObtain LeaseAllow Owner
PGP KeyGet Usage AllocationAllow Owner
PGP KeyActivateAllow Owner
PGP KeyRevokeAllow Owner
PGP KeyDestroyAllow Owner
PGP KeyArchiveAllow Owner
PGP KeyRecoverAllow Owner

public policy

Object TypeOperationPermission
TemplateLocateAllow All
TemplateGetAllow All
TemplateGet AttributesAllow All
TemplateGet Attribute ListAllow All
TemplateAdd AttributeDisallow All
TemplateModify AttributeDisallow All
TemplateDelete AttributeDisallow All
TemplateDestroyDisallow All