2016-07-11 13 views
1

私はldapで春のセキュリティ4を使用しようとしています。基本認証システムとしてLDAPを使用する場合は問題ありません。 GSSを使用するシステムに接続しようとすると、もはや動作しません。私はそれが正常で、GSSを使ってどこかで指定するべきだと思います。しかしここで?以下はGSSネゴシエーションを使用したSpringセキュリティLDAP

は、xmlファイルのセキュリティは春LDAPがGSSAPI SASLメカニズムをサポートしたことはない

<?xml version="1.0" encoding="UTF-8"?> 
<beans:bean xmlns="http://www.springframework.org/schema/security" 
     xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    http://www.springframework.org/schema/security 
    http://www.springframework.org/schema/security/spring-security-4.1.xsd 
    "> 

    <!-- This is where we configure Spring-Security --> 
    <http auto-config="true" use-expressions="true"> 

     <intercept-url pattern="/" access="permitAll" /> 
     <intercept-url pattern="/login" access="permitAll" /> 
     <intercept-url pattern="/logout" access="isAuthenticated()" /> 
     <intercept-url pattern="/user**" access="hasAuthority('1')" /> 


     <access-denied-handler error-page="/403" /> 
     <form-login 
       login-page="/login" 
       default-target-url="/planning" 
       authentication-failure-url="/login?error" 
       username-parameter="username" 
       password-parameter="password" 
       authentication-success-handler-ref="customLdapAuthenticationSuccessHandler" 
     /> 
     <logout logout-url="/logout" logout-success-url="/login?logout" /> 

    </http> 


    <ldap-server url="ldap://192.168.2.100/DC=ciro,DC=local,DC=it?one?(objectClass=*)" manager-dn="cn=Administrator,dc=web-gate,dc=local,dc=it" manager-password="PLAIN PWD" /> 

    <authentication-manager> 
     <ldap-authentication-provider 
       group-search-base="ou=groups"> 
     </ldap-authentication-provider> 
    </authentication-manager> 
</beans:bean> 

答えて

0

です。幸いにも、my libraryを使用して、Spring LDAPでそれを行うことができます。設定は簡単です。

+0

答えてくれてありがとうございましたが、ドキュメンテーションでmu sprinのセキュリティxml設定ファイルにあなたのライブラリを統合する方法が説明されていません...または単純な私はそれを見つけられませんでした。 – ciro

+0

Spring Securityには 'ContextSource'が必要です。これは私のlibがGSS-API認証であなたに提供するものです。 Kerbeを介して認証し、LDAP経由でユーザーを検索する予定がある場合。あなたは私の他のlibを見て、Spring Security:http://tomcatspnegoad.sourceforge.net/spring-security.htmlでそれをどのようにラップするべきでしょうか。サンプル 'beans.xml'が必要な場合は、私に教えてください。 –

関連する問題