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: Missing full payload in identity token from GCECredentials #526

Open
Januznl opened this issue Jan 23, 2024 · 2 comments
Open

feat: Missing full payload in identity token from GCECredentials #526

Januznl opened this issue Jan 23, 2024 · 2 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@Januznl
Copy link

Januznl commented Jan 23, 2024

Is your feature request related to a problem? Please describe.
We are missing the email of the authorized party when we decode the identity token on Cloud Run in PHP.

At this moment the PHP implementation of the GCECredential class is missing the full payload param on the identity token metadata server request. This is already in place in other SDK's like the python SDK:

https://github.com/googleapis/google-auth-library-python/blob/9cd67425e95faab15e57b258a70506b02bccb799/google/auth/compute_engine/credentials.py#L391

Describe the solution you'd like
My suggestion would be to add the param format=full for requests going to v1/instance/service-accounts/default/identity

@bshaffer
Copy link
Contributor

Hello! Thank you for your suggestion.

We can add format=full to the GCECredentials request to get the ID Token, but I am not sure how the extra payload would be used / consumed by our customers. Also, which claim specifically are you looking for?

@bshaffer bshaffer added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Feb 26, 2024
@Januznl
Copy link
Author

Januznl commented Feb 29, 2024

We are missing the field "email" which holds the service account which generated the token. This allows us to identify which service is calling our cloud run app. The cloud-run app uses this service account email to apply in app permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants