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

Getting OIDC token with service account email as sunject instead of numeric unique id #2018

Closed
amitronen1 opened this issue Dec 21, 2021 · 3 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@amitronen1
Copy link

Hello,
i'm trying to get an OIDC token for a service account on .NET using this method GetOidcTokenAsync and i'm successful. Unfortunately i require that the "subject" property will be populated with the service account email, and not the unique numeric id.
i came across this example which allows that by signing the JWT manually, but unfortunately i do not have access to the SA private key as i authenticate to it using impersonation.

what can i do?

thanks!

@amitronen1 amitronen1 added priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue. labels Dec 21, 2021
@jskeet
Copy link
Collaborator

jskeet commented Dec 21, 2021

Assigned to Amanda who knows more about this than I do, but we're both on vacation until the new year at this point, so please be patient.

@amanda-tarafa
Copy link
Contributor

I think you might find what you are looking for in #2011, you can use the IAM API to sign the JWT token with the impersonated service account.
Let me know if you need more details and I'll try to provide them later.

@amitronen1
Copy link
Author

Thanks Amanda this was highly helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants