You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
141454: roachprod: refactor IAP authentication r=DarrylWong a=golgeek
Previously, the authentication mechanism for testeng Identity-Aware Proxy protected endpoints was relying on a shared service account key accessed via an encrypted GCS bucket. This was causing the need for secret rotation and was limiting auditability as everyone was using the same JSON key that was cached in the `~/.roachprod` directory.
This patch introduces a new mechanism based on short-lived OAuth tokens and service account impersonation through the default local credentials.
The identity of the caller is determined with the following precedence:
1. `GOOGLE_EPHEMERAL_CREDENTIALS` environment variable
2. Application Default Credentials (ADC):
a) `GOOGLE_APPLICATION_CREDENTIALS` environment variable
b) Default service account (application_default_credentials.json) file
c) App Engine standard environment
d) GCE metadata server
4. `gcloud config config-helper` output
The caller needs to have the `roles/iam.serviceAccountTokenCreator` role on the service account to be able to impersonate the service account and generate short lived OAuth AccessTokens.
Both `promhelperclient` and `grafana annotations` switch to this new method, via the new `IAPTokenSourceIface` interface that handles the service account impersonation, the AccessToken caching and renewal and that provides a pre-authenticated `http.Client`.
`@cockroachdb/dev-inf,` the added dependency (`github.com/binxio/gcloudconfig`) is a helper that runs `gcloud config config-helper` to get credentials from the account logged in in gcloud without the need for application default credentials file (when someone ran `gcloud auth login`, but not `gcloud auth application-default login`).
Epic: none
Release note: None
153630: backupdest: remove IncludeManifest arg in FindAllIncrementalPaths r=kev-cao a=msbutler
Epic: none
Release note: none
153672: server: always use dropDRPCHeaderListener with drpc server r=rafiss a=shubhamdhama
Previously, the DRPC listener was conditionally created based on the DRPC setting. When DRPC was disabled, we used a noopListener that would block on Accept() until closed, effectively rejecting all DRPC connections.
In #153503 we changed the DRPC server to always run regardless of the setting, but missed updating the corresponding listener logic. This commit completes that change by always using the dropDRPCHeaderListener to properly handle incoming DRPC connections.
Fixes: #153612
Epic: none
Release note: none
Co-authored-by: Ludovic Leroux <[email protected]>
Co-authored-by: Michael Butler <[email protected]>
Co-authored-by: Shubham Dhama <[email protected]>
0 commit comments