私はSpringで開発されたアプリケーションでLDAP Direcotoryとの接続を試みています。 LDAPディレクトリにアクセスできるサービスアカウントがありますが、設定に問題があります。サービスアカウントを持つLDAPディレクトリへのSpring認証
私のサービスアカウント:ログイン/パスワード>>サービス/ servcicepass
LDAPディレクトリ内のregistredつのユーザーアカウント:ログイン/パスワード>>
USER1/PASS1
私はログインインターフェイスでユーザーアカウントでログインしようとするとエラーが表示されますが、ログイン/パスワードを入力すると電子サービスアカウント私は、ログイン
マイユーザーcoontext.xmlファイルは、次のとおりです。
> <!-- LDAP --> <security:ldap-server
> url="ldap://192.168.1.68:389/o=digital" /> <bean
> id="ldapAuthProvider"
> class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
> <constructor-arg> <bean
> class="org.springframework.security.ldap.authentication.BindAuthenticator">
> <constructor-arg ref="contextSource" />
> <property name="userDnPatterns">
> <list>
> <value>uid={0}</value>
> </list>
> </property> </bean> </constructor-arg> <constructor-arg> <bean
> class="edu.mit.kit.userdetails.MappedLdapAuthoritiesPopulator">
> <property name="admins">
> <set>
> <!-- list admin usernames here -->
> </set>
> </property> </bean> </constructor-arg> </bean>
> <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
> <property name="url" value="ldap://192.168.1.68:389/"> <property
> name="base" value="o=digital,ou=TechnicalAccount,ou=Comp" /> </bean>
>
> <bean id="ldapTemplate"
> class="org.springframework.ldap.core.LdapTemplate"> <constructor-arg
> name="contextSource" ref="contextSource" /> </bean> <bean
> id="ldapUserInfoRepository" primary="true"
> class="edu.mit.kit.repository.impl.LdapUserInfoRepository">
> <property name="ldapTemplate" ref="ldapTemplate" /> </bean>
><!-- end LDAP -->
はあなたが助けてくださいことはできますか?