-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(cloudquery): Verify RDS SSL certificate #161
Conversation
// Install RDS certificate | ||
'curl https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem -o /usr/local/share/ca-certificates/rds-ca-2019-root.crt', | ||
'update-ca-certificates', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed instructions from https://superuser.com/a/719047 to add the CA to the OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rds-ca-2019
certificate authority expires in 2024, and does not support automatic rotation, meaning we'll have to perform the rotation manually (with potential downtime).
We should move to the rds-ca-rsa2048-g1
CA, which does support automatic rotation.
See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a ticket planned to do this migration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a ticket planned to do this migration?
Not (yet) on trello, but we do have guardian/cdk#1786.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created the Trello card now - https://trello.com/c/gqPcnFh7.
746e7b5
to
ea918c0
Compare
Validate the SSL certificate on the RDS connection. To achieve this, we download and add the certificate to the OS trust store.
44beff9
to
a5a389a
Compare
What does this change?
Verify the full SSL certificate on the RDS connection.
To achieve this, we download and add the signing certificate authority (CA) to the OS trust store. This means the CA is trusted OS wide.
An alternative to this could be to set the
sslrootcert
value in the postgres connection string. Opted against that because it means we have to remember a file path, which is fragile. For example, when we move to an AMIgo recipe, we'd need to ensure these two paths line up, and stay in sync.Why?
Security!
From https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html:
How has it been verified?
sudo systemctl start cloudquery
)sudo journalctl -f -u cloudquery
OR look in Central ELK)