@@ -222,6 +222,51 @@ These LDAP sync configuration settings are available:
| `external_groups` | An array of CNs of groups containing users that should be considered external. Not `cn=interns` or the full DN. | **{dotted-circle}** No | `['interns', 'contractors']` |
| `sync_ssh_keys` | The LDAP attribute containing a user's public SSH key. | **{dotted-circle}** No | `'sshPublicKey'` or false if not set |
### Use multiple LDAP servers **(PREMIUM SELF)**
If you have users on multiple LDAP servers, you can configure GitLab to use them. To add additional LDAP servers:
1. Duplicate the [`main` LDAP configuration](#configure-ldap).
1. Edit each duplicate configuration with the details of the additional servers.
- For each additional server, choose a different provider ID, like `main`, `secondary`, or `tertiary`. Use lowercase
alphanumeric characters. GitLab uses the provider ID to associate each user with a specific LDAP server.
- For each entry, use a unique `label` value. These values are used for the tab names on the sign-in page.
#### Example of multiple LDAP servers
The following example shows how to configure three LDAP servers in `gitlab.rb`:
```ruby
gitlab_rails['ldap_enabled']=true
gitlab_rails['ldap_servers']={
'main'=>{
'label'=>'GitLab AD',
'host'=>'ad.example.org',
'port'=>636,
...
},
'secondary'=>{
'label'=>'GitLab Secondary AD',
'host'=>'ad-secondary.example.net',
'port'=>636,
...
},
'tertiary'=>{
'label'=>'GitLab Tertiary AD',
'host'=>'ad-tertiary.example.net',
'port'=>636,
...
}
}
```
This example results in the following sign-in page: