Skip to content

Commit 9b7536a

Browse files
author
l00v3
committed
Add LDAP_PREVENT_LDAP_SIGN_IN configuration parameter
Committer: l00v3 <[email protected]>
1 parent c240c5e commit 9b7536a

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@ Below is the complete list of available options that can be used to customize yo
10151015
| `LDAP_USER_ATTRIBUTE_FIRSTNAME` | Attribute field for the forename of a user. Default to `givenName` |
10161016
| `LDAP_USER_ATTRIBUTE_LASTNAME` | Attribute field for the surname of a user. Default to `sn` |
10171017
| `LDAP_LOWERCASE_USERNAMES` | GitLab will lower case the username for the LDAP Server. Defaults to `false` |
1018+
| `LDAP_PREVENT_LDAP_SIGN_IN` | Set to `true` to [Disable LDAP web sign in](https://docs.gitlab.com/ce/administration/auth/ldap/#disable-ldap-web-sign-in), defaults to `false` |
10181019
| `OAUTH_ENABLED` | Enable OAuth support. Defaults to `true` if any of the support OAuth providers is configured, else defaults to `false`. |
10191020
| `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. |
10201021
| `OAUTH_ALLOW_SSO` | Comma separated list of oauth providers for single sign-on. This allows users to login without having a user account. The account is created automatically when authentication is successful. Accepted values are `cas3`, `github`, `bitbucket`, `gitlab`, `google_oauth2`, `facebook`, `twitter`, `saml`, `crowd`, `auth0` and `azure_oauth2`. No default. |

assets/runtime/config/gitlabhq/gitlab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ production: &base
593593
# bundle exec rake gitlab:ldap:check RAILS_ENV=production
594594
ldap:
595595
enabled: {{LDAP_ENABLED}}
596-
prevent_ldap_sign_in: false
596+
prevent_ldap_sign_in: {{LDAP_PREVENT_LDAP_SIGN_IN}}
597597

598598
# This setting controls the number of seconds between LDAP permission checks
599599
# for each user. After this time has expired for a given user, their next

assets/runtime/env-defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ LDAP_USER_ATTRIBUTE_LASTNAME=${LDAP_USER_ATTRIBUTE_LASTNAME:-sn}
344344
LDAP_LOWERCASE_USERNAMES="${LDAP_LOWERCASE_USERNAMES:-false}"
345345
LDAP_LABEL=${LDAP_LABEL:-LDAP}
346346
LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=${LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN:-}
347+
LDAP_PREVENT_LDAP_SIGN_IN=${LDAP_PREVENT_LDAP_SIGN_IN:-false}
347348
case ${LDAP_UID} in
348349
userPrincipalName) LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=${LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN:-false} ;;
349350
*) LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN=${LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN:-true}

assets/runtime/functions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ gitlab_configure_ldap() {
439439
LDAP_USER_ATTRIBUTE_NAME \
440440
LDAP_USER_ATTRIBUTE_FIRSTNAME \
441441
LDAP_USER_ATTRIBUTE_LASTNAME \
442-
LDAP_LABEL
442+
LDAP_LABEL \
443+
LDAP_PREVENT_LDAP_SIGN_IN
443444
}
444445

445446
gitlab_configure_oauth_cas3() {

0 commit comments

Comments
 (0)