fix: oidc multi-tenant cache collision and site applications fallback#112
Open
aymericcousaert wants to merge 4 commits intomasterfrom
Open
fix: oidc multi-tenant cache collision and site applications fallback#112aymericcousaert wants to merge 4 commits intomasterfrom
aymericcousaert wants to merge 4 commits intomasterfrom
Conversation
- use full discovery URL path (not just hostname) for OIDC provider ID, fixing cache collisions when multiple Azure AD tenants share login.microsoftonline.com - fall back to global APPLICATIONS config when a site has no applications defined, instead of only when there is no site at all
Site applications take priority on duplicate IDs, global applications are always available as a base.
… format Providers now expose a compatId (old hostname-only format) so that existing user sessions with stored coreIdProvider references still match after the ID format change.
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.
Summary
getOidcProviderIdused only the hostname from the discovery URL, causing all Azure AD tenants (which sharelogin.microsoftonline.com) to get the same provider ID. This made the first tenant's discovery content (authorization/token endpoints) be cached and reused for all other tenants, redirecting users to the wrong tenant. Fixed by including the URL path in the ID generation.APPLICATIONSenv var) and site-level applications are now merged. Site applications take priority on duplicate IDs, and global applications are always available as a base. Previously, sites with no applications could not access global ones, causing runner-gui OAuth to fail with "Unknown client_id" on secondary sites.readOnly, preventing admins from setting a specific client ID (e.g.runner-gui) via the UI. Removed thereadOnlyconstraint.Test plan
localhost:PORTare unchanged)