diff options
author | Drew Blessing <drew@gitlab.com> | 2015-12-31 13:22:51 -0600 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2016-01-11 08:17:32 -0600 |
commit | 67aa0b8c4cbf762211ad178efb537f1649d91776 (patch) | |
tree | 8a2f7da423f4d1140bacb05bcd04eb19ad27e66a /config | |
parent | a9800ce40b7a80cbe779e3269c7eae83b883f4da (diff) | |
download | gitlab-ce-67aa0b8c4cbf762211ad178efb537f1649d91776.tar.gz |
Optimize LDAP and add a search timeout
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 5 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 2d9f730c183..d6e2c9380a5 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -204,6 +204,11 @@ production: &base bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' password: '_the_password_of_the_bind_user' + # Set a timeout, in seconds, for LDAP queries. This helps avoid blocking + # a request if the LDAP server becomes unresponsive. + # A value of 0 means there is no timeout. + timeout: 10 + # This setting specifies if LDAP server is Active Directory LDAP server. # For non AD servers it skips the AD specific queries. # If your LDAP server is not AD, set this to false. diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 4fbd84ee890..a9c5b2caf0a 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -108,6 +108,7 @@ if Settings.ldap['enabled'] || Rails.env.test? Settings.ldap['servers'].each do |key, server| server['label'] ||= 'LDAP' + server['timeout'] ||= 10.seconds server['block_auto_created_users'] = false if server['block_auto_created_users'].nil? server['allow_username_or_email_login'] = false if server['allow_username_or_email_login'].nil? server['active_directory'] = true if server['active_directory'].nil? |