Spring Security Active Directory Ignoring PartialResultException

自古美人都是妖i 提交于 2021-02-07 14:50:37

问题


I have the following configuration in my spring security xml file. When I try to authenticate I get the following message but cannot proceed.

INFO: Ignoring PartialResultException

I am aware that spring's documentation states that you can set ignorePartialResultException to true but this property seems to be in the LdapTemplate class which may require additional coding. I would like to accomplish all of this through bean configuration as I am not interested in role mapping.

<authentication-manager>
        <authentication-provider ref="activeDirectoryAuthProvider" />
    </authentication-manager>
    <beans:bean id="activeDirectoryAuthProvider"
        class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
        <beans:constructor-arg value="mydomain.com" />
        <beans:constructor-arg value=" ldap://mydomain.com:389" />
    </beans:bean>

回答1:


After digging around we found out that our role mapping was blocking the authentication. We were in fact hitting AD but Spring was trying to map a group name to a role that didn't exist within our system. Once we did that we were good to go.



来源:https://stackoverflow.com/questions/25264619/spring-security-active-directory-ignoring-partialresultexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!