-
Notifications
You must be signed in to change notification settings - Fork 191
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
cmd/krp/app,pkg/authn: make OIDC token aud agnostic #343
base: sig-auth-acceptance
Are you sure you want to change the base?
Conversation
I don't see a reason why we would want to allow OIDC authenticator responses to not contain audiences. |
I know what you mean. I am not sure as well, but this is how I understood it. |
That is not what "audience agnostic" means. Audience agnostic means that the authenticator never returns an |
Hm, this part of WrapAudienceAgnosticToken would make all of this a no-op unless something is also calling |
@enj, yes this is a programmatic representation of my confusion. I asked you about that no-op a couple of months ago, but I think I might have missed something. AFAIU, the audience of the ID token in the OIDC spec is the client ID. It is being checked by the apiserver, if not skipped. This is nice and useful, but it doesn't specify any of our own audiences, like we are used to have in Service Account Tokens (as you highlighted in your references / previous PRs). This means it wouldn't make sense for us to "verify audiences" as that check:
But I am not quite sure how and where to make our code "audience agnostic" in that use case. The Therefore I assumed some ... current no-op... that might be future proof, in case that audiences are enforced at some point and it is already best practice to respect that? |
I think this all comes down to:
My gut says that either way will be fine, so if you prefer to do #329 since it is simpler, I am fine with that. If you go with this PR, then I think |
What
Make OIDC authenticator audience agnostic.
Why
Mo said so. And I assume the point is that the aud in an ID token will be the client ID and the overwrites the classical meaning of an "audience".