-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make oidc authenticator audience agnostic
This change removes the audience logic from the oidc authenticator and collapses it onto the same logic used by other audience unaware authenticators. oidc is audience unaware in the sense that it does not know or understand the API server's audience. As before, the authenticator will continue to check that the token audience matches the configured client ID. The reasoning for this simplification is: 1. The previous code tries to make the client ID on the oidc token a valid audience. But by not returning any audience, the token is not valid when used via token review on a server that is configured to honor audiences (the token works against the Kube API because the audience check is skipped). 2. It is unclear what functionality would be gained by allowing token review to check the client ID as a valid audience. It could serve as a proxy to know that the token was honored by the oidc authenticator, but that does not seem like a valid use case. 3. It has never been possible to use the client ID as an audience with token review as it would have always failed the audience intersection check. Thus this change is backwards compatible. It is strange that the oidc authenticator would be considered audience unaware when oidc tokens have an audience claim, but from the perspective of the Kube API (and for backwards compatibility), these tokens are only valid for the API server's audience. This change seems to be the least magical and most consistent way to honor backwards compatibility and to allow oidc tokens to be used via token review when audience support in enabled. Signed-off-by: Monis Khan <mok@vmware.com>
- Loading branch information
Showing
4 changed files
with
5 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters