Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Security Active Directory Ignoring PartialResultException

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>
like image 265
Matt E Avatar asked Aug 12 '14 12:08

Matt E


1 Answers

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.

like image 184
Matt E Avatar answered Sep 27 '22 20:09

Matt E