Skip to content
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

maint: add the AWS RDS cert bundles #328

Closed

Conversation

coreypurcell
Copy link
Contributor

@coreypurcell coreypurcell commented Oct 2, 2024

Reopening #238

This PR will add RDS CA bundle to the stacks. This will allow customers to set their postgres connections to verify-full when connecting to a essential tier database. I opted not to chain the commands together into a list. I found that it made debugging failures much harder. For some reason 22 needed to have ca-certificates package added, without it the wget will fail and the update-ca-certificates will not exist

Testing

Before changes

root@aecdd0b8a9ae / [heroku/heroku:24]
docker > psql 'postgres://udkn8531065hs2:<redacted>@c4fuk4g4mva0ni.cluster-cmgvywijhzgr.us-east-1.rds.amazonaws.com:5432/d7434taaso5gbu?sslmode=verify-full&sslrootcert=system'
psql: error: connection to server at "c4fuk4g4mva0ni.cluster-cmgvywijhzgr.us-east-1.rds.amazonaws.com" (100.64.1.39), port 5432 failed: SSL error: certificate verify failed

Built the images
Ran this pattern in all 3 images

docker run -it --rm --platform=linux/amd64 33f6435378c7 bash
root@13d8683a53ca:/# psql 'postgres://udkn8531065hs2:<redacted>@c4fuk4g4mva0ni.cluster-cmgvywijhzgr.us-east-1.rds.amazonaws.com:5432/d7434taaso5gbu?sslmode=verify-full&sslrootcert=system'
psql (16.4 (Ubuntu 16.4-1.pgdg22.04+2), server 15.7)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

root@6cf200a37298:/# curl -s https://cdn.azul.com/zulu/bin/zulu17.40.19-ca-jdk17.0.6-linux_x64.tar.gz | tar xz
root@6cf200a37298:/# zulu17.40.19-ca-jdk17.0.6-linux_x64/bin/keytool -list -v -keystore /etc/ssl/certs/java/cacerts | grep "Amazon RDS" | grep "Owner" | wc -l
Enter keystore password:
...

100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants