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

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

Merged
merged 4 commits into from Jul 9, 2021
Merged

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

merged 4 commits into from Jul 9, 2021

Conversation

bojeil-google
Copy link
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 as a code owner 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
tests/test_downscoped.py Outdated Show resolved Hide resolved
tests/test_downscoped.py Outdated Show resolved Hide resolved
tests/test_downscoped.py Outdated Show resolved Hide resolved
tests/test_downscoped.py Outdated Show resolved Hide resolved
@arithmetic1728 arithmetic1728 merged commit 2f5c3a6 into googleapis:master Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants