fix(oidc): Az single tenant handling via oidc_jwks_uri#1015
fix(oidc): Az single tenant handling via oidc_jwks_uri#1015dbnsky wants to merge 1 commit intodfir-iris:masterfrom
Conversation
WalkthroughThis PR adds support for manual OIDC JWKS URI configuration alongside existing auto-discovery. A new configuration parameter is introduced, and the OIDC handler is updated to conditionally use the provided JWKS URI or fall back to auto-discovery, with improved error handling and logging. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR modifies the OIDC client initialization logic in oidc_handler.py to support Azure Active Directory's specific key discovery requirements. It implements logic to automatically normalize the Issuer URL and dynamically patch the JWKS URI with the client_id when Azure AD is detected.
Motivation
Often signs tokens with keys that are not present in the standard OpenID Connect
jwks_uri. These specific keys are only exposed when querying the JWKS endpoint with an?appid=<client_id>parameter. Without this parameter, the application fails to verify token signatures (NoSuitableSigningKeys). Additionally, strict string matching on the Issuer URL caused authentication failures if the configuration contained a trailing slash (Unknown Issuer).Changes
client_idis automatically appended to thejwks_uri(e.g.,.../keys?appid=xyz).Benefits
Issue #1014
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.