# { main => {"label"=>"ldap","host"=>"127.0.0.1","port":3890,"uid"=>"uid","method"=>"plain","base"=>"dc=example,dc=com","user_filter"=>"","group_base"=>"ou=groups,dc=example,dc=com","admin_group"=>"","sync_ssh_keys":false},
method: '<%=@ldap_config["method"]%>' # "ssl" or "plain"
bind_dn: '<%=@ldap_config["bind_dn"]%>'
password: '<%=@ldap_config["password"]%>'
# This setting controls the amount of time between LDAP permission checks for each user.
# After this time has expired for a given user, their next interaction with GitLab (a click in the web UI, a git pull etc.) will be slower because the LDAP permission check is being performed.
# How much slower depends on your LDAP setup, but it is not uncommon for this check to add seconds of waiting time.
# The default value is to have a 'slow click' once every 3600 seconds, i.e. once per hour.
#
# Warning: if you set this value too low, every click in GitLab will be a 'slow click' for all of your LDAP users.
sync_time: <%=@ldap_config["sync_time"]%>
# If allow_username_or_email_login is enabled, GitLab will ignore everything
# after the first '@' in the LDAP username submitted by the user on login.
#
# Example:
# - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials;
# - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
#
# If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
# disable this setting, because the userPrincipalName contains an '@'.
# LDAP group of users who should be admins in GitLab
#
# Ex. GLAdmins
#
admin_group: <%=@ldap_config['admin_group']%>
# Name of attribute which holds a ssh public key of the user object.
# If false or nil, SSH key syncronisation will be disabled.
#
# Ex. sshpublickey
#
sync_ssh_keys: <%=@ldap_config['sync_ssh_keys']%>
<%if@ldap_servers.any?%>
<%@ldap_servers.eachdo|provider_id,settings|%>
<%=provider_id%>: <%=settings.to_json%>
<%end%>
<%else%>
host: '<%=@ldap_config["host"]%>'
port: <%=@ldap_config["port"]%>
uid: '<%=@ldap_config["uid"]%>'
method: '<%=@ldap_config["method"]%>' # "ssl" or "plain"
bind_dn: '<%=@ldap_config["bind_dn"]%>'
password: '<%=@ldap_config["password"]%>'
# This setting controls the amount of time between LDAP permission checks for each user.
# After this time has expired for a given user, their next interaction with GitLab (a click in the web UI, a git pull etc.) will be slower because the LDAP permission check is being performed.
# How much slower depends on your LDAP setup, but it is not uncommon for this check to add seconds of waiting time.
# The default value is to have a 'slow click' once every 3600 seconds, i.e. once per hour.
#
# Warning: if you set this value too low, every click in GitLab will be a 'slow click' for all of your LDAP users.
sync_time: <%=@ldap_config["sync_time"]%>
# If allow_username_or_email_login is enabled, GitLab will ignore everything
# after the first '@' in the LDAP username submitted by the user on login.
#
# Example:
# - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials;
# - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
#
# If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
# disable this setting, because the userPrincipalName contains an '@'.