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
Copy file name to clipboardExpand all lines: README.md
+39-3Lines changed: 39 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ Specify the base distinguished name to work with. This will also be appended to
96
96
Example to work with entire domain name: "dc=example,dc=com"
97
97
Example to work with a specific organisational unit tree: "ou=Internal,dc=example,dc=com"
98
98
99
-
##### usersDn*(string|null)*
99
+
##### userDn*(string|null)*
100
100
101
101
Specify the distinguished name containing user objects to be searched for.
102
102
@@ -107,7 +107,7 @@ Leaving this null will search the entire base DN.
107
107
108
108
Default: *null*
109
109
110
-
##### usersFilter*(string|null)*
110
+
##### userFilter*(string|null)*
111
111
112
112
Specify a search filter for finding user objects within the above DN.
113
113
@@ -116,12 +116,24 @@ Specify a search filter for finding user objects within the above DN.
116
116
117
117
Default: "(objectClass=inetOrgPerson)"
118
118
119
-
##### usersUniqueAttribute*(string|null)*
119
+
##### userUniqueAttribute*(string|null)*
120
120
121
121
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.
122
122
123
123
Default: "uid"
124
124
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
+
125
137
##### groupDn *(string|null)*
126
138
127
139
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
243
255
244
256
Default: *null*
245
257
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
+
246
278
## Running
247
279
248
280
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
259
291
`php bin/console ldap:groups:sync -vv`
260
292
`php bin/console ldap:groups:sync -vvv`
261
293
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:
0 commit comments