[Update] 添加LDAP USER_QUERY_FIELD字段值为username,解决数据库因大小敏感导致LDAP用户认证首次成功,再次失败的问题;如果不配置此字段,则查询使用小写,创建可能会使用大写,最终导致username重复而创建用户失败;

pull/4057/head
Bai 2020-06-01 12:06:39 +08:00
parent 0b17d55f30
commit 9850633350
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ AUTH_LDAP_SEARCH_OU = DYNAMIC.AUTH_LDAP_SEARCH_OU
AUTH_LDAP_SEARCH_FILTER = DYNAMIC.AUTH_LDAP_SEARCH_FILTER
AUTH_LDAP_START_TLS = DYNAMIC.AUTH_LDAP_START_TLS
AUTH_LDAP_USER_ATTR_MAP = DYNAMIC.AUTH_LDAP_USER_ATTR_MAP
AUTH_LDAP_USER_QUERY_FIELD = 'username'
AUTH_LDAP_GLOBAL_OPTIONS = {
ldap.OPT_X_TLS_REQUIRE_CERT: ldap.OPT_X_TLS_NEVER,
ldap.OPT_REFERRALS: CONFIG.AUTH_LDAP_OPTIONS_OPT_REFERRALS