Skip to content

Commit f4da701

Browse files
committed
Readme:
Synchronising users to Gitlab is now complete. Included examples for excluding disabled LDAP user accounts. User and group names to ignore are now case-insensitive. Added potential feature: Specifying an attribute on the LDAP user in which this script could write back a user ID for each Gitlab instance. Added potential feature: Likely the same as the above but for groups too. (Group renaming.)
1 parent 818c52c commit f4da701

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ What is complete:
1414

1515
* Reading users from LDAP
1616
* Reading groups from LDAP
17+
* Synchronising users to Gitlab
1718
* Synchronising groups to Gitlab
1819

1920
What is left to-do:
2021

21-
* Synchronising users to Gitlab
2222
* Synchronising group memberships to Gitlab
2323

24-
**For now always use the dry run `-d` option to prevent writing to Gitlab. You have been warned.**
24+
**If in doubt use the dry run `-d` option to prevent writing to Gitlab first, combined with `-vv` to see exactly what would happen. You have been warned.**
2525

2626
## Getting Started
2727

@@ -129,8 +129,8 @@ Default: *null*
129129

130130
Specify a search filter for finding user objects within the above DN.
131131

132-
* For Microsoft Active Directory this is typically "(objectClass=user)".
133-
* For OpenLDAP and 389-DS this is typically "(objectClass=inetOrgPerson)".
132+
* For Microsoft Active Directory this is typically "(&(objectCategory=person)(objectClass=user))", though if you want to exclude disabled users, use "(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))".
133+
* For OpenLDAP and 389-DS this is typically "(objectClass=inetOrgPerson)", though if you want to exclude 389-DS disabled users, use "(&(objectClass=inetOrgPerson)(!(nsAccountLock=true)))".
134134

135135
Default: "(objectClass=inetOrgPerson)"
136136

@@ -196,7 +196,7 @@ This section configures how to communicate with your Gitlab-CE instance.
196196

197197
##### userNamesToIgnore *(array|null)*
198198

199-
Specify a list of user names of which this tool should ignore. (Case-sensitive.)
199+
Specify a list of user names of which this tool should ignore. (Case-insensitive.)
200200

201201
This varies not only according to which directory software you're using, but also how your directory has been structured.
202202

@@ -219,7 +219,7 @@ Default: *null*
219219

220220
##### groupNamesToIgnore *(array|null)*
221221

222-
Specify a list of group names of which this tool should ignore. (Case-sensitive.)
222+
Specify a list of group names of which this tool should ignore. (Case-insensitive.)
223223

224224
This varies not only according to which directory software you're using, but also how your directory has been structured. You do not have to specify every group if you've left the "createEmptyGroups" setting (further down) switched off, as this will prevent groups containing no users to be ignored anyway.
225225

@@ -347,7 +347,11 @@ Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c6
347347

348348
### Potential features
349349

350-
I don't have anything further planned as this fulfils my purpose.
350+
* Specifying an attribute on the LDAP user in which this script could write back a user ID for each Gitlab instance.
351+
* This would mean user name (UID) changes in LDAP could be detected and synchronised automatically without user duplication happening.
352+
* It would likely be a string attribute in the form of `instanceName:userId`, for example `athena:3` and `demeter:15`.
353+
* It could either be a multi-value attribute to handle multiple Gitlab instances, or a single-value attribute split by a semi-colon, for example `athena:3;demeter:15`.
354+
* Likely the same as the above but for groups too. (Group renaming.)
351355

352356
## Versioning
353357

0 commit comments

Comments
 (0)