You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleted Keycloak groups remain in OpenCloud with stale memberships #293
run COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml:idm/ldap-keycloak.yml:traefik/ldap-keycloak.yml
Log in to Keycloak.
Create a new group.
Add a user to the group.
Verify that the group appears in OpenCloud.
Delete the group in Keycloak.
Actual result:
group is removed from Keycloak.
group still exists in OpenCloud.
user still sees themselves as a member of the deleted group.
This is not an OpenCloud bug. OpenCloud reflects the underlying LDAP directory, which still contains the deleted group.
Reproduced on a stock compose setup (idm/ldap-keycloak.yml): deleting the group in Keycloak returns HTTP 204, but the groupOfNames entry and its member attributes stay in LDAP, so OpenCloud keeps listing the group and the membership. Deleting a user in Keycloak does remove the corresponding LDAP entry, so the gap is specific to group deletion.
The root cause is in Keycloak. The group-ldap-mapper has no preRemove(GroupModel) hook, so a group deletion never reaches LDAP. The user and role mappers have that hook, and the provider runs with editMode=WRITABLE.
Workaround until that change ships: remove the orphaned entry from LDAP directly, for example ldapdelete "cn=<group>,ou=groups,dc=opencloud,dc=eu". Deleting the group only in Keycloak does not persist: the periodic LDAP-to-Keycloak sync (daily by default) re-imports it. ⚠️
🤖 drafted with Claude Code, reviewed before submitting.
Activity
michaelstingl commentedon May 30, 2026
This is not an OpenCloud bug. OpenCloud reflects the underlying LDAP directory, which still contains the deleted group.
Reproduced on a stock compose setup (
idm/ldap-keycloak.yml): deleting the group in Keycloak returns HTTP 204, but thegroupOfNamesentry and itsmemberattributes stay in LDAP, so OpenCloud keeps listing the group and the membership. Deleting a user in Keycloak does remove the corresponding LDAP entry, so the gap is specific to group deletion.The root cause is in Keycloak. The
group-ldap-mapperhas nopreRemove(GroupModel)hook, so a group deletion never reaches LDAP. The user and role mappers have that hook, and the provider runs witheditMode=WRITABLE.editMode=WRITABLEand the mapper usesmode=LDAP_ONLY, which are the compose defaults.Workaround until that change ships: remove the orphaned entry from LDAP directly, for example⚠️
ldapdelete "cn=<group>,ou=groups,dc=opencloud,dc=eu". Deleting the group only in Keycloak does not persist: the periodic LDAP-to-Keycloak sync (daily by default) re-imports it.🤖 drafted with Claude Code, reviewed before submitting.