generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
SSL Certificates
Barrett Falk edited this page Jun 20, 2024
·
3 revisions
The following instructions are done on a Mac, though the same commands should work on Linux and Windows (though you will need to install openssl, if you don't already have it).
- Create a file named passphrase.txt with a strong password in it.
- Create a private key:
openssl genpkey -algorithm RSA -out private.key -pkeyopt rsa_keygen_bits:2048
- Create the CSR file
openssl req -new -passin file:passphrase.txt -key private.key -out natcomplaints.nrs.gov.bc.ca.csr -subj "/C=CA/ST=British Columbia/L=Victoria/O=Government of the Province of British Columbia/OU=FLNRORD/CN=natcomplaints.nrs.gov.bc.ca"
- In open shift, go to the route and copy the key and place in a file named .key
- In same directory, create a new file named passphrase.txt, with a strong password in its contents
- Run this command
openssl req -new -passin file:passphrase.txt -key natcomplaints.nrs.gov.bc.ca.key -out natcomplaints.nrs.gov.bc.ca.csr -subj "/C=CA/ST=British Columbia/L=Victoria/O=Government of the Province of British Columbia/OU=FLNRORD/CN=natcomplaints.nrs.gov.bc.ca"
- Request a new cert (e.g. https://apps.nrs.gov.bc.ca/int/jira/browse/INFRA-23115). Note, if you don't have permission to the INFRA project, you'll get a 404 or a permission denied error.
- Wait until the certificate is created.
- Once the certificate is generated, you'll get a certificate and a L1K Chain.txt file.
- Log into OpenShift and navigate to the production Vanity URL (https://console.apps.silver.devops.gov.bc.ca/k8s/ns/c1c7ed-prod/routes/natcomplaints-vanity)
- Edit the route.
- Copy and paste the generated cert in the route's certificate field.
- Copy and paste the key in the route's private key field.
- Copy and paste Plop the new cert followed by the L1K file (two certs back to back, same field)