Spring Security Active Directory Ignoring PartialResultException

11,831

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.

Share:
11,831
Matt E
Author by

Matt E

Updated on June 24, 2022

Comments

  • Matt E
    Matt E almost 2 years

    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>