Repository navigation
fix(oidc): omit PAR discovery metadata when disabled - #54604
Merged
Merged
Conversation
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change aligning PAR discovery metadata with feature availability.
No open issues 🎉
What changed in this PR
Aligns OpenID Connect discovery with PAR availability, addressing #54605 so clients no longer discover an endpoint that returns HTTP 404 when disabled.
Changes:
- Gates PAR discovery metadata on the feature flag, preserving enabled behavior.
- Adds integration tests for enabled and disabled PAR discovery.
- Documents the behavior change in release and upgrade notes.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/oauth/par/ParEnabledDiscoveryTest.java |
Verifies PAR metadata remains present when enabled. |
tests/base/src/test/java/org/keycloak/tests/oauth/par/ParDisabledDiscoveryTest.java |
Verifies both endpoint locations and the requirement flag are omitted when disabled. |
services/src/main/java/org/keycloak/protocol/oidc/OIDCWellKnownProvider.java |
Guards PAR metadata generation with the feature flag. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Explains absent properties and client compatibility expectations. |
docs/documentation/release_notes/topics/27_0_0.adoc |
Announces feature-aware PAR discovery behavior. |
Review effort: Balanced
mposolda
approved these changes
Nov 4, 2026
This was referenced Nov 12, 2026
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.
Disabling
parcurrently leaves its endpoint advertised in discovery even though requests return HTTP 404. Guard PAR metadata generation with the feature flag so disabled PAR omits both endpoint locations andrequire_pushed_authorization_requests, while enabled behavior stays unchanged.Includes enabled/disabled KTF regression tests and release/upgrade notes.
Validation:
./mvnw spotless:checkpassed.git diff --checkpassed.AI assistance: OpenAI Codex generated the implementation, tests, and documentation.
Closes #54605