mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +00:00
fix(accounts): an LDAP login waits a bounded time for the directory
python-ldap waits for a server without end, to connect and for each answer: a directory that stopped answering held every login's thread. The settings template's LDAP block sets 5 seconds to connect and 10 for each answer.
This commit is contained in:
parent
cbd4374f4f
commit
245ed12aad
2 changed files with 22 additions and 0 deletions
|
|
@ -411,6 +411,8 @@ if HAS_LDAP:
|
|||
AUTH_LDAP_SERVER_URI = "ldap://example.com"
|
||||
AUTH_LDAP_BIND_DN = "username@example.com"
|
||||
AUTH_LDAP_BIND_PASSWORD = "password"
|
||||
# seconds to connect and for each answer: python-ldap waits for a server without end
|
||||
AUTH_LDAP_CONNECTION_OPTIONS = {ldap.OPT_NETWORK_TIMEOUT: 5, ldap.OPT_TIMEOUT: 10}
|
||||
AUTH_LDAP_USER_SEARCH = LDAPSearch(
|
||||
"CN=Users,DC=example,DC=com", ldap.SCOPE_SUBTREE, "(sAMAccountName=%(user)s)"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue