cancel
Showing results for 
Search instead for 
Did you mean: 

Bonjour à tous.J'éssaye de mettre en place la synchronisation...

grome
Champ in-the-making
Champ in-the-making
Bonjour à tous.
J'éssaye de mettre en place la synchronisation à partir d'un annuaire LDAP.
J'utilise la version Alfresco OpenSource 100% 1.2.1 mais cela ne doit pas être différent de la version Enterprise

Voici ce que j'ai dans mes fichiers de configuration

authentication-services-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<!– ===================================================================  –>
<!– This file contains the bean definitions that support authentication  –>
<!– ===================================================================  –>

<!–                                                                        –>
<!– Acegi is used for authentication and protecting method calls on public –>
<!– services. To do this requires our authentication mechanism to work     –>
<!– within the acegi framework.                                            –>
<!–                                                                        –>
<!– It is important to decide if user names are case sensitive or not.     –>
<!– This is configured in repository.properties.                           –>
<!–                                                                        –>
<!–                                                                        –>
<!– TODO:                                                                  –>
<!–                                                                        –>
<!– The transactional wrappers should be removed from the beans in this    –>
<!– file. This should be done in the public services definitions.          –>
<!– This requires some tests to be fixed up.                               –>
<!–                                                                        –>


<beans>
    <!–                                                                    –>
    <!– The Acegi authentication manager.                                  –>
    <!–                                                                    –>
    <!– Provders are asked to authenticate in order.                       –>
    <!– First, is a provider that checks if an acegi authentication object –>
    <!– is already bound to the executing thread. If it is, and it is set  –>
    <!– as authenticated then no further authentication is required. If    –>
    <!– this is absent, Acegi validates the password for every method      –>
    <!– invocation, which is too CPU expensive. If we set an               –>
    <!– authentication based on a ticket etc …. or we want to set the    –>
    <!– the system user as the current user … we do not have the         –>
    <!– password. So if we have set an authentication and set it as        –>
    <!– authenticated that is sufficient to validate the user.             –>
    <!–                                                                    –>
    <!– If the authentication bound to the current thread is not set as    –>
    <!– authenticated the standard Acegi DAO Authentication provider       –>
    <!– is used to authenticate.                                           –>
    <!–                                                                    –>

    <bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderManager">
        <property name="providers">
            <list>
                <ref bean="authenticatedAuthenticationPassthroughProvider" />
                <ref bean="daoAuthenticationProvider" />
            </list>
        </property>
    </bean>

    <!– We provide a DAO to plug into the Acegi DaoAuthenticationProvider  –>

    <bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
        <property name="authenticationDao">
            <ref bean="alfDaoImpl" />
        </property>
        <property name="saltSource">
            <ref bean="saltSource" />
        </property>
        <property name="passwordEncoder">
            <ref bean="passwordEncoder" />
        </property>
    </bean>

    <!– An authentication Provider that just believes authentications      –>
    <!– bound to the local thread are valid if they are set as             –>
    <!– authenticated.                                                     –>

    <bean id="authenticatedAuthenticationPassthroughProvider" class="org.alfresco.repo.security.authentication.AuthenticatedAuthenticationPassthroughProvider" />

    <!– The authroity DAO implements an interface extended from the Acegi  –>
    <!– DAO that supports CRUD.                                            –>

    <bean id="alfDaoImpl" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
        <property name="proxyInterfaces">
            <value>org.alfresco.repo.security.authentication.MutableAuthenticationDao</value>
        </property>
        <property name="transactionManager">
            <ref bean="transactionManager" />
        </property>
        <property name="target">
            <ref bean="authenticationDao"/>
        </property>
        <property name="transactionAttributes">
            <props>
                <prop key="*">${server.transaction.mode.default}</prop>
            </props>
        </property>
    </bean>

    <bean id="authenticationDao" class="org.alfresco.repo.security.authentication.RepositoryAuthenticationDao">
       <property name="nodeService">
           <ref bean="nodeService" />
       </property>
       <property name="dictionaryService">
           <ref bean="dictionaryService" />
       </property>
       <property name="namespaceService">
           <ref bean="namespaceService" />
       </property>
       <property name="searchService">
           <ref bean="searchService" />
       </property>
       <property name="userNamesAreCaseSensitive">
          <value>${user.name.caseSensitive}</value>
       </property>
       <property name="passwordEncoder">
           <ref bean="passwordEncoder" />
       </property>
    </bean>

    <!–**************************************************************************–>
    <!– EBI ADD                                                ******************–>
    <!– Authentification par LDAP                              ******************–>
    <!–**************************************************************************–>
        <bean id="ldapInitialDirContextFactory" class="org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl">
        <property name="initialDirContextEnvironment">
                <map>
                        <entry key="java.naming.factory.initial">
                                <value>com.sun.jndi.ldap.LdapCtxFactory</value>
                        </entry>
                        <entry key="java.naming.provider.url">
                                <value>ldap://192.168.10.220:389</value>
                        </entry>
                        <entry key="java.naming.security.authentication">
                                <value>simple</value>
                        </entry>
                        <entry key="java.naming.security.principal">
                                <value>reader</value>
                        </entry>
                        <entry key="java.naming.security.credentials">
                                <value>secret</value>
                        </entry>
                </map>
        </property>
        </bean>

    <!– The DAO also acts as a salt provider.                              –>

    <alias alias="saltSource" name="alfDaoImpl"/>

    <!– Passwords are encoded using MD4                                    –>
    <!– This is not ideal and only done to be compatible with NTLM         –>
    <!– authentication against the default authentication mechanism.       –>

    <bean id="passwordEncoder" class="org.alfresco.repo.security.authentication.MD4PasswordEncoderImpl"></bean>

<!–
    <bean id="userType" class="org.alfresco.repo.security.authentication.UserType" init-method="init">
        <property name="policyComponent">
            <ref bean="policyComponent" />
        </property>
        <property name="nodeService">
            <ref bean="nodeService" />
        </property>
        <property name="passwordEncoder">
            <ref bean="passwordEncoder" />
        </property>
    </bean>
–>

    <!– A transactional wrapper around the implementation.                 –>
    <!– TODO: This should be removed.                                      –>

    <bean id="authenticationService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
        <property name="proxyInterfaces">
            <value>org.alfresco.service.cmr.security.AuthenticationService</value>
        </property>
        <property name="transactionManager">
            <ref bean="transactionManager" />
        </property>
        <property name="target">
            <ref bean="authenticationServiceImpl" />
        </property>
        <property name="transactionAttributes">
            <props>
                <prop key="*">${server.transaction.mode.default}</prop>
            </props>
        </property>
    </bean>

    <!– The Authentication Service implementation.                         –>
    <!–                                                                    –>
    <!– This delegates its work to two services:                           –>
    <!– an AuthenticationComponent and a MutableAuthenticationDAO.         –>
    <!–                                                                    –>
    <!– The permissions service is required so that permissions can be     –>
    <!– cleaned up when a user is deleted.                                 –>

    <bean id="authenticationServiceImpl" class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
        <property name="authenticationDao">
            <ref bean="alfDaoImpl" />
        </property>
        <property name="ticketComponent">
            <ref bean="ticketComponent" />
        </property>
        <property name="authenticationComponent">
            <ref bean="authenticationComponentImpl" />
        </property>
    </bean>

    <!– A transactional wrapper that should be removed.                    –>

    <bean id="authenticationComponent" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
        <property name="proxyInterfaces">
            <value>org.alfresco.repo.security.authentication.AuthenticationComponent</value>
        </property>
        <property name="transactionManager">
            <ref bean="transactionManager" />
        </property>
        <property name="target">
            <ref bean="authenticationComponentImpl" />
        </property>
        <property name="transactionAttributes">
            <props>
                <prop key="*">${server.transaction.mode.default}</prop>
            </props>
        </property>
    </bean>

    <!– The authentication component.                                      –>

    <!–<bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">
        <property name="authenticationDao">
            <ref bean="alfDaoImpl" />
        </property>
        <property name="authenticationManager">
            <ref bean="authenticationManager" />
        </property>
        <property name="allowGuestLogin">
            <value>true</value>
        </property>
    </bean>–>


    <!– Simple Authentication component that rejects all authentication requests –>
    <!– Use this defintion for Novell IChain integration.                        –>
    <!– It should never go to the login screen  so this is not required          –>
    <!– (Enterprise version only)                                                –>

    <!–
    <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.SimpleAcceptOrRejectAllAuthenticationComponentImpl">
    </bean>
    –>
        <!–**************************************************************************–>
        <!– EBI ADD                                                ******************–>
        <!– Authentification par LDAP                              ******************–>
        <!–**************************************************************************–>

        <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl">
        <property name="LDAPInitialDirContextFactory">
                <ref bean="ldapInitialDirContextFactory" />
        </property>
        <property name="userNameFormat">
                <value>uid=%s,ou=People,dc=excilys,dc=com</value>
        </property>
        </bean>

    <!– The person service.                                                –>

    <bean id="personService" class="org.alfresco.repo.security.person.PersonServiceImpl">
                <property name="nodeService">
                    <ref bean="nodeService" />
                </property>
                <property name="searchService">
                    <ref bean="searchService" />
                </property>
                <property name="permissionServiceSPI">
                        <ref bean="permissionServiceImpl" />
                </property>
        <property name="authorityService">
           <ref bean="authorityService" />
        </property>
                <property name="namespacePrefixResolver">
                        <ref bean="namespaceService" />
                </property>
        <!– Configurable properties.                                 –>
        <!–                                                          –>
        <!– TODO:                                                    –>
        <!– Add support for creating real home spaces adn setting    –>
        <!– permissions on the hame space and people created.        –>
        <!–                                                          –>
        <!– The store in which people are persisted.                 –>
        <property name="storeUrl">
           <value>${spaces.store}</value>
        </property>
        <!– The path to the company home space, used to set the      –>
        <!– default home space for users that are created if         –>
        <!– missing.                                                 –>
        <property name="companyHomePath">
           <value>/${spaces.company_home.childname}</value>
        </property>
        <!– Some authentication mechanisms may need to create people –>
        <!– in the repository on demand. This enables that feature.  –>
        <!– If dsiabled an error will be generated for missing       –>
        <!– people. If enabled then a person will be created and     –>
        <!– persisted.                                               –>
        <!–                                                          –>
        <!– This value should be false or only true if the           –>
        <!– repository is mutable; set from the property             –>
        <!– ${server.transaction.allow-writes}                       –>
        <property name="createMissingPeople">
           <value>${server.transaction.allow-writes}</value>
        </property>
        <!– Set is user names are case sensitive - taken from the    –>
        <!– repository wide setting - you are advised not to change  –>
        <!– this setting.                                            –>
        <!– This value should be ${user.name.caseSensitive}          –>
        <property name="userNamesAreCaseSensitive">
           <value>${user.name.caseSensitive}</value>
        </property>
    </bean>

    <!– The ticket component.                                              –>
    <!– Used for reauthentication                                          –>
    <bean id="ticketComponent" class="org.alfresco.repo.security.authentication.InMemoryTicketComponentImpl">
        <!– The period for which tickets are valid in XML duration format. –>
        <!– The default is P1H for one hour.                               –>
        <property name="validDuration">
            <value>P1H</value>
        </property>
        <!– Do tickets expire or live for ever?                            –>
        <property name="ticketsExpire">
            <value>false</value>
        </property>
        <!– Are tickets only valid for a single use?                       –>
        <property name="oneOff">
            <value>false</value>
        </property>
    </bean>

        <bean id="ldapPeopleExportSource" class="org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource">
        <property name="personQuery">
                <value>(objectclass=inetOrgPerson)</value>
        </property>
        <property name="searchBase">
                <value>ou=People,dc=excilys,dc=com</value>
        </property>
        <property name="userIdAttributeName">
                <value>uid</value>
        </property>
        <property name="LDAPInitialDirContextFactory">
                <ref bean="ldapInitialDirContextFactory" />
        </property>
        <property name="personService">
                <ref bean="personService"></ref>
        </property>
        <property name="namespaceService">
                <ref bean="namespaceService" />
        </property>
        <property name="defaultHomeFolder">
                <value>/app:company_home</value>
        </property>
        <property name="attributeMapping">
                <map>
                <entry key="cm:userName">
                        <value>cn</value>
                </entry>
                <entry key="cm:firstName">
                        <value>givenName</value>
                </entry>
                <entry key="cm:lastName">
                        <value>sn</value>
                </entry>
                <entry key="cm:email">
                        <value>mail</value>
                </entry>
                <entry key="cm:organizationId">
                        <value>o</value>
                </entry>
                </map>
        </property>
        </bean>

        <bean id="ldapPeopleImport" class="org.alfresco.repo.importer.ExportSourceImporter">
        <property name="importerService">
                <ref bean="importerComponent" />
        </property>
        <property name="transactionService">
                <ref bean="transactionComponent"/>
        </property>
        <property name="authenticationComponent">
                <ref bean="authenticationComponent" />
        </property>
        <property name="exportSource">
                <ref bean="ldapPeopleExportSource" />
        </property>
        <property name="storeRef">
                <value>${spaces.store}</value>
        </property>
        <property name="path">
                <value>/${system.system_container.childname}/${system.people_container.childname}</value>
        </property>
        <property name="clearAllChildren">
                <value>false</value>
        </property>
        <property name="nodeService">
                <ref bean="nodeService" />
        </property>
        <property name="searchService">
                <ref bean="searchService" />
        </property>
        <property name="namespacePrefixResolver">
                <ref bean="namespaceService" />
        </property>
        </bean>
</beans>
scheduled-jobs-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>
    <!–                –>
    <!– Scheduled jobs –>
    <!–                –>

    <bean id="ftsIndexerTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
        <property name="jobDetail">
            <bean id="ftsIndexerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="bean">
                            <ref bean="LuceneFullTextSearchIndexer" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="startDelay">
            <value>60000</value>
        </property>
        <property name="repeatInterval">
            <value>60000</value>
        </property>
    </bean>

    <bean id="tempFileCleanerTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
        <property name="jobDetail">
            <bean id="tempFileCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.util.TempFileProvider$TempFileCleanerJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="protectHours">
                            <value>1</value>
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="startDelay">
            <value>1800000</value><!– start after half an hour –>
        </property>
        <property name="repeatInterval">
            <value>3600000</value><!– repeat every hour –>
        </property>
    </bean>

    <bean id="contentStoreCleanerTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="fileContentStoreCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.content.cleanup.ContentStoreCleanupJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="contentStoreCleaner">
                            <ref bean="contentStoreCleaner" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <!– trigger at 4am –>
        <property name="hour">
            <value>04</value>
        </property>
        <property name="minute">
            <value>00</value>
        </property>
        <property name="repeatInterval">
            <value>86400000</value>     <!– repeat daily –>
        </property>
    </bean>

    <bean id="indexRecoveryTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
        <property name="jobDetail">
            <bean id="IndexRecoveryJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="indexRecoveryComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="startDelay">
            <value>60000</value>       <!– start after 1 minute –>
        </property>
        <property name="repeatCount">
            <value>0</value>           <!– DO NOT REPEAT !!!!! –>
        </property>
    </bean>

    <bean id="indexBackupTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="IndexBackupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory$LuceneIndexBackupJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="luceneIndexBackupComponent">
                            <ref bean="luceneIndexBackupComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <!– trigger at 3am –>
        <property name="hour">
            <value>03</value>
        </property>
        <property name="minute">
            <value>00</value>
        </property>
        <property name="repeatInterval">
            <value>86400000</value>     <!– repeat daily –>
        </property>
    </bean>

    <!– enable DEBUG for 'org.alfresco.repo.cache.EhCacheTracerJob' to activate –>
    <bean id="ehCacheTracerJob" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
        <property name="jobDetail">
            <bean id="ehCacheTracerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.cache.EhCacheTracerJob</value>
                </property>
            </bean>
        </property>
        <property name="startDelay">
            <value>3600000</value><!– start after an hour –>
        </property>
        <property name="repeatInterval">
            <value>3600000</value><!– repeat every hour –>
        </property>
    </bean>

        <bean id="ldapPeopleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
                <property name="jobDetail">
                        <bean id="ldapPeopleJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                                <property name="jobClass">
                                        <value>org.alfresco.repo.importer.ImporterJob</value>
                                </property>
                                <property name="jobDataAsMap">
                                        <map>
                                                <entry key="bean">
                                                        <ref bean="ldapPeopleImport" />
                                                </entry>
                                        </map>
                                </property>
                        </bean>
                </property>
                <property name="startDelay">
                        <value>30000</value>
                </property>
                <property name="repeatInterval">
                        <value>3600000</value>
                </property>
        </bean>

    <!– Scheduled tasks –>
    <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="triggers">
            <list>
                <ref bean="tempFileCleanerTrigger" />
                <ref bean="contentStoreCleanerTrigger"/>
                <ref bean="ftsIndexerTrigger" />
                <ref bean="indexRecoveryTrigger" />
                <ref bean="indexBackupTrigger" />
                <!–
                <ref bean="ldapGroupTrigger" />
                –>
                <ref bean="ldapPeopleTrigger" />

                <!–
                <ref bean="ehCacheTracerJob" />
                –>
            </list>
        </property>
        <property name="waitForJobsToCompleteOnShutdown">
            <value>true</value>
        </property>
        <property name="configLocation">
            <value>classpath:alfresco/domain/quartz.properties</value>
        </property>
    </bean>

</beans>
Et voici les erreurs que j'ai :
May 3, 2006 11:29:57 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 3, 2006 11:29:57 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 3, 2006 11:29:57 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
May 3, 2006 11:29:57 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 3, 2006 11:29:57 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13103 ms
11:30:24,413 ERROR [quartz.core.JobRunShell] Job DEFAULT.ldapPeopleJobDetail threw an unhandled Exception:
org.alfresco.repo.importer.ExportSourceImporterException: Failed to import
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:165)
        at org.alfresco.repo.importer.ImporterJob.execute(ImporterJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource.generateExport(LDAPPersonExportSource.java:145)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:149)
        … 3 more
Caused by: javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2926)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:72)
        … 6 more
Cordialement,
Jérôme.
21 REPLIES 21

lme
Champ in-the-making
Champ in-the-making
Il faut faire attention avec les mises à jour, les fichiers ne sont pas forcement remplacer. En théorie, il ne faudrait pas toucher aux fichiers de configuration par défaut et faire toutes les modifications dans des fichiers .xml placés dans le dossier extension.

Ce que je vous conseille de faire c'est de partire d'une nouvelle installation d'alfresco 1.2.1 en récupérant les données de l'ancien alfresco. Il y a une procédure sur le wiki que je n'ai jamais testée :
http://wiki.alfresco.com/wiki/Backup_and_Restore

Commencez déjà par faire fonctionner l'autentification via LDAP, puis dans un second temps, voir pour l'importation des utilisateurs/groupes.

Vous êtes sur la bonne piste, courage Smiley Wink

content-manager
Champ in-the-making
Champ in-the-making
Merci pour votre aide.
Avec une version "complete" de la version 1.2.1, il est certain que l'authentification ldap fonctionne bien mieux. Je pense que lors de la montée de version, certains fichiers ont mal été modifié.

Encore une petite question, mon ancien compte administrateur n'est plus disponible! Les mots de passe des comptes admin, et administrator ne sont plus corrects depuis l'authentification LDAP.
Comment réinistaliser les mots de passe? La procédure d'insertion de login (authority-services-context.xml ) permet d'inserer de nouveau login, mais quel est le mot de passe?

lme
Champ in-the-making
Champ in-the-making
Le compte 'admin' est un compte local et n'est pas un compte valide sur le LDAP. On ne peut pas non plus réinitialiser les mots de passe (le compte 'admin' n'existe pas dans le LDAP). Il faut ajouter un utilisateur dans la liste des administrateurs. Pour cela, il faut éditer le fichier authority-services-context.xml et ajouter le nom d'utilisateur dans la liste :
<property name="adminUsers">
  <set>
    <value>admin</value>
    <value>administrator</value>
    <value>mon_utilisateur</value>
  </set>
</property>
Il faut remplacer nom_utilisateur par le nom d'utilisateur que vous utilisez pour vous connecter sur Alfresco. Ne pas oublier de redémarrer alfresco et la prochaine fois que vous utiliserez le compte nom_utilisateur, vous aurez les droits administrateur … normalement Smiley Happy

content-manager
Champ in-the-making
Champ in-the-making
Oui, je suis tout a fait d'accord avec votre réponse.
Cependant, il me semble avoir vu lors de la config des fichiers qu'un des parametres permettaient de garder les utilisateurs deja presents sous alfresco tout en important ceux de l'annuaire LDAP.
Il me semble qu'il fallait mettre à false ou true un paramètre pour que ce problème soit resolu.

EDIT:
Apres verification de la config, c'est cette propriété dont je vous parlais:

ldap-authentication-context.xml:
      <property name="clearAllChildren">
            <value>false</value>
        </property>
Il me semble que si la propiété est à false, les utilisateurs sont ajoutés à la base deja présente, mais pas supprimé! Erreur de ma part?:/


EDIT N°2:
La config clearAllChildren=false fonctionne puisque les "anciens" utilisateurs se trouvent toujours dans la base, cependant, le mot de passe n'est plus correct (impossible de se loguer avec ces user), et impossible de le modifier le mdp via l'interface graphique d'alfresco

michaelh
Champ on-the-rise
Champ on-the-rise
Le "false/true" de la propriété "clearAllChildren" dans "ldap-authentication-context.xml" permet de reinitialiser la liste des comptes et des groupes avant import depuis le LDAP : c'est son seul rôle.

En fait on ne peut pas faire cohabiter une authentification "LDAP" et "comptes internes" dans Alfresco pour le moment. C'est une possibilité prévue pour la version 1.4 (sortie en août/septembre). Pour le moment si on authentifie sur LDAP, alors les comptes internes ne servent plus à rien.

Par contre, la version 1.3 (disponible bientôt) permet l'authentification sur annuaires multiples. Ca pourrait être une alternative en fonction de vos besoins.

content-manager
Champ in-the-making
Champ in-the-making
Merci bien pour ces précisions.Smiley Happy

content-manager
Champ in-the-making
Champ in-the-making
Un dernier renseignement serait le bienvenu::rolleyes::
Les utilisateurs présents dans l'annuaire ldap font partie d'un objectclass spécifique à la société qui est hérité de inetorgperson.
Ces éléments diposent de attributs "requis" qui sont tres peu nombreux et qui sont remplis par l'ensemble des utilisateurs, par contre les attributs "optionnels" sont tres nombreux (une centaine d'attributs). En realité qu'une partie de ces attributs sont réellement utilisés(insérés). Il est relativement difficile de remplir l'ensemble de ces champs pour l'ensemble des utilisateurs.

Est il réellement obligatoire de remplir l'ensemble de ces attributs "optionnels" ou est il possible de contourner ce problème. Il me semble avoir lu que la version 1.3 ne devrait plus avoir ce bug. Cette version ne devrait elle pas sortir d'un jour à l'autre?

unknown-user
Champ on-the-rise
Champ on-the-rise
Bonjour,

Je rencontre des problèmes suite à la mise en place de l'authentification LDAP avec Alfresco.
Voici ce que me remonte les logs tomcat ( catalina.out ) :



12:06:14,785 ERROR [quartz.core.JobRunShell] Job DEFAULT.ldapPeopleJobDetail threw an unhandled Exception:
org.alfresco.repo.importer.ExportSourceImporterException: Failed to import
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:206)
        at org.alfresco.repo.importer.ImporterJob.execute(ImporterJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource.generateExport(LDAPPersonExportSource.java:146)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:166)
        … 3 more
Caused by: javax.naming.ServiceUnavailableException: [LDAP: error code 52 - SASL not supported]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3050)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:72)
        … 6 more
12:06:14,789 ERROR [quartz.core.ErrorLogger] Job (DEFAULT.ldapPeopleJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.repo.importer.ExportSourceImporterException: Failed to import]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
* Nested Exception (Underlying Cause) —————
org.alfresco.repo.importer.ExportSourceImporterException: Failed to import
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:206)
        at org.alfresco.repo.importer.ImporterJob.execute(ImporterJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource.generateExport(LDAPPersonExportSource.java:146)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:166)
        … 3 more
Caused by: javax.naming.ServiceUnavailableException: [LDAP: error code 52 - SASL not supported]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3050)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:72)
        … 6 more
12:06:14,831 ERROR [quartz.core.JobRunShell] Job DEFAULT.ldapGroupJobDetail threw an unhandled Exception:
org.alfresco.repo.importer.ExportSourceImporterException: Failed to import
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:206)
        at org.alfresco.repo.importer.ImporterJob.execute(ImporterJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource.buildGroupsAndRoots(LDAPGroupExportSource.java:359)
        at org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource.generateExport(LDAPGroupExportSource.java:161)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:166)
        … 3 more
Caused by: javax.naming.ServiceUnavailableException: [LDAP: error code 52 - SASL not supported]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3050)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:72)
        … 7 more
12:06:14,833 ERROR [quartz.core.ErrorLogger] Job (DEFAULT.ldapGroupJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.repo.importer.ExportSourceImporterException: Failed to import]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
* Nested Exception (Underlying Cause) —————
org.alfresco.repo.importer.ExportSourceImporterException: Failed to import
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:206)
        at org.alfresco.repo.importer.ImporterJob.execute(ImporterJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource.buildGroupsAndRoots(LDAPGroupExportSource.java:359)
        at org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource.generateExport(LDAPGroupExportSource.java:161)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:166)
        … 3 more
Caused by: javax.naming.ServiceUnavailableException: [LDAP: error code 52 - SASL not supported]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3050)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:72)
        … 7 more
J'ai essayé de suivre vos conseils en remplissant tous les champs mais j'ai un peu de mal avec la conf !!

Si quelq'un peut me donner un petit coup de main je ne suis pas contre !!!

Merci d'avance.

lme
Champ in-the-making
Champ in-the-making
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: Unable to connect to LDAP Server; check LDAP configuration
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.buildInitialDirContext(LDAPInitialDirContextFactoryImpl.java:80)
        at org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl.getDefaultIntialDirContext(LDAPInitialDirContextFactoryImpl.java:65)
        at org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource.generateExport(LDAPPersonExportSource.java:146)
        at org.alfresco.repo.importer.ExportSourceImporter.doImport(ExportSourceImporter.java:166)
        … 3 more
Caused by: javax.naming.ServiceUnavailableException: [LDAP: error code 52 - SASL not supported]
A priori, tu as des problèmes pour te connecter à ton server LDAP. Essaie de passer la méthode d'authentification de DIGEST-MD5 à simple.
                <entry key="java.naming.security.authentication">
                    <value>simple</value>
                </entry>

unknown-user
Champ on-the-rise
Champ on-the-rise
Super merci beaucoup,

L'authentification LDAP fonctionne !!!! Smiley Very Happy


Bonne journée
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.