keycloak/keycloak
Deletion of users imported via user storage federation leaves dangling offline user and client sessions
开放
#20,170 创建于 2023年5月4日
area/storagehelp wantedkind/bugpriority/normalstatus/auto-bumpteam/core-iam
仓库指标
- 星标
- (34,398 个星标)
- PR 合并指标
- (平均合并 6天 19小时) (30 天内合并 384 个 PR)
描述
Before reporting an issue
- I have searched existing issues
- I have reproduced the issue with the latest release
Area
storage
Describe the bug
Removing users imported by a user storage provider via the "remove imported" action in the admin ui, does not clean up existing offline user sessions and offline client sessions. The many orphaned entries unnecessarily occupy a lot of storage, lead to large backups and can slow down the index maintenance.
Version
21.1.1
Expected behavior
Offline user sessions and associated offline client sessions should also be removed if a federated user is deleted via the "remove imported" action.
Actual behavior
Offline user and client sessions are NOT removed when a federated user is deleted via "remove imported" action.
How to Reproduce?
- Import a user via user storage federation
- create a client that supports offline_access
- create an offline_session for the user for the client
- look at the database tables
offline_user_Sessionandoffline_client_sessionand look for the user offline session for the given client - For the user storage provider execute the "remove imported" action
- look at the database tables again, the session from before are still there, but there is no user anymore.
Anything else?
No response