Skip to content

Treat the admin-permissions client as an internal client - #53883

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
vramik:51630-fgap-admin-permissions-internal
Oct 14, 2026
Merged

pedroigor merged 1 commit into
keycloak:mainfrom
vramik:51630-fgap-admin-permissions-internal

Conversation

@vramik

@vramik vramik commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Closes #51630

Closes keycloak#51630

Co-authored-by: waterWang <waterwang@users.noreply.github.com>
Signed-off-by: vramik <vramik@redhat.com>

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

The focused authorization fix addresses the reported inconsistency and includes suitable regression tests and upgrade documentation.

0 open findings

What changed in this PR

Treats the FGAP V2 admin-permissions client as internal, preventing delegated or full administrators from modifying it through client APIs.

Changes:

  • Adds the client to internal-client authorization checks.
  • Adds regression coverage for update, rename, and deletion attempts.
  • Documents the resulting HTTP 403 behavior.
File Description
services/​.../​ClientPermissions.java Marks the realm’s admin-permissions client as internal.
tests/​.../​PermissionRESTTest.java Verifies full-admin updates and deletion are forbidden.
tests/​.../​ClientResourceTypeEvaluationTest.java Verifies FGAP client-manage permission cannot modify it.
rest/​admin-v2/​.../​ClientApiV2AuthorizationTest.java Updates V2 deletion expectations to HTTP 403.
docs/​.../​changes-27_0_0.adoc Documents the authorization change.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@martin-kanis martin-kanis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@vramik Thanks. The fix and test(s) looks good to me.

@pedroigor
pedroigor merged commit c104900 into keycloak:main Oct 14, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FGAP V2: isInternal denylist missing admin-permissions client allows delegated admin to update it

4 participants