cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure LDAP to search for user?

alfresco-user12
Champ in-the-making
Champ in-the-making
I'm trying to configure Alfresco to use LDAP to authenticate users. Currently, I can get it to authenticate, using the manager's credentials if I specify the complete ldap path (ex. cn=Manager,dc=company,dc=com)  to the manager's credentials as the user name. With any other user name, it just tries to bind whatever I type in as a username which will never work. And I know this because that is what I see in  my OpenLDAP logs.

How do I get it to search LDAP tree with the manager's credentials for the specified username?

I'm currently using:
Alfresco 1.3 on Windows 2003
OpenLDAP for authentication
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

To use simple authentication you probably want the user to type in a CN and then use the userNameFormat to expand this to the full DN.


    <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
        <property name="LDAPInitialDirContextFactory">
            <ref bean="ldapInitialDirContextFactory"/>
        </property>
        <property name="userNameFormat">
            <!–
           
            This maps between what the user types in and what is passed through to the underlying LDAP authentication.
           
            "%s" - the user id is passed through without modification.
            Used for LDAP authentication such as DIGEST-MD5, anything that is not "simple".
           
            "cn=%s,ou=London,dc=company,dc=com" - If the user types in "Joe Bloggs" the authentricate as "cn=Joe Bloggs,ou=London,dc=company,dc=com"
            Usually for simple authentication.
           
            –>
            <value>%s</value>
        </property>
    </bean>
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If you have many locations in which to look then you can use chaining authentication.

It is easy to set up md5 authentication (and the serach for user by userid). See the wiki. Then users type in thier user id which is probably what they expect.

http://wiki.alfresco.com/wiki/Enterprise_Security_and_Authentication_Configuration

Regards

Andy