diff --git a/README.md b/README.md index e629a5d6c..fc990e9e0 100644 --- a/README.md +++ b/README.md @@ -1001,6 +1001,7 @@ Below is the complete list of available options that can be used to customize yo | `LDAP_BLOCK_AUTO_CREATED_USERS` | Locks down those users until they have been cleared by the admin. Defaults to `false`. | | `LDAP_BASE` | Base where we can search for users. No default. | | `LDAP_USER_FILTER` | Filter LDAP users. No default. | +| `LDAP_NAME` | LDAP user's real name. Defaults to `cn` | | `LDAP_LOWERCASE_USERNAMES` | GitLab will lower case the username for the LDAP Server. Defaults to `false` | | `OAUTH_ENABLED` | Enable OAuth support. Defaults to `true` if any of the support OAuth providers is configured, else defaults to `false`. | | `OAUTH_AUTO_SIGN_IN_WITH_PROVIDER` | Automatically sign in with a specific OAuth provider without showing GitLab sign-in page. Accepted values are `cas3`, `github`, `bitbucket`, `gitlab`, `google_oauth2`, `facebook`, `twitter`, `saml`, `crowd`, `auth0` and `azure_oauth2`. No default. | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 1c09c2c18..f8d20f21b 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -401,7 +401,7 @@ production: &base # If no full name could be found at the attribute specified for `name`, # the full name is determined using the attributes specified for # `first_name` and `last_name`. - name: 'cn' + name: '{{LDAP_NAME}}' first_name: 'givenName' last_name: 'sn' diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 96a537f96..6e50ade31 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -284,6 +284,7 @@ LDAP_ACTIVE_DIRECTORY=${LDAP_ACTIVE_DIRECTORY:-true} LDAP_BLOCK_AUTO_CREATED_USERS=${LDAP_BLOCK_AUTO_CREATED_USERS:-false} LDAP_BASE=${LDAP_BASE:-} LDAP_USER_FILTER=${LDAP_USER_FILTER:-} +LDAP_NAME=${LDAP_NAME:-cn} LDAP_LOWERCASE_USERNAMES="${LDAP_LOWERCASE_USERNAMES:-false}" LDAP_LABEL=${LDAP_LABEL:-LDAP} LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=${LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN:-} diff --git a/assets/runtime/functions b/assets/runtime/functions index ce851b98f..8b134f6c1 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -462,6 +462,7 @@ gitlab_configure_ldap() { LDAP_BLOCK_AUTO_CREATED_USERS \ LDAP_BASE \ LDAP_USER_FILTER \ + LDAP_NAME \ LDAP_LOWERCASE_USERNAMES \ LDAP_LABEL }