Skip to content

Commit 2590146

Browse files
committed
Readme:
More configuration explained. Added instruction on syncing with just one Gitlab instance.
1 parent d9ca2a8 commit 2590146

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Specify the base distinguished name to work with. This will also be appended to
9696
Example to work with entire domain name: "dc=example,dc=com"
9797
Example to work with a specific organisational unit tree: "ou=Internal,dc=example,dc=com"
9898

99-
##### usersDn *(string|null)*
99+
##### userDn *(string|null)*
100100

101101
Specify the distinguished name containing user objects to be searched for.
102102

@@ -107,7 +107,7 @@ Leaving this null will search the entire base DN.
107107

108108
Default: *null*
109109

110-
##### usersFilter *(string|null)*
110+
##### userFilter *(string|null)*
111111

112112
Specify a search filter for finding user objects within the above DN.
113113

@@ -116,12 +116,24 @@ Specify a search filter for finding user objects within the above DN.
116116

117117
Default: "(objectClass=inetOrgPerson)"
118118

119-
##### usersUniqueAttribute *(string|null)*
119+
##### userUniqueAttribute *(string|null)*
120120

121121
Specify the attribute used to uniquely identify a user by their user name. Their values must be a simple name of which the user would typically type to login to Gitlab or any other application interfacing with the same directory.
122122

123123
Default: "uid"
124124

125+
##### userNameAttribute *(string|null)*
126+
127+
Specify the attribute used for the user's full real name.
128+
129+
Default: "cn"
130+
131+
##### userEmailAttribute *(string|null)*
132+
133+
Specify the attribute used for the user's email address. (If there are multiple values only the first will be used.)
134+
135+
Default: "mail"
136+
125137
##### groupDn *(string|null)*
126138

127139
Specify the distinguished name containing group objects to be searched for.
@@ -243,6 +255,26 @@ Group name "Root" and "Users" must always be ignored because they are reserved k
243255

244256
Default: *null*
245257

258+
#### instances *(array)*
259+
260+
Declare one or more Gitlab instances to sync with. Each array key represents the instance name, which can be used later on to only sync with a particular instance (out of multiple) when running this tool.
261+
262+
##### your-instance-name-here *(array)*
263+
264+
Make up an instance name. For example if you had multiple Gitlab installations on servers named "Athena" and "Demeter" it would be sensible to tag them as "athena" and "demeter" in your configuration. All sub-sections of this configuration will be repeated for each instance.
265+
266+
###### url *(string)*
267+
268+
Specify the full HTTP/HTTPS URL to this Gitlab instance, e.g. "https://athena.gitlab.example.com". This is the same URL you use to really visit this Gitlab installation from your web browser.
269+
270+
###### token *(string)*
271+
272+
Specify an API token (usually a personal token or impersonation token) this tool can use to interface with the Gitlab instance's API. This token will need to have the "api" and "sudo" flags available.
273+
274+
###### ldapServerName *(string)*
275+
276+
Specify the LDAP server name used by this Gitlab instance. You can find this in the "ldap_servers" section of the "gitlab.rb" configuration file, which represents an array of data specifying how to interface with LDAP such as server host address, bind DN, encryption, base, etc.
277+
246278
## Running
247279

248280
Once you've configured this tool you can run it from a CLI using:
@@ -259,6 +291,10 @@ If you'd like to see more verbose output you can add up to 3 `-v` switches, for
259291
`php bin/console ldap:groups:sync -vv`
260292
`php bin/console ldap:groups:sync -vvv`
261293

294+
If you'd like to only sync with a single Gitlab instance you can specify the name of it as per your configuration as an argument, for example:
295+
296+
`php bin/console ldap:groups:sync -d athena`
297+
262298
## Built With
263299

264300
* [PHP](https://www.php.net): Entirely PHP.

0 commit comments

Comments
 (0)