Jump to content

Unable to log in with JS default users after configuring LDAP


gkaechelin

Recommended Posts

  Hi All.

I successfully configured LDAP and am able to log into JS server with my LDAP credentials. However, even though I have left the original daoAuthProvider and anonymous provider in place, I can no longer log in using any of the default credentials. My understanding is that if the LDAP auth fails, the default should then be attempted.

I've included the auth manager and LDAP configuration below. All other applicationContext-security.xml config has be untouched.

I've also attached a clean log file which seems to show that the LDAP auth is being attempted with "superuser" but the default auth is not being executed.

Any ideas would be greatly appreciated.

Thanks.

Gus

Code:
	<!-- ======================== AUTHENTICATION ======================= -->	<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">		<property name="providers">			<list>				<ref local="ldapAuthenticationProvider" />				<ref bean="${bean.daoAuthenticationProvider}" />				<ref bean="anonymousAuthenticationProvider" />				<!--ref local="jaasAuthenticationProvider"/ -->			</list>		</property>	</bean>	<!-- ********** LDAP CONFIGURATION START ********** -->	<bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">		<constructor-arg value="ldap://localhost:10389/ou=users,ou=system" />		<property name="userDn">			<value>uid=admin,ou=system</value>		</property>		<property name="password">			<value>secret</value>		</property>	</bean>	<bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">		<constructor-arg index="0">			<value></value>		</constructor-arg>		<constructor-arg index="1">			<value>(uid={0})</value>		</constructor-arg>		<constructor-arg index="2">			<ref local="ldapContextSource" />		</constructor-arg>		<property name="searchSubtree">			<value>true</value>		</property>	</bean>	<bean id="ldapAuthenticationProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">		<constructor-arg>			<bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">				<constructor-arg>					<ref local="ldapContextSource" />				</constructor-arg>				<property name="userDnPatterns">					<list>						<value>uid={0}</value>					</list>				</property>				<property name="userSearch" ref="userSearch" />			</bean>		</constructor-arg>		<constructor-arg>			<bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">				<constructor-arg index="0">					<ref local="ldapContextSource" />				</constructor-arg>				<constructor-arg index="1">					<value></value>				</constructor-arg>				<property name="groupRoleAttribute">					<value>cn</value>				</property>				<property name="groupSearchFilter">					<value>(&(member={0})(objectclass=groupOfNames))</value>				</property>				<property name="searchSubtree">					<value>true</value>				</property>			</bean>		</constructor-arg>	</bean>
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...