-
Mar 17th, 2010, 12:17 PM
#1
not able to authenticate user after Login
Hi,
I am new to spring security. I am trying to authenticate user using spring security.Actually i am trying to modify the example provided by spring. Need small clarification. can we do only authentication or need to do authentication and authorisation.
actually i need to do authentication only using ldap. I am getting error when trying to login.
please can anybody help how to come out of this error.
Below is the error dexcription and spring context xml file.
error description::
Your login attempt was not successful, try again.
Reason: Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece]; remaining name 'ou=users'; nested exception is org.springframework.ldap.UncategorizedLdapExceptio n: Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece]; remaining name 'ou=users'
context file:
<s:http>
<s:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
<s:intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" />
<s:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<s:form-login />
<s:anonymous />
<s:logout />
</s:http>
<!-- Simple namespace-based configuration -->
<s:ldap-authentication-provider
user-search-base="ou=users"
user-search-filter="(uid={0})" />
<!-- Traditional Bean version of the same configuration -->
<bean id="contextSource" class="org.springframework.security.ldap.DefaultSp ringSecurityContextSource">
<constructor-arg value="ldap://ipaddress:389/ou=users,ou=dotCom,dc=feder,dc=com"/>
</bean>
<bean id="secondLdapProvider" class="org.springframework.security.providers.ldap .LdapAuthenticationProvider">
<s:custom-authentication-provider />
<constructor-arg>
<bean class="org.springframework.security.providers.ldap .authenticator.BindAuthenticator">
<constructor-arg ref="contextSource" />
<property name="userSearch">
<bean id="userSearch" class="org.springframework.security.ldap.search.Fi lterBasedLdapUserSearch">
<constructor-arg index="0" value="ou=users"/>
<constructor-arg index="1" value="(uid={0})"/>
<constructor-arg index="2" ref="contextSource" />
</bean>
</property>
</bean>
</constructor-arg>
</bean>
thanks,
chrk
-
Apr 18th, 2010, 12:03 PM
#2
I hope you find a solution soon. It will help me too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules