br icon indicating copy to clipboard operation
br copied to clipboard

Support GCP application default credentials (ADC)

Open tennix opened this issue 5 years ago • 5 comments

Feature Request

Describe your feature request related problem:

BR cannot use GCP service account temporary token.

Describe the feature you'd like:

Support GCP application default credentials (ADC) as documented here https://cloud.google.com/docs/authentication/production

When running BR on GCP VM, we can grant permissions to VM service account, and BR can use GCP SDK to retrieve temporary credentials for the service account. This avoid static credentials which increase security.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

tennix avatar Dec 04 '20 04:12 tennix

@tennix this has to be assigned to all TiKV nodes too, right?

kennytm avatar Dec 04 '20 08:12 kennytm

Yes, when deploying TiDB cluster on GCP, the node will have a service account, users can grant GCS permissions to the node's service account. No matter what service account of TiKV and BR uses, users just need to make sure the corresponding service account has the right permission. BR and TiKV can retrieve temporary credentials from GCP's meta service.

tennix avatar Dec 04 '20 10:12 tennix

Checking https://cloud.google.com/docs/authentication/production, looks like the Go part of BR already supports ADC (just don't pass the credentials-file), but the Rust part still expects a credentials blob. So it is mainly work on the Rust (TiKV) side.

kennytm avatar Dec 04 '20 10:12 kennytm

Checking cloud.google.com/docs/authentication/production, looks like the Go part of BR already supports ADC (just don't pass the credentials-file), but the Rust part still expects a credentials blob. So it is mainly work on the Rust (TiKV) side.

Yes, exactly.

tennix avatar Dec 05 '20 06:12 tennix

We'll support this by the end of next sprint (likely through gcp_auth), but we need a GCP environment to verify it.

kennytm avatar Dec 07 '20 09:12 kennytm