8000 Admin events tabs miss events of sub-resources and client roles · Issue #55119 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Admin events tabs miss events of sub-resources and client roles #55119

Description

@ahus1

Area

admin/ui

Describe the bug

The "Admin events" tabs of several objects in the Admin Console query the admin events by a single resourcePath that does not match the paths under which the events are recorded. As a result, events of the object are missing, or the filter can't be served by an index.

Admin events are recorded under the request path, so events of an object and of its sub-resources are stored under paths like clients/<id>, clients/<id>/protocol-mappers/models/<id>, groups/<id>/role-mappings/realm or identity-provider/instances/<alias>/mappers/<id>. The tabs use the following filters:

  • Client: clients/<id> without a wildcard, so only the events of the client itself are shown and not those of its protocol mappers, roles, scope mappings etc.
  • Client scope: *client-scopes/<id> with a leading wildcard, which can't use an index on RESOURCE_PATH and doesn't match sub-resources like protocol mappers.
  • Realm role and client role: roles-by-id/<id> is used for both, but client roles are modified via clients/<id>/roles/<name>, so no events are shown for client roles.
  • Identity provider, group, organization and user tabs: events of sub-resources (mappers, role mappings, permissions, invitations, ...) are not shown.

Related problems that need separate changes are tracked in separate issues:

The missing events also explain a user report where the client events list showed only a single entry although the database contained more.

Filters without a leading wildcard are a prerequisite for an index on (REALM_ID, RESOURCE_PATH) to be usable, which would be tracked separately.

Version

main

Regression

  • The issue is a regression

Expected behavior

The "Admin events" tab of an object lists the events of the object and of its sub-resources, and only those. Names that are a prefix of other names (client roles, identity provider aliases) must not show events of other objects.

Actual behavior

Events of sub-resources are missing, client roles show no events, and the client scope filter uses a leading wildcard.

How to Reproduce?

  1. Create a realm and enable admin events.
  2. Create a client and add a protocol mapper to it.
  3. Open the client, then Events, then Admin events.
  4. Only the "CLIENT CREATE" event is shown, the "PROTOCOL_MAPPER CREATE" event is missing.

The same applies to client scopes (protocol mappers), client roles (any change), identity providers (mappers), groups (role mappings), and users.

Anything else?

The REST endpoint accepts a single resourcePath, so a fix that keeps the backend backwards compatible needs to send one request per path pattern (the object itself, and the object plus /*) and merge the results in the UI. A future backend improvement could accept multiple resourcePath values.

Activity

  1. added
    kind/bug
    area/admin/ui
    on Nov 12, 2026
  2. self-assigned this
    on Nov 12, 2026
  3. added theissue type on Nov 12, 2026
  4. added
    priority/important
    on Nov 12, 2026
  5. added a commit that references this issue on Nov 12, 2026
    39beb98
  6. added a commit that references this issue on Nov 13, 2026
    cf540ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/admin/uibackport/26.8kind/bugpriority/importantteam/core-iamteam/production-readiness

Type

Fields

No fields configured for bug.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0