cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP authentication config changed from 1.4 to HEAD?

brunom
Champ in-the-making
Champ in-the-making
Hello,

I am trying to get Alfresco HEAD compiled and working since we were having some problems importing masses of content from our current NFS share into Alfresco (tried LDAP, CIFS and FTP, all had one problem or another).

With Alfresco-HEAD (no LDAP authentication), I could copy all the content much much faster with WebDAV that I had been able to do before so I got tempted to look into deploying this one.

However, using an "out of box" compile of Alfresco HEAD (even today's Rev # 326), when I enable LDAP authentication (with the same config file I used for Alfresco 1.4), I get:

[…]
Caused by: org.alfresco.error.AlfrescoRuntimeException: Not implemented
at org.alfresco.repo.security.authentication.DefaultMutableAuthenticationDao.loadUserByUsername(DefaultMutableAuthenticationDao.java:402)
at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:390)
at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225)
at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
[…]

which leads me to believe that either:
a) the configuration for LDAP authentication has changed between v1.4 and SVN HEAD
b) I've missed something as the LDAP import seems to work (from the Exporter logs)

Can anyone point me to the right docs (if any)?

Thank you in advance.
3 REPLIES 3

brunom
Champ in-the-making
Champ in-the-making
Responding to my own question, I've found out what the issue was:

In my ldap-authentication-context.xml file, I was referring to:

<bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">

However when I did a diff of my modified file against the sample version on SVN, it turns out the ID of the bean is authenticationComponent and not authenticationComponentImpl. That seems to have solved the problem I was having.

It's time to get this tested in-house now Smiley Happy

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

You are correct.

Regards

Andy

mdbhokie
Champ in-the-making
Champ in-the-making
I'm getting the same error with simple ldap authentication. 

My ldap config file looks like this:

<beans>
                <bean name="authenticationDao" class="org.alfresco.repo.security.authentication.DefaultMutableAuthenticationDao" >
            <property name="allowDeleteUser">
                <value>true</value>
            </property>
        </bean>   
         
        <!– LDAP authentication configuration –>
                   
    <bean id="ldapInitialDirContextFactory" class="org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl">
        <property name="initialDirContextEnvironment">
            <map>
                <!– The LDAP provider –>
                <entry key="java.naming.factory.initial">
                    <value>com.sun.jndi.ldap.LdapCtxFactory</value>
                </entry>
          
                <entry key="java.naming.provider.url">
                    <value>ldap://localhost:389</value>
                </entry>
               
                <entry key="java.naming.security.authentication">
                    <value>simple</value>
                </entry>
              
                <entry key="java.naming.security.principal">
                    <!– <value>administrator</value> –>
                    <value>cn=administrator,dc=aaa,dc=aaa,dc=com</value>
                </entry>
               
                <!– The password for the user defined above –>
                <entry key="java.naming.security.credentials">
                    <value>aaaa</value>
                </entry>
            </map>
        </property>
    </bean>
    </beans>

I don't have the bean w/ the changed name.  Any idea how I can get this working?

Thanks,

Mike