Aadhavan G S
Aadhavan G S

Reputation: 95

userDn and Password are needed for autentication type - None or not

Am Developing an application in Spring MVC & JPA with Spring Security. Now Integrating the OUD (Oracle Unified Directory) through LDAP. If the authentication type is none. Is there is any need for userDn and Password

<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
    <constructor-arg value="ldaps://192.168.0.182:1636/o=company"/>
    <property name="userDn" value="cn=userid,ou=groups,o=company"/>
    <property name="password" value="password"/>
</bean>

I am new to LDAP. To my understanding userDn and Password is needed when the authentication type is simple.

Pl.help me to understand

Upvotes: 0

Views: 1328

Answers (1)

mvreijn
mvreijn

Reputation: 2942

You are correct: authentication type none implies a so-called anonymous bind where you access the LDAP directory without authentication and with public rights. Typically, this is used to resolve a username into the full Distinguished Name (DN) of the user that is logging in. A DN is usually of the form CN=user,OU=department,O=organization

For any other authentication types, you will need that DN of the user logging in, and a credential. When you are accessing Active Directory you may also log in using the User Principal Name of the form user@domain. Don't encourage that :-/

Upvotes: 1

Related Questions