I am using Spring and Spring Security 3.0.2.RELEASE. I continue to receive the error:
Code:
Constructor threw exception; nested exception is org.springframework.ldap.BadLdapGrammarException:
Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError:
Lexical error at line 1, column 5. Encountered: ":" (58), after : ""
I have read the posts about referrals and adding a base environment property to the context Source bean to include the java.naming.referral value of follow, but that seems to do nothing to alleviate the problem.
Here's the pertinent security file:
Code:
<beans:bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<beans:constructor-arg value="${ldap.url}"/>
<beans:property name="userDn" value="${ldap.binddn}"/>
<beans:property name="password" value="${ldap.bindpassword}" />
<beans:property name="baseEnvironmentProperties">
<beans:map>
<beans:entry key="java.naming.referral">
<beans:value>${ldap.java.naming.referral {= "follow" in properties file}}</beans:value>
</beans:entry>
</beans:map>
</beans:property>
</beans:bean>
<authentication-manager alias="ldapAuthManager">
<ldap-authentication-provider
server-ref="contextSource"
user-search-base=""
user-search-filter="${ldap.user.searchfilter}"
role-prefix="${ldap.role.prefix}"
user-context-mapper-ref="ldapUserDetailsContextMapper"
></ldap-authentication-provider>
</authentication-manager>
Really stuck here... any input appreciated.