HTML5 Gateway: Replacing an expired certificate (Docker implementation)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PAM Self-Hosted Articles
4 min read
L3 Networker
No ratings
This article details the process to replace an expired certificate on an HTML5 Gateway that is a Docker implementation

Issue

1. Note the previously used 'docker run' command. It will be similar to

sudo docker run --restart unless-stopped -ti -p 443:8443 -v /opt/cert/:/opt/import:ro --cap-drop=all --cap-add={CHOWN,DAC_OVERRIDE,FOWNER,SETGID,SETUID} -e AcceptCyberArkEULA=yes -e GWCert=lab-html5.cer -e GWKey=lab-html5.key -e GWCAFile=cachain.pem -e EnableJWTValidation=no -e IgnorePSMCertificateErrors=yes --hostname lab-html5.timslab.tsawyer.local --name lab-html5.timslab.tsawyer.local cahtml5gw:12_2_5_8

 

Note the location of the certificates (in the above example, /opt/cert)

Note the GWCAFile used (in the above example, this is the GWCAFile parameter)

2. On the HTML5 gateway, stop and delete the current container

docker kill <container name>

docker rm <container name>

 

Where <container name> is the name of your HTML5 container

3. On the HTML5 gateway, run the following command:

openssl req -newkey rsa:2048 -nodes -keyout <path to private key> -out <path to CSR>

4. Take the new CSR and send to your CA for signing

5. Get the signed certificate from the CA and copy it to the HTML5 gateway

6. Make sure the new key and certificate are copied to the directory noted in the 'docker run' command

7. If the CA path (i.e. Root CA, intermediate CA) has changed, you will need to create a new PEM file containing the root and intermediate CA. Basically this is the Base 64 representation of all the CA certificates in a single file. The root CA should be the first in the file, followed by the intermediate CA. The filename will be used in the GWCAFile parameter (see step 1)

8. Start the docker container using the 'sudo docker run' command. It is recommended to run this interactively during testing. Once testing is complete and successful, you can stop and remove the container, then run a new container in the background - essentially, this is replacing the '-ti -p' with 'ti -d -p'

Environment

PSM PSM HTML5 Gateway

Steps

1. Note the previously used 'docker run' command. It will be similar to

sudo docker run --restart unless-stopped -ti -p 443:8443 -v /opt/cert/:/opt/import:ro --cap-drop=all --cap-add={CHOWN,DAC_OVERRIDE,FOWNER,SETGID,SETUID} -e AcceptCyberArkEULA=yes -e GWCert=lab-html5.cer -e GWKey=lab-html5.key -e GWCAFile=cachain.pem -e EnableJWTValidation=no -e IgnorePSMCertificateErrors=yes --hostname lab-html5.timslab.tsawyer.local --name lab-html5.timslab.tsawyer.local cahtml5gw:12_2_5_8

Note the location of the certificates (in the above example, /opt/cert)

Note the GWCAFile used (in the above example, this is the GWCAFile parameter)

 

2. On the HTML5 gateway, stop and delete the current container

docker kill <container name>

docker rm <container name>

Where <container name> is the name of your HTML5 container

There are multiple options from here. see steps 3a-5a or 3b to 5b
3a.  On the HTML5 gateway, run the following command:
openssl req -newkey rsa:2048 -nodes -keyout <path to private key> -out <path to CSR>
4a. Take the new CSR and send to your CA for signing
5a. Get the signed certificate from the CA and copy it to the HTML5 gateway
-----
3b. On the HTML5 gateway, run the following command:
openssl req -newkey rsa:2048 -nodes -keyout <path to private key> -out <path to CSR>

4b. Take the new CSR and send to your CA for signing.
5b. Get the signed certificate from the CA and copy it to the HTML5 gateway.
------
6. Make sure the new key and certificate are copied to the directory noted in the 'docker run' command.

7. If the CA path (i.e. Root CA, intermediate CA) has changed, you will need to create a new PEM file containing the root and intermediate CA. Basically this is the Base 64 representation of all the CA certificates in a single file. The root CA should be the first in the file, followed by the intermediate CA. The filename will be used in the GWCAFile parameter (see step 1)

8. Start the docker container using the sudo docker run command (see step 1). It is recommended to run this interactively during testing. Once testing is complete and successful, you can stop and remove the container, then run a new container in the background - essentially, this is replacing the '-ti -p' with 'ti -d -p'

Rate this article:
  • 5207 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎07-22-2022 08:35 AM
Updated by: