PyKMIP has to be configured to use the client certificate generated by ESKM.
-
Log in to the Postgres Linux server as user
enterprisedb.-
Log in as user
enterprisedband go to the home directory ofenterprisedb.
-
-
Install the KMIP client and the CA certificates.
-
Create the
/etc/pykmip/certsdirectory
$ sudo mkdir -p /etc/pykmip/certs -
Copy the private key, and the client and CA certificates to
etc/pykmip/certsand rename them as described here:
$ sudo cp client1.pem /etc/pykmip/certs/client_cert.pem
$ sudo cp client1.key /etc/pykmip/certs/client_private_key.pem
$ sudo cp cacert.pem /etc/pykmip/certs/server_ca_cert.pem -
Assign read permission to all users of the private key, the client, and CA certificates.
$ sudo chmod a+r /etc/pykmip/certs/*
-
-
Create/update the Python environment variable.
-
Open the
enterprisedbuser’s.bash_profilefile and add the following line to it:
$ export PYTHONPATH=$HOME/pykmip -
Source the file so the environment variable becomes available:
$ source ~/.bash_profile -
Check if the environment variable is set by executing the command below:.
$ echo $PYTHONPATH
Expected output: var/lib/edb/pykmip
-
-
Copy policy and configuration files to pykmip.
-
Copy the PyKMIP
policy.jsonfile to/etc/pykmip/policy.json.
$ sudo cp ~/pykmip/examples/policy.json /etc/pykmip/policy.json -
Copy the PyKMIP
pykmip.conffile to/etc/pykmip/pykmip.conf.
$ sudo cp ~/pykmip/examples/pykmip.conf /etc/pykmip/pykmip.conf
-
-
Edit the pykmip configuration file
/etc/pykmip/pykmip.conf.
|
Fields |
Field values |
|
host |
Provide ESKM IP address |
|
port |
No change required [5696]. |
|
keyfile |
Private key is already copied. |
|
certfile |
client_cert is already copied. |
|
cert_reqs |
No change required. |
|
ssl_version |
Change protocol to |
|
ca_certs |
CA cert is already copied. |
|
do_handshake_on_connect |
No change required. |
|
suppress_ragged_eofs |
No change required. |
|
username |
Comment this line. |
|
password |
Comment this line. |
pykmip.config file entries and changes to be made