8000 Record admin event when toggling management permissions by sguilhen · Pull Request #55274 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Record admin event when toggling management permissions - #55274

Open
sguilhen wants to merge 2 commits into
keycloak:mainfrom
sguilhen:55145-admin-events-management-permissions
Open

sguilhen wants to merge 2 commits into
keycloak:mainfrom
sguilhen:55145-admin-events-management-permissions

Conversation

@sguilhen
Copy link
Copy Markdown
Contributor

Closes #55145

@sguilhen
sguilhen requested a review from a team as a code owner November 17, 2026 15:12
Copilot AI balanced review requested due to automatic review settings November 17, 2026 15:12
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

The audit resource path appends the role name twice for realm and client role permission endpoints, recording an incorrect endpoint and preventing expected resource-path filter matches.

1 open issue
What changed in this PR

Adds audit events when fine-grained management permissions are enabled or disabled, addressing the audit gap described in #55145.

Changes:

  • Records UPDATE admin events with request representations across management-permission endpoints.
  • Distinguishes client-role and realm-role events and assigns user permission events to the user resource type.
File Description
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​RoleContainerResource.java Adds audit events for role-name permission toggles.
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​RoleByIdResource.java Adds audit events for role-ID permission toggles.
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​RealmAdminResource.java Records user management-permission changes.
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​IdentityProviderResource.java Records identity-provider permission changes.
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​GroupResource.java Records group permission changes.
services/​src/​main/​java/​org/​keycloak/​services/​resources/​admin/​ClientResource.java Records client permission changes.

Review effort: Balanced

@sguilhen
sguilhen force-pushed the 55145-admin-events-management-permissions branch from 0eaab1a to 5d6324f Compare November 17, 2026 15:21
Copilot AI balanced review requested due to automatic review settings November 17, 2026 15:21
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

The role-permission tests do not verify exactly one UPDATE event with the correct request path, resource type, and enabled representation when permissions are enabled or disabled.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:00
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 review reports no active issues with the changes that make management-permission updates auditable.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Closes keycloak#55145

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
@sguilhen
sguilhen force-pushed the 55145-admin-events-management-permissions branch from 8f430a4 to c330921 Compare November 17, 2026 22:03
Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:03
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

There are no active review issues for the changes that make management-permission updates auditable.

No open issues 🎉

Review effort: Balanced

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.

Enabling fine-grained management permissions doesn't record an admin event

2 participants

0