Conversation
Roadmap #174. `VerifyIDToken` matched `iss` exactly, so a multi-tenant provider (Azure AD common/organizations) — whose tokens carry a per-tenant issuer — could never validate. - `Config.IssuerValidator func(issuer string) bool`: optional predicate that replaces the exact match. **Nil by default → exact match against `Provider.Issuer` unchanged** (secure default). - A provider is OIDC-valid with JWKS + (fixed `Issuer` OR `IssuerValidator`). - `AzureMultiTenantIssuer()` accepts any `https://login.microsoftonline.com/<tenant>/v2.0` issuer; docs pair it with a `tid`-claim allowlist to restrict tenants. - Only the issuer check is delegated — signature, audience, expiry and nonce are still enforced. Tests: validator accepts the approved per-tenant issuer and fails closed when it rejects; `AzureMultiTenantIssuer` accepts a valid v2.0 issuer and rejects google/common/v1.0/http. `go build`, `go vet`, `golangci-lint` (0 issues) and the full suite with `-race` pass. Closes #174 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Jaro-c
enabled auto-merge
June 29, 2026 18:07
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.
Release v1.11.0 — multi-tenant OIDC. No breaking changes.
Config.IssuerValidator(oauth: support multi-tenant issuer validation (Azure common/organizations) #174). An optional predicate that replaces the exactissmatch, so a multi-tenant provider (Azure AD common/organizations) whose tokens carry a per-tenant issuer can be verified. Nil by default — exact match unchanged.AzureMultiTenantIssuer()accepts any Azure v2.0 per-tenant issuer; pair with atidallowlist to restrict tenants. Signature/audience/expiry/nonce still enforced.