There are two CredHub processes that we will need to consider:
This Knowledge Base (KB) article assumes that atc_ca and atc_tls certificates are kept in CredHub running on the BOSH Director and those certificates are now expired.
The following errors are seen if the Concourse pipeline with resource checks and builds is failing:
- /usr/local/bin/credhub login --client-name <redacted> --client-secret <redacted> UAA error: Post https:<IP-or-URL-of-web-VM>:8844/oauth/token: x509: certificate has expired or is not yet valid - /usr/local/bin/credhub get -n /bosh-master/concourse/atc_ca -k ca You are not currently authenticated. Please log in to continue.
Confirm the following before moving forward:
Example Credhub target and login commands: (Credentials can be found here Bosh Commandline Credentials" from (Ops Manager UI -> Ops Manager/Director tile -> Credentials tab -> Bosh Commandline Credentials) Commands: - export BOSH_CLIENT=ops_manager BOSH_CLIENT_SECRET=<redacted> BOSH_CA_CERT=/var/tempest/workspaces/default/root_ca_certificate BOSH_ENVIRONMENT=<redacted> - export CREDHUB_CLIENT=$BOSH_CLIENT CREDHUB_SECRET=$BOSH_CLIENT_SECRET - credhub api -s $BOSH_ENVIRONMENT:8844 --ca-cert $BOSH_CA_CERT - credhub login
tls-vars.yml ops file. For example:atc_ca and atc_tls certificates are expired by running the following CredHub get and OpenSSL commands:ATC CA certificate and copy the certificate in ca block to a file atc_ca.crt by running the following command:- credhub get -n /p-bosh/<concourse-deployment-name>/atc_ca -k ca > atc_ca.crt
- openssl x509 -in atc_ca.crt -noout -text
get the ATC TLS certificate and copy the certificate in certificate block to a file atc_tls.crt by running the following command:- credhub get -n /p-bosh/<concourse-deployment-name>/atc_tls -k certificate > atc_tls.crt
- openssl x509 -in atc_tls.crt -noout -text
1. Once you have determined that both the atc_ca and atc_tls certificates are expired, we can move forward with regenerating those certificates in the following order:
atc_ca ---> atc_tls
2. The following CredHub command will regenerate the atc_ca certificate:
credhub regenerate -n /p-bosh/<concourse-deployment-name>/atc_ca
3. After the command above executes successfully, move on to regenerate the atc_tls certificate using the following command:
credhub regenerate -n /p-bosh/<concourse-deployment-name>/atc_tls
The next step is to run a run bosh deploy by extracting the manifest of your Concourse deployment from BOSH and add the --recreate option to it. Follow the steps below to do this:
bosh -d <concourse-deployment-name> manifest > concourse-deployment-manifest.yml
--recreate flag:bosh -d <concourse-deployment-name> deploy concourse-deployment-manifest.yml --recreate
4. Finally, once the bosh deploy succeeds, run a test pipeline in Concourse to do a sanity check and then run the pipeline(s) that were throwing errors before.
Note: Remember to update the locations if you have kept the same certs somewhere else to successfully unblock any stuck pipelines. For example, CredHub running in a Concourse Web VM instance.