Skip to content

fix(oidc): omit PAR discovery metadata when disabled - #54604

Merged
mposolda merged 1 commit into
keycloak:mainfrom
slaskawi:fix/par-disabled-discovery
Nov 4, 2026
Merged

mposolda merged 1 commit into
keycloak:mainfrom
slaskawi:fix/par-disabled-discovery

Conversation

@slaskawi

@slaskawi slaskawi commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Disabling par currently 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 and require_pushed_authorization_requests, while enabled behavior stays unchanged.

Includes enabled/disabled KTF regression tests and release/upgrade notes.

Validation:

  • Two discovery integration tests passed against a freshly built distribution.
  • ./mvnw spotless:check passed.
  • git diff --check passed.

AI assistance: OpenAI Codex generated the implementation, tests, and documentation.

Closes #54605

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@mposolda
mposolda marked this pull request as ready for review November 4, 2026 08:11
@mposolda
mposolda requested a review from a team as a code owner November 4, 2026 08:11
Copilot AI balanced review requested due to automatic review settings November 4, 2026 08:11
@mposolda mposolda self-assigned this Nov 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 mposolda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slaskawi Thanks!

@mposolda
mposolda merged commit 36400f1 into keycloak:main Nov 4, 2026
96 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PAR remains advertised in the OIDC Discovery even when disabled

3 participants