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

Add support for CLOUD_SDK_ACCESS_TOKEN_PATH #775

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alyshanjahani-crl
Copy link

This commit adds support for configuring the collector to authenticate with a token source that comes from a file defined by the CLOUD_SDK_ACCESS_TOKEN_PATH environment variable.

When the token expires, the token source will refresh by reading the file again. Optionally the user can set CLOUD_SDK_ACCESS_TOKEN_EARLY_EXPIRY to control when the refresh occurs.

The gcloud CLI has support for authenticating with user-supplied access tokens. See: https://issuetracker.google.com/issues/134539464#comment12

This is useful when credentials need to be generated dynamically from some centralized system that passes these scoped short-lived credentials to untrusted systems which use them to authenticate with GCP services (instead of having the untrusted system generate the credentals with some base/root credentials).

This commit adds support for configuring the collector to authenticate with
a token source that comes from a file defined by the
CLOUD_SDK_ACCESS_TOKEN_PATH environment variable.

When the token expires, the token source will refresh by reading the file
again. Optionally the user can set CLOUD_SDK_ACCESS_TOKEN_EARLY_EXPIRY to control
when the refresh occurs.

The gcloud CLI has support for authenticating with user-supplied access tokens.
See: https://issuetracker.google.com/issues/134539464#comment12

This is useful when credentials need to be generated dynamically from some
centralized system that passes these scoped short-lived credentials to
untrusted systems which use them to authenticate with GCP services (instead of
having the untrusted system generate the credentals with some
base/root credentials).
@alyshanjahani-crl alyshanjahani-crl requested a review from a team as a code owner November 23, 2023 21:00
Copy link

google-cla bot commented Nov 23, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jaylim-crl jaylim-crl deleted the alyshan-dev branch November 27, 2023 18:52
@jaylim-crl jaylim-crl restored the alyshan-dev branch November 29, 2023 14:56
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.

None yet

1 participant