-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix(auth): use the full format for the JWT payload in IAPToken #765
Conversation
373225a
to
b3804a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find!
auth/pyproject.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[tool.poetry] | |||
name = "gcloud-aio-auth" | |||
version = "5.3.1" | |||
version = "5.3.2a0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friendly non alpha reminder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
➕ HOSTILE PLUS ONE REPLY COMMENT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ approved: fix authentication
Some of the GCP products when retrieving the JWT token from the GCE Metadata Server come with the `email` claim, but some have recently started not returning that claim as part of the JWT payload. Adding the `format=full` query parameter to the GCE Metadata Server API seems to return the `email` claim for these cases, along with other GCE Metadata which for the time being we do not need and thus, we discard. [See these docs for more information.](https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature)
b3804a7
to
864033e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find!
Summary
Some of the GCP products when retrieving the JWT token from the GCE
Metadata Server come with the
email
claim, but some have recentlystarted not returning that claim as part of the JWT payload. Adding the
format=full
query parameter to the GCE Metdata Server API seems toreturn the
email
claim for these cases, along with other GCE Metadatawhich for the time being we do not need and thus, we discard.
See these docs for more
information.