Skip to content

Realm client-session stats disclose hidden clients under FGAP v2 #50917

Description

@ahus1

Area

Keycloak Fgap

Describe the bug

Realm viewers can enumerate hidden clients that currently have active or offline
sessions, learn their UUIDs and public client IDs, and observe session-count activity
despite lacking client visibility.

Version

Current development branch at the time of analysis.

Expected behavior

Filter client-session-stats entries through per-client visibility before returning
id/clientId values, or require client view for stats entries that expose client
identifiers.

Actual behavior

With FGAP v2 enabled, a delegated admin receives the realm view permission but no
Clients:view permission on a client that has active sessions. Direct GET
/admin/realms/{realm}/clients/{clientUuid} returns 403, but GET
/admin/realms/{realm}/client-session-stats returns an entry containing the hidden
client's UUID, public clientId, and active/offline session counts.


This issue was originally tracked in the private repository. Migrated by @ahus1.

Activity

  1. added
    priority/important
    area/admin/fine-grained-permissions
    on Jul 15, 2026
  2. added theissue type on Jul 15, 2026
  3. self-assigned this
    on Jul 15, 2026
  4. added a commit that references this issue on Oct 13, 2026
    724ae5a
  5. added a commit that references this issue on Oct 14, 2026
    19c5879
  6. added a commit that references this issue on Oct 14, 2026
    f41e255
  7. added 2 commits that reference this issue on Oct 22, 2026
    9c86816
    05ec68e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Fields

No fields configured for weakness.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions