AnsweredAssumed Answered

Authenticate Alfresco to LDAP using sAMAccountName

Question asked by christinedy on Oct 16, 2007
Hi all…
I'm trying to integrate Alfresco + CAS to connect to my LDAP. With the help of CIGNEX's do it your self manual, I manage to get Alfresco to show CAS page so to ask user to login to CAS first. However after I login successfully, Alfresco shows it fails with this error message

com.cignex.portal.security.auth.AutoLoginException: com.cignex.portal.security.authentication.AuthenticationException: LDAP authentication failed.
caused by:
com.cignex.portal.security.authentication.AuthenticationException: LDAP authentication failed.
caused by:
javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece]

This might be caused by the way I configure things. I bind the username to sAMAccountName on CAS. While on Alfresco, I didn't manage to use sAMAccountName so I use CN.

My question is:
1. Can alfresco be configured to map the username to sAMAccountName?
2. Does CIGNEX's Alfresco LDAP integration that uses CAS ask Alfresco (not the user, but Alfresco) to login to LDAP once more after the user login in the CAS login page?

FYI, here's what I have configured in ldap-authentication-context.xml

I've configured the username format accordingly.

<bean id="authenticationComponent" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
    <property name="LDAPInitialDirContextFactory">
        <ref bean="ldapInitialDirContextFactory"/>
    </property>
    <property name="userNameFormat">
        <value>cn=%s,ou=users,ou=system,dc=company,dc=com</value>
    </property>
</bean>

I have also map set the userIdAttributeName to sAMAccountName for both user and group.

<property name="userIdAttributeName">
    <value>sAMAccountName</value>
</property>

I have also map the attribute cm:userName to sAMAccountName.

<entry key="cm:userName">
    <value>sAMAccountName</value>
</entry>

Can someone help me with this please… Thank you.

Outcomes