Announcement Announcement Module
No announcement yet.
LdapPasswordAuthenticationDao with appfuse Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • LdapPasswordAuthenticationDao with appfuse

    I'm using LdapPasswordAuthenticationDao from acegi with appfuse 1.8.
    For that I add these lines to applicationContext-security.xml:

    <bean id="authenticationProvider"
    class="net.sf.acegisecurity.providers.dao.Password DaoAuthenticationProvider">
    <property name="passwordAuthenticationDao"><ref

    <bean id="ldapDaoImpl"
    class="net.sf.acegisecurity.providers.dao.ldap.Lda pPasswordAuthenticationDao">
    <property name="URL"><value>ldap://localhost:389/</value></property>
    name="userContext"><value>uid={0},o=users,o=prueba ,c=es</value></property>
    <property name="defaultRole"><value>tomcat</value></property>

    For the users I suppose I should use posixAccount. The userPassword is encrypted with SHA algorithm. (I also tested plain and md5)

    When I try to login I get this:

    [inventario] DEBUG [http8080-Processor24
    ] LoginServlet.execute(208) |
    Encrypting password for user 'perico'
    [inventario] DEBUG [http8080-Processor24] LoginServlet.execute(219) |
    Authenticating user 'perico'
    [inventario] WARN [http8080-Processor25]
    LoggerListener.onApplicationEvent(114) | Authentication failed due to
    invalid username or password: perico; details:
    [email protected] bf5ee7:
    RemoteIpAddress:; SessionId:

    In the logs of the openldap I see it does a bind with success. Anybody knows what's the matter? Thanks for read

  • #2
    I'd first try messing around w/ the LDAP context settings, OpenLDAP seems to be a little fussy about how / where these are specified - I'd try changing what you have to be:

    <bean id="ldapDaoImpl" class="net.sf.acegisecurity.providers.dao.ldap.LdapPasswordAuthenticationDao">
        <property name="URL"><value>ldap&#58;//localhost&#58;389/</value></property>
        <property name="rootContext"><value>o=prueba,c=es</value></property>
        <property name="userContext"><value>uid=&#123;0&#125;,o=users</value></property>
        <property name="defaultRole"><value>tomcat</value></property>
    If that doesn't help let me know, and I'll see if I can come up w/ any other suggestions.[/code]