-
Bug
-
Resolution: Fixed
-
Medium
-
2.8.4
-
None
-
30
-
Severity 2 - Major
-
8
-
Summary
This was reported on a Stash/Bitbucket Server instance with embedded Crowd. Using LDAP with local groups, having a local group named "foo", and then adding the group 'foo' in the LDAP directory will cause it to not synchronise, but the user is unable to delete the local group either. Stash/Bitbucket Server Logs report:
2016-03-10 18:32:25,522 DEBUG [clusterScheduler_Worker-7] c.a.c.d.DbCachingRemoteChangeOperations group [ foo ] in directory [ 917505 ] matches local group of same name, skipping
Environment
- Stash 3.11.2
- LDAP has been configured with "Read Only, with Local Groups" in Stash/Bitbucket Server.
- Membership Aggregation enabled in Stash/Bitbucket Server
- Nested Groups enabled
- LDAP user directory is set at the highest priority (first user directory)
Steps to Reproduce
- Configure Stash/Bitbucket Server with LDAP with local groups
- Create a local group name "foo" to match an extsing LDAP group "foo"
- Trigger a sync with LDAP
Expected Results
Group Memberships are synced for users correctly that belong to the "foo" group.
Actual Results
Group Memberships are empty or not synced correctly for users belonging to group "foo" and following message is reported in Stash/Bitbucket Server logs:
2016-03-10 18:32:25,522 DEBUG [clusterScheduler_Worker-7] c.a.c.d.DbCachingRemoteChangeOperations group [ foo ] in directory [ 917505 ] matches local group of same name, skipping
Additionally, the local group can't be removed via the UI.
Notes
Querying the Stash/Bitbucket Server database on the "cwd_group" table shows that there are two groups by the name of "foo" - one local and one LDAP but both are enabled:
| 4128772 | foo | foo | 2014-10-29 07:29:20 | 2014-10-29 07:29:20 | NULL | GROUP | 917505 | T | T |
| 6783242 | foo | foo | 2016-02-18 17:21:29 | 2016-02-18 17:21:29 | NULL | GROUP | 1802241 | T | F |
Note that the Directory id '917505' corresponds to the local user directory and has the "is_local" field set to 'T'.
Workaround
- Ensure you have a complete backup of your Stash/Bitbucket Server instance.
- Stop the application
- Update the above record in your database for local user directory '917505' and set the 'is_local' flag to 'F'.
- Restart the application.
- Note that if the group has any local memberships (that are not on the remote LDAP server), these would be lost after the change. The following might be reported in Stash/Bitbucket Server logs on subsequent synchronization with the LDAP server:
2016-05-19 07:49:00,567 DEBUG [clusterScheduler_Worker-4] c.a.s.i.crowd.HibernateMembershipDao Deleting object: com.atlassian.crowd.model.membership.InternalMembership@5f84bbfd[parentId=4128772,childId=983314,membershipType=GROUP_USER,groupType=GROUP,parentName=foo,lowerParentName=foo,childName=foochild,lowerChildName=foochild,directoryId=917505] 2016-05-19 07:49:00,567 DEBUG [clusterScheduler_Worker-4] c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for GroupMembershipDeletedEvent until AFTER_COMMIT 2016-05-19 07:49:00,573 INFO [clusterScheduler_Worker-4] c.a.c.d.DbCachingRemoteChangeOperations removed [ 1 ] user members from [ foo ] in [ 14ms ] 2016-05-19 07:49:00,577 DEBUG [clusterScheduler_Worker-4] c.a.s.i.e.TransactionAwareEventPublisher Publishing GroupMembershipDeletedEvent after commit
- causes
-
CWD-5468 Crowd removes non local groups from remote directory even when 'Manage groups locally' is on
-
- Closed
-
-
JRASERVER-28427 Inconsistency on LDAP membership updates in case of a duplicate group name (from Internal x LDAP)
-
- Closed
-
- is duplicated by
-
CWD-4467 Delegated LDAP does not synchronise on login the memberships of remote groups if they are shadowed by a local group
-
- Closed
-
- was cloned as
-
KYAK-349 Loading...
[CWD-4733] Synchronisation with a LDAP group fails if there also exists a duplicate local group
Remote Link | Original: This issue links to "KRAK-241 (JIRA Server (Bulldog))" [ 238520 ] | New: This issue links to "KYAK-349 (JIRA Server (Bulldog))" [ 238520 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 482459 ] |
Assignee | New: Patryk [ ppetrowski ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Short Term Backlog [ 12074 ] | New: Closed [ 6 ] |
Fix Version/s | New: 3.5.1 [ 88096 ] | |
Fix Version/s | New: 3.4.6 [ 86993 ] | |
Fix Version/s | New: 3.3.7 [ 86992 ] |
Epic Link | Original: CWD-4704 [ 600140 ] |
Status | Original: Long Term Backlog [ 12073 ] | New: Short Term Backlog [ 12074 ] |
Workflow | Original: Simplified Crowd Development Workflow v2 - restricted [ 1508462 ] | New: JAC Bug Workflow v3 [ 3366088 ] |
Status | Original: Verified [ 10005 ] | New: Long Term Backlog [ 12073 ] |
Support reference count | Original: 29 | New: 30 |