LDAP 身份验证在 Graphite 中不起作用

LDAP 身份验证在 Graphite 中不起作用

我已经在 RHEL7 服务器中安装了 Graphite。我已经在 Graphite local_settings.py 中完成了 LDAP 配置

## LDAP / ActiveDirectory authentication setup
USE_LDAP_AUTH = True
LDAP_SERVER = "ldap-test.de.com"
LDAP_PORT = 389
#LDAP_USE_TLS = True

## Manual URI / query setup
LDAP_URI = "ldap://ldap-test.de.com:389"
LDAP_SEARCH_BASE = "ou=test,dc=test"
LDAP_BASE_USER = "uid=test,ou=test1,cn=test2"
LDAP_BASE_PASS = "safdsfeefd"
LDAP_USER_QUERY = "(sAMAccountName=%s)"  #For Active Directory use "(sAMAccountName=%s)"

# User DN template to use for binding (and authentication) against the
# LDAP server. %(username) is replaced with the username supplied at
# graphite login.
LDAP_USER_DN_TEMPLATE = "cn=% (username),ou=test1,dc=test"

# If you want to further customize the ldap connection options you should
# directly use ldap.set_option to set the ldap module's global options.
# For example:
#
#import ldap
#ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) # Use #ldap.OPT_X_TLS_DEMAND to force TLS
#ldap.set_option(ldap.OPT_REFERRALS, 0) # Enable for Active Directory
#ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, "/etc/ssl/ca")
#ldap.set_option(ldap.OPT_X_TLS_CERTFILE, "/etc/ssl/mycert.pem")
#ldap.set_option(ldap.OPT_X_TLS_KEYFILE, "/etc/ssl/mykey.pem")
#ldap.set_option(ldap.OPT_DEBUG_LEVEL, 65535) # To enable verbose debugging
# See http://www.python-ldap.org/ for further details on these options.

我还通过 重新启动了 graphite 服务service uwsgi restart。当我尝试登录时,它抛出了

“身份验证尝试失败,请确保您正确输入了登录名和密码”

在日志中我也找不到错误消息。如何修复此问题。

相关内容