0

現在、Spring Security を使用して LDAP サーバーに対して認証を行っています。これは実際には Active Directory であるため、ユーザーは Windows ユーザーとパスワードを入力して Windows にログインし、同じユーザーとパスワードを入力してこのアプリにログインする必要があります。これは私のユーザーを夢中にさせています。

ブラウザが提供する場合はWindowsの資格情報を使用し、それ以外の場合はログインフォームを表示するようにSpringに指示する方法はありますか?

これは私の現在の構成です:

<security:http auto-config="true" use-expressions="true">
    <security:intercept-url pattern="/admin/**"
        access="hasRole('ADMIN')" />
    <security:intercept-url pattern="/**"
        access="isAuthenticated()" />
</security:http>

<security:ldap-server id="ldapServer"
    url="ldap://ldapserver:389/OU=Users,OU=Prod,DC=hhh,DC=org"
    manager-dn="xxx@hhh.org" manager-password="xxx" />
<security:authentication-manager alias="ldapAuthenticationManager">
    <security:ldap-authentication-provider user-context-mapper-ref="userContextMapper"
        user-search-filter="(sAMAccountName={0})"/>
</security:authentication-manager>

userContextMapper は、ユーザー エンティティをロードするために実装したクラスです。

4

0 に答える 0