Skip to content

Instantly share code, notes, and snippets.

@jorgedison
Created January 20, 2020 16:41
Show Gist options
  • Save jorgedison/f30a7c5a549ccf212fe6251788c041ef to your computer and use it in GitHub Desktop.
Save jorgedison/f30a7c5a549ccf212fe6251788c041ef to your computer and use it in GitHub Desktop.
Configuración Gitlab LDAP
### LDAP Settings
###! Docs: https://docs.gitlab.com/omnibus/settings/ldap.html
###! **Be careful not to break the indentation in the ldap_servers block. It is
###! in yaml format and the spaces must be retained. Using tabs will not work.**
gitlab_rails['ldap_enabled'] = true
gitlab_rails['prevent_ldap_sign_in'] = false
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'XXX.XXX.XXX.XXX'
port: 389
uid: 'sAMAccountName'
bind_dn: 'CN=Gitlab Service,CN=Users,DC=zzzzzzzz,DC=com'
password: '*********'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
verify_certificates: false
smartcard_auth: false
active_directory: true
allow_username_or_email_login: false
lowercase_usernames: false
block_auto_created_users: false
base: 'OU=yyyyyyyy,DC=zzzzzzzz,DC=com'
user_filter: ''
attributes:
username: ['uid', 'userid', 'sAMAccountName']
email: ['mail', 'email', 'userPrincipalName']
name: 'cn'
first_name: 'givenName'
last_name: 'sn'
## EE only
group_base: 'OU=xxxxxxxx,OU=yyyyyyyy,DC=zzzzzzzz,DC=com'
admin_group: 'AAAAAAAA'
sync_ssh_keys: false
EOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment