Active directory + Alfresco 3.2

cancel
Showing results for 
Search instead for 
Did you mean: 
crokette
Member II

Active directory + Alfresco 3.2

Salut,

(quoi? non c'est pas pareil que les autres posts que j'ai fait, celui là est pour ALF32)

je voulais savoir quel fichier est utilisé pour utiliser l'active directory (je penche plus quand même pour le deuxième) car j'ai vu le fichier:

ldap-authentication.properties

(qui se trouve C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap)

et

ldap-ad-authentication.properties


(qui se trouve C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad)

bien que j'ai testé avec les deux aucune requête ldap n'est envoyé et je peut me loguer qu'en "admin"

où alors je dois préciser quelque part que j'utilise l'un des deux fichiers.
76 Replies
crokette
Member II

Re: Active directory + Alfresco 3.2

enfin ma principal interrogation est comment prendre en compte l'un des deux fichiers ?????,

car j'ai testé en passant la valeur

ldap.authentication.allowGuestLogin=false

donc à de true à false, mais j'arrive toujours à me logguer en guest, donc le fichier que j'utilise, à savoir ldap-ad-authentication.properties et qui se situe tjr içi C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad est tout simplement ignoré par Alfresco.

quelqu'un s'est deja jeté dans la config de ldap avec ALF32 ???
crokette
Member II

Re: Active directory + Alfresco 3.2

quand je déplace

ldap-ad-authentication.properties

et

ldap-ad-authentication-context.xml

dans C:\alfresco32\tomcat\shared\classes\alfresco\extension cela produit l'erreur 404 du coté Tomcat.


11:54:02,898 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/application-context.xml]
Offending resource: ServletContext resource [/WEB-INF/web-application-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:alfresco/extension/*-context.xml]
Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [../common-ldap-context.xml]
Offending resource: file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\ldap-ad-authentication-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml]; nested exception is java.io.FileNotFoundException: C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml (Le fichier spécifié est introuvable)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:alfresco/extension/*-context.xml]
Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [../common-ldap-context.xml]
Offending resource: file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\ldap-ad-authentication-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml]; nested exception is java.io.FileNotFoundException: C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml (Le fichier spécifié est introuvable)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [../common-ldap-context.xml]
Offending resource: file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\ldap-ad-authentication-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml]; nested exception is java.io.FileNotFoundException: C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml (Le fichier spécifié est introuvable)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml]; nested exception is java.io.FileNotFoundException: C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml (Le fichier spécifié est introuvable)
Caused by: java.io.FileNotFoundException: C:\alfresco32\tomcat\shared\classes\alfresco\extension\..\common-ldap-context.xml (Le fichier spécifié est introuvable)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(FileInputStream.java:106)
   at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:185)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:145)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:130)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:468)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:363)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:171)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:145)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:130)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:468)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:363)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:171)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:145)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:130)
   at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:468)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:363)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
   at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
   at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
   at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
   at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:394)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
   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.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   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)
11:54:04,414 INFO  [org.alfresco.config.JBossEnabledWebApplicationContext] Refreshing org.alfresco.config.JBossEnabledWebApplicationContext@1627b8b: display name [Root WebApplicationContext]; startup date [Wed Jul 08 11:54:04 CEST 2009]; root of context hierarchy
11:54:04,758 INFO  [org.alfresco.config.JBossEnabledWebApplicationContext] Bean factory for application context [org.alfresco.config.JBossEnabledWebApplicationContext@1627b8b]: org.springframework.beans.factory.support.DefaultListableBeanFactory@94fe42
11:54:05,836 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 24 Web Scripts (+0 failed), 26 URLs
11:54:05,851 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 256.76672ms)
11:54:06,070 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 42 Web Scripts (+0 failed), 44 URLs
11:54:06,164 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 305.5355ms)
11:54:06,211 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
11:54:09,351 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
11:57:13,539 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
11:59:21,992 INFO  [org.alfresco.config.JBossEnabledWebApplicationContext] Closing org.alfresco.config.JBossEnabledWebApplicationContext@1627b8b: display name [Root WebApplicationContext]; startup date [Wed Jul 08 11:54:04 CEST 2009]; root of context hierarchy
mederic
Member II

Re: Active directory + Alfresco 3.2

Bonjour,

Dans le fichier alfresco-globals.properties, est-ce que tu as modifié le champ authentication.chain pour prendre en compte l'authentification LDAP ?

Médéric
crokette
Member II

Re: Active directory + Alfresco 3.2

non, je ne savais pas qu'il fallais modifier ca pour la connexion ldap,

pour le moment il est comme cela :

#authentication.chain=alfrescoNtlm1:alfrescoNtlm

que faut t'il mettre ?

genre

authentication.chain=ldap:ldap-ad  ??
mederic
Member II

Re: Active directory + Alfresco 3.2

Je n'ai jamais essayé, mais voici une page qui peut être intéressante dans ton cas : http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems

A première vue je penserais à quelque chose du type : authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap-ad1:ldap-ad, avec ldap-ad1 configuré en suivant ce qui est dit sur la page http://wiki.alfresco.com/wiki/Alfresco_Subsystems#Configuring_Subsystems.

Médéric
crokette
Member II

Re: Active directory + Alfresco 3.2

est ce que le fait de mettre  alfrescoNtlm1:alfrescoNtlm et de ne pas s'en servir peut géner ?

d'après ce que j'ai compris en lisant les wiki pour :

authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap-ad1:ldap-ad

il faut que je mette mon fichier  ldap-ad-authentication.properties

dans

C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad1\ldap-ad\


jusque là, je pense avoir bon ?

par contre j'ai cru comprendre que je devais mettre mon

ldap-ad-authentication-context.xml


dans

C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\fileServers\default\

ou même

C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\fileServers\default\default\

recréer un dossier default dans default et y mettre le fichier

c'est vrai ou pas ?
mederic
Member II

Re: Active directory + Alfresco 3.2

C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad1\ldap-ad\
Ce serait plutôt C:\alfresco32\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap-ad\ldap-ad1\, dans lequel tu mettrais tes fichiers xml et properties customisés.

Médéric
crokette
Member II

Re: Active directory + Alfresco 3.2

cela ne change rien en fait,

toujours que guest (avec GuestLogin à false),et admin qui peuvent se logguer, même après avoir créer les dossiers

"\subsystems\Authentication\ldap-ad1\ldap-ad\" dans

C:\alfresco32\tomcat\shared\classes\alfresco\extension\


# This flag enables use of this LDAP subsystem for authentication. It may be
# that this subsytem should only be used for synchronization, in which case
# this flag should be set to false.
ldap.authentication.active=true

#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#
ldap.authentication.allowGuestLogin=false

# How to map the user id entered by the user to taht passed through to LDAP
# In Active Directory, this can either be the user principal name (UPN) or DN.
# UPNs are in the form <sAMAccountName>@domain and are held in the userPrincipalName attribute of a user
ldap.authentication.userNameFormat=%s@domain

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server
ldap.authentication.java.naming.provider.url=ldap://mon_AD.mon_domaine.fr:389

# The authentication mechanism to use
ldap.authentication.java.naming.security.authentication=digest

# Escape commas entered by the user at bind time
# Useful when using simple authentication and the CN is part of the DN and contains commas
ldap.authentication.escapeCommasInBind=false

# Escape commas entered by the user when setting the authenticated user
# Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is
# pulled in as part of an LDAP sync
# If this option is set to true it will break the default home folder provider as space names can not contain \
ldap.authentication.escapeCommasInUid=false

# Comma separated list of user names who should be considered administrators by default
ldap.authentication.defaultAdministratorUserNames=nom_d'un_utilisateur_AD

# This flag enables use of this LDAP subsystem for user and group
# synchronization. It may be that this subsytem should only be used for
# authentication, in which case this flag should be set to false.
ldap.synchronization.active=true

# The default principal to bind with (only used for LDAP sync). This should be a UPN or DN
ldap.synchronization.java.naming.security.principal=cn\=administrateur,cn\=users,dc\=mon_domaine,dc\=fr

# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=mon_password

# If positive, this property indicates that RFC 2696 paged results should be
# used to split query results into batches of the specified size. This
# overcomes any size limits imposed by the LDAP server.
ldap.synchronization.queryBatchSize=1000

# The query to select all objects that represent the groups to import.
ldap.synchronization.groupQuery=(objectclass\=group)

# The query to select objects that represent the groups to import that have changed since a certain time.
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!(modifyTimestamp<\={0})))

# The query to select all objects that represent the users to import.
ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))

# The query to select objects that represent the users to import that have changed since a certain time.
ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(modifyTimestamp<\={0})))

# The group search base restricts the LDAP group query to a sub section of tree on the LDAP server.
ldap.synchronization.groupSearchBase=dc\=mon_domaine,dc\=fr

# The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.
ldap.synchronization.userSearchBase=ou\=utilisateurs,dc\=mon_domaine,dc\=fr

# The name of the operational attribute recording the last update time for a group or user.
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp

# The timestamp format. Unfortunately, this varies between directory servers.
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'.0Z'

# The attribute name on people objects found in LDAP to use as the uid in Alfresco
ldap.synchronization.userIdAttributeName=sAMAccountName

# The attribute on person objects in LDAP to map to the first name property in Alfresco
ldap.synchronization.userFirstNameAttributeName=givenName

# The attribute on person objects in LDAP to map to the last name property in Alfresco
ldap.synchronization.userLastNameAttributeName=sn

# The attribute on person objects in LDAP to map to the email property in Alfresco
ldap.synchronization.userEmailAttributeName=mail

# The attribute on person objects in LDAP to map to the organizational id  property in Alfresco
ldap.synchronization.userOrganizationalIdAttributeName=company

# The default home folder provider to use for people created via LDAP import
ldap.synchronization.defaultHomeFolderProvider=personalHomeFolderProvider

# The attribute on LDAP group objects to map to the gid property in Alfrecso
ldap.synchronization.groupIdAttributeName=cn

# The group type in LDAP
ldap.synchronization.groupType=group

# The person type in LDAP
ldap.synchronization.personType=user

# The attribute in LDAP on group objects that defines the DN for its members
ldap.synchronization.groupMemberAttributeName=member
crokette
Member II

Re: Active directory + Alfresco 3.2

C:\alfresco32\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap-ad1\ldap-ad\
Ce serait plutôt C:\alfresco32\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap-ad\ldap-ad1\, dans lequel tu mettrais tes fichiers xml et properties customisés.

Médéric

les wiki en english c'est pas le top quand même  :/

est ce que

\subsystems\Authentication\ldap-ad\ldap-ad1\
et \subsystems\Authentication\ldap-ad1\ldap-ad\ c'est différent?

faut lire ça comment ?

authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap-ad1:ldap-ad

que pour utiliser ldap-ad, il faut un dossier ldap-ad1 dans lequel ya un dossier ldap-ad ou alors on nomme une sorte de variable ldap-ad1 et on utilise juste un seul et unique dossier du nom de ldap-ad ?