PTA: Creating a certificate with key other than 2048
149
Created On 11/10/26 11:01 AM - Last Modified 11/10/26 16:11 PM
Objective
This article details how to create and install a PTA certificate that is higher than the default 2048 bits. Some customers may require the certificate of a greater key length which offers more security. At present, the certificateSigningRequestGeneration.sh utility (in /opt/tomcat/utility) will only create a certificate that is 2048 bits.
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.6 Privileged Access Manager (PAM, self-hosted) PTA
Procedure
The following steps can be performed on the PTA
1. Create a separate directory to hold the certificates and keys. /tmp/certs is recommended and will be used as an example in this article
2. Run the following command: 'openssl req -newkey rsa:<key size> -nodes -keyout /tmp/certs/keyname.key -out /tmp/certs/certname.csr'
a. The 'keyname.key and 'certname.csr' are only example filenames
b. The <key size> can be any multiple of 2, but 4096 is recommended
3. Take the CSR file <certname.csr> and have it signed by the CA
a. You may have to supply information for the Subject Alternate Name (SAN). It is recommended to supply the following
- Fully qualified domain name
- Host name
- IP address of the PTA
b. Determine from the CA if the signing certificate chain (intermediate CA(s), root CA) is included in the certificate.
4. Once the certificate is signed, copy the certificate plus all intermedate certificates as well as the root CA to the location where the key is located. These must all be in Base-64 encoded format
a. If the root and intermediate certificates are not part of the signed certificate, these will need to be added to the signed certificate.
b. Assuming that the certificate is /tmp/certs/certificate.cer, the root certificate is /tmp/certs/rootca.cer and there is one intermediate certificate in /tmp/certs/interca.cer:
- Append the root certificate to the new PTA certificate: 'cat /tmp/certs/rootca.cer >> /tmp/certs/certificate.cer'
- Append the intermediate certificate to the new PTA certificate: 'cat /tmp/certs/interca.cer >> /tmp/certs/certificate.cer'. Repeat this step for all intermediate certificates in the signing chain
5. Create a PKCS #12 package (this contains the certificate as well as the private key)
a. Run the following command: 'openssl pkcs12 -export -out /tmp/certs/pta_cert.pfx -inkey /tmp/certs/keyname.key -in /tmp/certs/certificate.cer'
b. When prompted, create a password for the package
6. Import the package into the PTA
a. Run the following command: '/opt/tomcat/utility/sslClientCertificateInstallationUtil.sh'
- Enter the path to the PFX file when prompted
- You will need the vault administrator password to complete the process. Assuming that the import completed and you have entered the correct vault administrator password, the vault permissions for the PTA users will be reset and the PTA service restarted