Skip to content

Deleted Keycloak groups remain in OpenCloud with stale memberships #293

Closed

Description

@v-scharf

tested against OpenCloud v7.0.0-rc.0

Steps:

  • 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.

Case with deleting user -works fine

Expected: group should be removed from OpenCloud.

Activity

  1. added theissue type on May 21, 2026
  2. michaelstingl commented on May 30, 2026

    @michaelstingl
    Contributor

    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.

  3. moved this from Qualification to Done in OpenCloud Team Boardon Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions