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

Refactor IDToken source for compute_engine - #362

Closed
salrashid123 wants to merge 2 commits into
googleapis:masterfrom
salrashid123:add-compute-id-token
Closed

Refactor IDToken source for compute_engine#362
salrashid123 wants to merge 2 commits into
googleapis:masterfrom
salrashid123:add-compute-id-token

Conversation

@salrashid123

Copy link
Copy Markdown
Contributor

Fixes #344

and as a continuation of #347

_ do not merge_

This PR alters the internal behavior of how an IDToken is acquired through compute_engine credentials. Previously, an idtoken was acquired through (basically) the IAM api and impersonation. This credential type shoudl get the id_token from the metadata server. This change alters the source of the token but keeps the IAM signer capability for now.

The token format returned by metadata may include additional fields but in its defaults, is in the same IDToken format provided by the existing IAM credentials signer mechanism. This pr basically ignores one of the exiting parameters provided, additioal_claims=, since that would not work anyway with any credential type.

@salrashid123

Copy link
Copy Markdown
Contributor Author

Any thought about this proposed change?

the impact as i see it shouldn't be much. Existing users on compute would've had to enable the IAM api, grant impersonation and then get an id_token via signing and exchanging. The idtoken would represent the source service account from the GCE instance itself (like what w'ere doing here).

I'm leaving the Signer capability in now since people would be using it to do stuff like signURL...eventually, that shoudl also get deprecated but that'll be for later

@busunkim96 busunkim96 closed this Jul 31, 2020
@busunkim96 busunkim96 reopened this Jul 31, 2020
@parthea

parthea commented Aug 14, 2021

Copy link
Copy Markdown
Contributor

Hi @salrashid123 , I'm going to close this PR due to inactivity but please feel free to re-open it.

@parthea parthea closed this Aug 14, 2021
@salrashid123

Copy link
Copy Markdown
Contributor Author

@salrashid123
salrashid123 deleted the add-compute-id-token branch August 16, 2021 18:03
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.

compute_engine.IDTokenCredentials should use Metadata server and not IAMCredentials API

4 participants