Enabling Custom Certificates from SDK
Protegrity Anonymization API uses certificates for secure communication with the client. You can use the certificates provided by Protegrity or use your own certificates. Complete the configurations provided in this section to use your custom certificates with the SDK.
Before you begin
Ensure that the certificates and keys are in the .pem format.
Note: If you want to use the default Protegrity certificates for the Protegrity Anonymization API, then skip the steps to set up the certificates provided in this section.
Complete the configuration on the machine where the Protegrity Anonymization API SDK will be used.
a. Create a directory that is named .pty_anon in the directory from where the SDK will run.
b. Create certs in the.pty_anondirectory.
c. Create generated-certs in thecertsdirectory.
d. Create ca-cert in thegenerated-certsdirectory.
e. Create cert in thegenerated-certsdirectory.
f. Create key in thegenerated-certsdirectory.
g. Copy the client certificates and key to the respective directories in the.pty_anon/certs/ generated-certsdirectory.
The directory structure will be as follows:.pty_anon/certs/generated-certs/ca-cert/CA-xyz-cert.pem .pty_anon/certs/generated-certs/key/xyz-key.pem .pty_anon/certs/generated-certs/cert/xyz-cert.pemMake sure that you are using valid certificates. Users can validate the certificates using the commands provided in the section Working with certificates.
h. Create a
config.yamlfile in the.pty_anondirectory with the following Ingress Endpoint defined underCLUSTER_ENDPOINT. TheBUCKET_NAME,ACCESS_KEY, andSECRET_KEYare the default details that are used to communicate with the S3 bucket container for reading and writing files from SDK.STORAGE: CLUSTER_ENDPOINT: https://anon.protegrity.com/ BUCKET_NAME: 'anonstorage' ACCESS_KEY: 'anonuser' SECRET_KEY: 'protegrity'Note: Ensure that you replace anon.protegrity.com with your host name specified in values.yaml. Also, ensure that you update the default credentials if you have used your own secret.
Updating the hosts file.
a. Log in to the machine where the Protegrity Anonymization API SDK will be used.
b. Update the hosts file with the following code according to your setup.For Kubernetes:
<LB-IP of Ingress> <host defined for ingress in values.yaml>For Docker:
<LB-IP of Ingress> <server_name defined in nginx.conf>For example,
XX.XX.XX.XX anon.protegrity.com
The URL can now be used while creating the Connection Object in the SDK, such as, conn = anonsdk.Connection(“https://anon.protegrity.com/").
Feedback
Was this page helpful?