KOMODO_OIDC_ALLOW_ADDITIONAL_AUDIENCES environment variable to allow an arbitrary list of audiences as long as client_id is present #1075
+18
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When setting up Komodo with my IdP (Zitadel cloud), I realized Zitadel returns many audience entries depending on configured projects, authorizations, etc. It was effectively pointless to try and authorize each audience value since they may regularly and individually be added or removed from the token.
I added an environment variable to automatically trust any audience included in the token, AS LONG AS the client_id is one of them. My understanding of the OIDC spec is that a client MUST reject a token that does not include the client_id, but MAY reject a token with additional audiences.
There is no change to the logic of including additional audiences other than the fact that a "true" value for KOMODO_OIDC_ALLOW_ADDITIONAL_AUDIENCES will allow any audiences. A "false" (the default) value will continue to function as it does today