CAS 6.0 如何使用 LDAP 验证用户/密码



>当我尝试使用登录名/密码将cas-overlay-6.0连接到 ldap Oracle 目录服务器 11 到 cas 6.0 应用程序时,我遇到此错误:

谁: 我的登录 什么: 提供的凭据:

[用户名密码凭据(用户名=我的登录,源=空(] 操作:

AUTHENTICATION_FAILED应用:CAS

我的财产 :

cas.authn.ldap[0].ldapUrl=ldap://monserveur.fr
# Identifiant pour se connecter au LDAP
cas.authn.ldap[0].bindDn=cn=Directory Manager
cas.authn.ldap[0].bindCredential=myPassword
cas.authn.ldap[0].baseDn=ou=pers,ou=XX-XXX-XXXX,ou=subdomain,o=gov,c=country
cas.authn.ldap[0].searchFilter=uid={user}
cas.authn.ldap[0].subtreeSearch=true
#cas.authn.ldap[0].principalAttributeList=cn,givenName,mail,sn
cas.authn.ldap[0].principalAttributePassword=userPassword

注意:密码是用 LDAP 编码的 SSHA。

如何验证出了什么问题? 例如,当我输入错误的baseDn或搜索过滤器时,我有相同的错误。 如何执行简单的登录/密码测试以消除错误?

cas如何处理密码,即执行密码的ldap是比较还是cas?

如果是 cas 执行密码,请比较如何配置 cas

提前感谢任何帮助!

它适用于SSHA密码,无需配置或更改。

CAS 6.0.5 的示例由cas-overlay-6.0和 ldap Oracle Directory Server 11 提供。

CAS属性 :

cas.server.name=https://yourServer:8443
cas.server.prefix=${cas.server.name}/cas
# usefull to modifiy log level. Right path for cas-overlay-6.0
logging.config=file:/etc/cas/config/log4j2.xml

# connexion au ldap sur votre serveur ldap en anonyme 
############################################################################### 
cas.authn.ldap[0].ldapUrl=ldap://myServer.fr:389/ 
cas.authn.ldap[0].type=ANONYMOUS 
cas.authn.ldap[0].useSsl=false 
cas.authn.ldap[0].useStartTls=false 
# connexion au ldap en mode authentifié 
############################################################################### 
#cas.authn.ldap[0].ldapUrl=ldap://myServer.fr:389/ 
#cas.authn.ldap[0].useSsl=false 
#cas.authn.ldap[0].useStartTls=false 
#cas.authn.ldap[0].type=AUTHENTICATED 
## Identifiant pour se connecter au LDAP 
#cas.authn.ldap[0].bindDn=cn=Directory Manager 
#cas.authn.ldap[0].bindCredential=myPassword 

# search for cas user who try to test login connection 
################################################################################ 
cas.authn.ldap[0].baseDn=ou=XXXXXX,ou=subdomain,o=domain,c=country 
cas.authn.ldap[0].subtreeSearch=true 
cas.authn.ldap[0].searchFilter=(&(objectClass=person)(uid={user}))
#cas.authn.ldap[0].searchFilter=uid={user} 
#cas.authn.ldap[0].principalAttributeList=cn,givenName,mail,sn

使用 cas-overlay-6.0 您需要复制 conf : ./build.sh 副本

用于测试何时出现问题:

CAS 服务器端:

telnet yourLdapServer.fr 389

必须工作!

ldapsearch -h yourLdapServer.fr -D "cn=Directory Manager" -w yourPassword -b "ou=pers,ou=XXXXX,ou=subdomain,o=domain,c=country"  uid=loginTest

或匿名连接

ldapsearch -h yourLdapServer.fr -x -b "ou=pers,ou=XXXXX,ou=subdomain,o=domain,c=country"  uid=loginTest 

必须提供卡

LDAP 服务器端

tcpdump -v -i eth0 -s 0 -A 'tcp dst port 389'

必须提供这样的行(当您运行LDAPsearch或CAS测试登录连接时(:

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
18:04:23.846472 IP (tos 0x0, ttl  64, id 19303, offset 0, flags [DF], proto 6, length: 60) yourCasServer.fr.59810 > yourLdapServer.ldap: S [tcp sum ok] ...

如果 CAS 和 LDAP 之间的连接失败,请更正 cas.properties 中的以下行:

cas.authn.ldap[0].ldapUrl=ldap://myServer.fr:389/ 
cas.authn.ldap[0].type=ANONYMOUS 
cas.authn.ldap[0].useSsl=false 
cas.authn.ldap[0].useStartTls=false 

当 CAS 和 LDAP之间的连接正常时,请查看 CAS 日志和访问 LDAP 日志以获取更多信息!

最新更新