Skip to content

[CIMD] Metadata refresh retains removed capabilities due to partial-update semantics - #55150

Open
tnorimat wants to merge 1 commit into
keycloak:mainfrom
Hitachi:ISSUE-55132
Open

tnorimat wants to merge 1 commit into
keycloak:mainfrom
Hitachi:ISSUE-55132

Conversation

@tnorimat

Copy link
Copy Markdown
Contributor

closes #55132

@tnorimat
tnorimat requested a review from a team as a code owner November 13, 2026 09:09
Copilot AI balanced review requested due to automatic review settings November 13, 2026 09:09

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.

🟡 Changes recommended

Refresh handling still assigns optional scopes when scope is omitted and mishandles service-account reconciliation, causing incorrect scope assignments and missing UMA protection access.

3 open issues
What changed in this PR

This PR addresses #55132 by making CIMD metadata refreshes reconcile previously stored capabilities rather than relying solely on partial updates.

Changes:

  • Reconciles scopes, grant capabilities, web origins, and metadata-derived attributes.
  • Adds authorization-service cleanup and rollback handling for failed creation or refresh.
  • Adds regression tests for capability removal, scope and origin updates, and failed-refresh persistence.
File Description
tests/​base/​src/​test/​java/​org/​keycloak/​tests/​client/​policies/​ClientIdMetadataDocumentTest.java Adds refresh regression tests and supporting helpers.
services/​src/​main/​java/​org/​keycloak/​protocol/​oauth2/​cimd/​provider/​AbstractPersistentClientIdMetadataDocumentProvider.java Adds metadata reconciliation, authorization cleanup, and failure rollback.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 13, 2026 09:30

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.

🟡 Changes recommended

Metadata refreshes can retain a removed backchannel logout URI, while UPDATE policies validate stale logout redirect settings and may reject otherwise valid HTTPS-only updates.

2 open issues
3 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 13, 2026 09:43

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 reported for the CIMD refresh changes that revoke omitted capabilities.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 16, 2026 00:46

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.

🟡 Changes recommended

Refreshed documents that omit client_name or client_uri retain stale stored values instead of clearing them during full-document replacement.

1 open issue

Review effort: Balanced

…pdate semantics

closes keycloak#55132

Signed-off-by: Takashi Norimatsu <takashi.norimatsu.ws@hitachi.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 02:38

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 were identified for the CIMD refresh capability-reconciliation and rollback changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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.

[CIMD] Metadata refresh retains removed capabilities due to partial-update semantics

2 participants