mbp-1043: gate AzureClientIdRequestFilter on config property - #9
Closed
p-rog wants to merge 1 commit into
Closed
Conversation
The filter unconditionally injects client_id into OIDC token exchange requests containing a client_assertion. This breaks Keycloak's federated-jwt authenticator, which requires client_id to match the JWT sub claim (the SPIFFE URI), not the OIDC client ID. Add a qtodo.oidc.inject-client-id config property (default false) so the filter only activates when explicitly enabled. The Helm chart companion change sets QTODO_OIDC_INJECT_CLIENT_ID=true only when the OIDC provider is entraid. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
@p-rog with the incorporation of validatedpatterns/layered-zero-trust#160, I believe this PR can be closed |
Author
|
Closing this PR in favor of validatedpatterns/layered-zero-trust#160 patch. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem:
The AzureClientIdRequestFilter (added in PR #8 for Entra ID support) unconditionally injects client_id into every OIDC token exchange request that contains a client_assertion. This breaks Keycloak deployments using federated-jwt client authentication — Keycloak requires
client_idto match the JWT sub claim, which is the SPIFFE URI (spiffe://...), not the OIDC client ID (qtodo-app).Result: every login attempt fails with "client_id parameter does not match sub claim" (HTTP 400).
Fix: Add a qtodo.oidc.inject-client-id config property (default false) to the filter. When false, the filter skips injection entirely. The Helm chart companion change (in layered-zero-trust) sets QTODO_OIDC_INJECT_CLIENT_ID=true only when provider == "entraid".