PKI 10.8 Python Changes

From Dogtag
Revision as of 16:23, 9 September 2019 by Edewata (talk | contribs) (pki.client.PKIConnection)

Jump to: navigation, search

Changes in PKIConnection

Previously the subsystem name had to be specified when creating the connection object, limiting the use of the connection object to a specific subsystem only. For example:

ca_connection = PKIConnection(hostname='localhost', port='8080', subsystem='ca')
cert_client = CertClient(ca_connection)
certs = ca_connection.get('/rest/certs')

kra_connection = PKIConnection(hostname='localhost', port='8080', subsystem='kra')
key_client = KeyClient(kra_connection)
keys = kra_connection.get('/rest/keys')

Since PKI 10.8 the subsystem should be specified when creating the objects instead, allowing the connection object to be used with various subsystems. For example:

connection = PKIConnection(hostname='localhost', port='8080')

cert_client = CertClient(connection, subsystem='ca')
certs = connection.get('/ca/rest/certs')

key_client = KeyClient(kra_connection, subsystem='kra')
keys = connection.get('/kra/rest/keys')

See Also