Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: define google.auth.downscoped.Credentials class#801

Merged
arithmetic1728 merged 4 commits intogoogleapis:masterfrom
bojeil-google:cab-credentials
Jul 9, 2021
Merged

feat: define google.auth.downscoped.Credentials class#801
arithmetic1728 merged 4 commits intogoogleapis:masterfrom
bojeil-google:cab-credentials

Conversation

@bojeil-google
Copy link
Copy Markdown
Contributor

This is based on Downscoping with Credential Access Boundaries.
The new credentials are initialized mainly using elevated source
credentials and a google.auth.downscoped.CredentialAccessBoundary
instance.
The credentials will then get access tokens from the source
credentials and exchange them via the GCP STS token exchange
endpoint using the provided credentials access boundary rules
for downscoped access tokens.

The new credentials will inherit the source credentials' scopes
but the scopes are not exposed as we cannot always determine the
scopes form the source credentials.

This is based on [Downscoping with Credential Access Boundaries](https://cloud.google.com/iam/docs/downscoping-short-lived-credentials).
The new credentials are initialized mainly using elevated source
credentials and a `google.auth.downscoped.CredentialAccessBoundary`
instance.
The credentials will then get access tokens from the source
credentials and exchange them via the GCP STS token exchange
endpoint using the provided credentials access boundary rules
for downscoped access tokens.

The new credentials will inherit the source credentials' scopes
but the scopes are not exposed as we cannot always determine the
scopes form the source credentials.
@bojeil-google bojeil-google requested a review from a team July 9, 2021 05:46
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 9, 2021
Comment thread tests/test_downscoped.py Outdated
Comment thread tests/test_downscoped.py Outdated
Comment thread tests/test_downscoped.py Outdated
Comment thread tests/test_downscoped.py Outdated
@arithmetic1728 arithmetic1728 merged commit 2f5c3a6 into googleapis:master Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants