cancel
Showing results for 
Search instead for 
Did you mean: 

Labs3 Stable multiple LDAP Chaining Configuration

rxm307
Champ in-the-making
Champ in-the-making
I've tested authentication to a single LDAP server successfully but now I want to chain several Ldap servers together, I've been following the instructions from http://wiki.alfresco.com/w/images/0/0b/Install_Configure_Alfresco_Lab3Stable.pdf
on "Chaining multiple LDAP servers"
but as soon as I load the config for chaining-authentication-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="authenticationService"
class="org.alfresco.repo.security.authentication.ChainingAuthenticationServiceImpl">
<property name="authenticationServices">
<list>
<ref bean="authenticationServiceLDAP2"/>
</list>
</property>
<property name="mutableAuthenticationService">
<ref bean="authenticationServiceLDAP1"/>
</property>
<property name="sysAdminCache">
<ref bean="sysAdminCache"/>
</property>
</bean>
<bean id="authenticationComponent"
class="org.alfresco.repo.security.authentication.ChainingAuthenticationComponentImpl">
<property name="authenticationComponents">
<list>
<ref bean="authenticationComponentLDAP2"/>
</list>
</property>
<property name="mutableAuthenticationComponent">
<ref bean="authenticationComponentLDAP1"/>
</property>
</bean>
<!– LDAP1 –>
<bean id="authenticationServiceLDAP1"
class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
<property name="authenticationDao">
<ref bean="authenticationDaoLDAP1"/>
</property> <property name="ticketComponent">
<ref bean="ticketComponent"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponentLDAP1"/>
</property> </bean>
<!– LDAP2 –>
<bean id="authenticationServiceLDAP2"
class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
<property name="authenticationDao">
<ref bean="authenticationDaoLDAP2"/>
</property>
<property name="ticketComponent">
<ref bean="ticketComponent"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponentLDAP2"/>
</property>
</bean>
</beans>

Alfresco fails to start with the errors below
11:24:09,599 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
java.lang.NullPointerException
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.isSystemUserName(AbstractAuthenticationComponent.java:299)
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setCurrentUser(AbstractAuthenticationComponent.java:161)
        at org.alfresco.repo.security.authentication.ChainingAuthenticationComponentImpl.setCurrentUser(ChainingAuthenticationComponentImpl.java:373)
        at org.alfresco.repo.security.authentication.ChainingAuthenticationComponentImpl.setSystemUserAsCurrentUser(ChainingAuthenticationComponentImpl.java:407)
        at org.alfresco.repo.importer.system.SystemInfoBootstrap.bootstrap(SystemInfoBootstrap.java:124)
        at org.alfresco.repo.importer.system.SystemInfoBootstrap.onBootstrap(SystemInfoBootstrap.java:190)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

if I roll back this config to the default chaining-authentication-context.xml from chaining-authentication-context.xml.sample alfresco loads correctly although without any LDAP authentication
5 REPLIES 5

rxm307
Champ in-the-making
Champ in-the-making
If I use the config from here I can chain Alfresco Auth & LDAP

http://nix.theism.de/alfresco-authentication-with-openldap-on-debian-etch/

but what I really need to do is chain several LDAP servers together

rxm307
Champ in-the-making
Champ in-the-making
I've now lodged this as a bug in JIRA

https://issues.alfresco.com/jira/browse/ALFCOM-2645

rxm307
Champ in-the-making
Champ in-the-making
Tried this again this time with Enterprise 3.1 Trial and with the updated documentation at http://www.alfresco.com/products/ecm/enttrial/files/installing_configuring_alfresco_ecm3_1.pdf

and this appears to only authenticate to the first LDAP server in the chain and none of the others

webrat
Champ in-the-making
Champ in-the-making
I'm experiencing the same probles as the user in the first post does.
Is there already a solution (maybe an fixed configuration) there?

rxm307
Champ in-the-making
Champ in-the-making
I was able to get this working in Alfresco Labs 3.2 Preview #1, but it looks like Preview #2 is out……..