-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BBR backup CredHub fails due to hostname verification failure with internal postgres server's certificate #229
Comments
Hey @peterhaochen47 , I was able to find a Workaround, see my notes below on Potential Fix 1) and 2). Potential Fix 1)This suggestion did not work for me. After adding
to my concourse manifest, re-deploying, and performing the backup - I received the following error: In the above screenshot, the BOSH DNS Name is used. However, the Full DNS name is returned. Unfortunately, it still does not match the Common Name that is used on the postgres server certificate. There is another property in the bosh docs for When adding this property to the manifest and re-deploying Concourse, the deployment fails when it starting the Potential Fix 2)I was able to get Potential Fix 2) working using the bbr-postgres-db Job from the postgres bosh release The bbr-postgres-db job has a property to disable SSL Hostname Verfication: It appears there is no option that exists for this in the bbr-credhubdb job, which is why the backup fails with the hostname verification error when consuming this job from the credhub release Below are the steps I implemented:
After taking the backup, I untarred the tgz/tar file and I could see the
Let me know if you have any questions on this workaround. I hope this helps! |
After speaking with Bosh team, solution#3 is not feasible as bosh links doesn't support returning IP and DNS hostname at the same time. So it seems @mjenk664 's potential solution#2 is the best so far. At least you can keep the |
Steps to reproduce:
psql: server certificate for "q-s0.db.concourse.concourse.bosh" does not match host name "192.168.1.152".
And see that CredHub produces a bbr config json that looks like (where the host is an IP address):
Diagnosis
postgres
server will be deployed with a certificate generated by the config specified in cluster/operations/secure-internal-postgres.yml. We verified that the generated server cert will have the DNS address as its Common Name and SAN:database
provided by the internalpostgres
job. CredHub BBR job accesses it viaDATABASE-LINK.instances[0].address
.DATABASE-LINK.instances[0].address
may return an IP address (eg:192.168.1.152
) or a DNS address (eg:q-s0.db.concourse.concourse.bosh
) (See bosh link doc and DNS link). In this case,DATABASE-LINK.instances[0].address
returns an IP address.verify-full
sslmode). But since the postgres server cert only has the DNS address (q-s0.db.infra.concourse-colocated.bosh
) as its Common Name & SAN. The hostname verification fails.Related
Related issue reported by other here
Potential Fixes:
features.use_dns_addresses
deployment manifest property (see doc) so thatSOME-DB-LINK.instances[0].address
returns a DNS address.verify-full
sslmode, which includes the hostname verification, is not required when using a local CA or self-signed certscc: @bruce-ricard
The text was updated successfully, but these errors were encountered: