'view-clients' bypasses 'view-users' restriction via 'client-scoped' endpoints
#48858 opened on May 9, 2026
Description
Area
admin/find-grained-permissions
Describe the bug
A user with the permissions to view a client and its sessions can today also see which user is logged in to the application.
Acknowledgement
This was reported by Kelvin Mbogo (@addcontent) to the Keycloak security team. During triage this was considered a hardening.
The view-client permission is already a high-priv role that currently allows access to view the client credentials, so the user might have other means to get to that data already. Also sharing the username and the userId isn't considered an exposure of sensitive data to such a user.
Version
26.6.2
Regression
- The issue is a regression
Expected behavior
Someone with permissions to view the clients but not users should not be allowed to see which user is logged in. The entries for each session should be there, but the username and userId should not be returned. The Admin UI should show a place holder (like (hidden)).
Actual behavior
They see the username and the userId
How to Reproduce?
Look at the Admin UI and the REST response.
Anything else?
This issue was originally tracked in the private repository. Migrated by @ahus1.