-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
(7.0) Add Postgres Cloud SQL support #5941
Conversation
@awly Could you please be a 2nd reviewer on this when you get time? Thanks. |
lib/service/cfg.go
Outdated
// TODO(r0mant): See if we can download it automatically similar to RDS | ||
// but at a first glance it doesn't seem to be possible since in Cloud | ||
// SQL each instance has its own CA and there doesn't appear to be an | ||
// API for that. |
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.
There's a serverCaCert
in https://cloud.google.com/sql/docs/postgres/instance-info#rest-v1beta4
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.
Good find, I've updated the comment to include this link. Looking at this API, it just returns information about the certificate in a parsed form and I couldn't see if there's a "raw" pem, but maybe there's another API to call to retrieve certificate by its ID or something. Will investigate more when we work on this todo item.
@a-palchikov @awly I've addressed your comments guys, please take another look. |
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.
Bot.
This PR extends database access to support Postgres flavored GCP Cloud SQL databases with IAM authentication:
https://cloud.google.com/sql/docs/postgres/authentication
It works in a similar fashion to RDS and Aurora:
Here's an example
teleport.yaml
configuration for a Cloud SQL instance:Also, IAM authentication is a relatively new Cloud SQL feature and is currently supported only by Postgres. Once it expands to MySQL, we'll be able to enable it for MySQL as well.