我想在我的項目上使用Kerberos身份驗證。這是爲我公司提供的一項內部服務,我希望對用戶進行身份驗證,並從Active Directory中檢索用戶組。 爲此,我使用Spring Security,Kerberos擴展和我們公司的AD。Spring Security,Kerberos擴展和AD
問題:我可以使用Kerberos進行身份驗證,但我們在AD上的域名是「WAN.CORP.COM」。所以我得到我的用戶[email protected],並沒有過濾器,我可以問這與AD(userPrincipalName是像[email protected])。
我的security.xml包含:
<sec:ldap-user-service id="ldapUserService" server-ref="ldapCorp" user-search-filter="(userPrincipalName={0})" />
<sec:ldap-server id="ldapCorp" url="ldap://ldap.wan.corp.com:389/DC=wan,DC=corp,DC=com" manager-dn="CN=ldap read,OU=CORP,DC=wan,DC=corp,DC=com" manager-password="pass" />
但春季安全發送一個例外,因爲它無法檢索[email protected] ...
任何人都可以幫我嗎?我想直接通過Spring Security來完成,如果沒有,我想我可以在DummyUserDetailsService中獲取信息,我是對的?
非常感謝,爲我的英文不好對不起......