Repository navigation
Remove ability to set up multivalued issuer for OIDC providers - #54682
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Blank legacy issuer lists can still cause entire realm imports to fail, and the realm-import and database-upgrade migration paths lack regression tests.
3 open issues
What changed in this PR
This PR addresses #54458 by restricting OIDC identity providers to one configured issuer, preventing cross-issuer subject collisions under a shared provider alias.
Changes:
- Reject comma-separated issuer configurations and use single-issuer matching for token validation and exchange.
- Migrate legacy issuer lists during database upgrades and realm imports, disabling affected providers for administrator review.
- Document the restriction and migration process, and add an admin-create rejection test.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/admin/identityprovider/IdentityProviderIssuerTest.java |
Tests rejection of multiple issuers during provider creation. |
services/src/main/java/org/keycloak/partialimport/IdentityProvidersPartialImport.java |
Reports invalid imported configurations as validation errors. |
services/src/main/java/org/keycloak/broker/oidc/OIDCIdentityProviderConfig.java |
Rejects comma-separated issuer values. |
services/src/main/java/org/keycloak/broker/oidc/OIDCIdentityProvider.java |
Matches one configured issuer during validation and exchange. |
server-spi-private/src/main/java/org/keycloak/migration/migrators/OidcIssuerMigration.java |
Migrates legacy realm-import issuer lists and disables affected providers. |
server-spi-private/src/main/java/org/keycloak/broker/provider/SingleIssuerIdentityProviderConfig.java |
Marks configurations requiring a single issuer. |
model/storage-private/src/main/java/org/keycloak/storage/datastore/DefaultExportImportManager.java |
Runs migration before import validation and wraps configuration errors. |
model/storage-private/src/main/java/org/keycloak/migration/migrators/MigrateTo27_0_0.java |
Removes a blank line; no behavioral change. |
model/jpa/src/main/resources/META-INF/jpa-changelog-27.0.0.xml |
Registers the database migration. |
model/jpa/src/main/java/org/keycloak/connections/jpa/updater/liquibase/custom/JpaUpdate27_0_0_OidcIssuerMigration.java |
Rewrites stored issuer lists and disables affected providers. |
docs/guides/securing-apps/token-exchange.adoc |
Explains separate providers for exchanging tokens from multiple issuers. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Documents migration behavior and required administrator review. |
docs/documentation/server_admin/topics/identity-broker/oidc.adoc |
Documents the single-issuer setting restriction. |
Review effort: Balanced
Closes keycloak#54458 Signed-off-by: vramik <vramik@redhat.com>
pedroigor
force-pushed
the
54458-oidc-multi-issuer-sub
branch
from
November 6, 2026 14:04
da40d30 to
83de197
Compare
pedroigor
approved these changes
Nov 6, 2026
pedroigor
enabled auto-merge (rebase)
November 6, 2026 14:12
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.

Closes #54458