Announcement Announcement Module
Collapse
No announcement yet.
LdapPasswordAuthenticationDao with appfuse Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • 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
    local="ldapDaoImpl"/></property>
    </bean>

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

    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:
    net.sf.acegisecurity.ui.WebAuthenticationDetails@1 bf5ee7:
    RemoteIpAddress: 127.0.0.1; SessionId:
    CE591EB1D0A58207FAD2E2FBED641F2F

    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:

    Code:
    <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>
    </bean>
    If that doesn't help let me know, and I'll see if I can come up w/ any other suggestions.[/code]

    Comment

    Working...
    X