Repository navigation
Conversation
…thout operator allowlist closes keycloak#55130 Signed-off-by: Takashi Norimatsu <takashi.norimatsu.ws@hitachi.com>
ProblemThe FixAdded a Client scope allow list option (
If the allow list is empty, CIMD clients have no optional client scopes. Default client scopes are not affected. The check is called from Notes
TestsAdded to
The docs ( |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the CIMD client-scope allowlist change.
No open issues 🎉
What changed in this PR
This PR addresses #55130 by adding an administrator-controlled client scope allowlist for Client ID Metadata Document (CIMD) clients, preventing metadata from attaching arbitrary realm client scopes.
Changes:
- Filters metadata scopes before creation or refresh and removes disallowed optional scopes on every authorization request, including cached requests.
- Adds executor configuration and documentation, clarifying that an empty allowlist permits no optional scopes while default client scopes remain unaffected.
- Adds tests for creation, refresh, allowlist tightening, missing metadata scopes, and an empty allowlist.
| File | Description |
|---|---|
| tests/base/src/test/java/org/keycloak/tests/client/policies/ClientIdMetadataDocumentTest.java | Adds allowlist regression tests and updates test configuration. |
| services/src/main/java/org/keycloak/protocol/oauth2/cimd/clientpolicy/executor/AbstractClientIdMetadataDocumentExecutorFactory.java | Exposes the allowlist setting and its help text. |
| services/src/main/java/org/keycloak/protocol/oauth2/cimd/clientpolicy/executor/AbstractClientIdMetadataDocumentExecutor.java | Enforces the allowlist on metadata and persisted optional scopes. |
| docs/guides/securing-apps/mcp-authz-server.adoc | Documents configuration and scope-removal behavior. |
Review effort: Balanced
closes #55130