cterasdk.core.kms module#

class cterasdk.core.kms.KMS(portal)#

Bases: BaseCommand

External Key Management APIs :ivar cterasdk.core.kms.KMS servers: Object holding the Portal External Key Management Server APIs

disable()#

Disable Key Management Service

enable(private_key, client_certificate, server_certificate, expiration=None, timeout=None, port=None)#

Enable Key Management Service

Parameters:
  • private_key (str) – The PEM-encoded private key, or a path to the PEM-encoded private key file

  • client_certificate (str) – The PEM-encoded client certificate, or a path to the certificate file

  • server_certificate (str) – The PEM-encoded KMS server certificate, or a path to the certificate file

  • expiration (int,optional) – Key expiration in days, defaults to 365.

  • timeout (int,optional) – Connection timeout in seconds, defaults to 2

  • port (int,optional) – Key server port, defaults to 5696

modify(private_key=None, client_certificate=None, server_certificate=None, expiration=None, timeout=None, port=None)#

Modify Key Management Service Settings

Parameters:
  • private_key (str,optional) – The PEM-encoded private key, or a path to the PEM-encoded private key file

  • client_certificate (str,optional) – The PEM-encoded client certificate, or a path to the certificate file

  • server_certificate (str,optional) – The PEM-encoded KMS server certificate, or a path to the certificate file

  • expiration (int,optional) – Key expiration in days, defaults to 365.

  • timeout (int,optional) – Connection timeout in seconds, defaults to 2

  • port (int,optional) – Key server port, defaults to 5696

settings()#

Get Key Management Service Settings

status()#

Get Key Management Service Status

class cterasdk.core.kms.KMSServers(portal)#

Bases: BaseCommand

External Key Management Server APIs

add(name, ipaddr)#

Add a key-server

Parameters:
  • name (str) – Key-server name

  • ipaddr (str) – Key-server IP address

all()#

List Key Management Servers

delete(name)#

Remove a key-server

Parameters:

name (str) – Key-server name

get(name)#

Retrieve a key-server

Parameters:

name (str) – Key-server name

modify(current_name, new_name)#

Remove a key-server

Parameters:
  • current_name (str) – Key-server current name

  • new_name (str) – Key-server new name