AnsweredAssumed Answered

Problemas con autenticación con LDAP

Question asked by mornaug on Sep 13, 2012
Buenos días.

Soy nuevo en el mundo de Alfresco y tengo un problema que no llego a solucionar, a ver si podéis arrojar un poco de luz sobre este asunto.

Tengo el alfresco instalado y funcionando en un entorno de desarrollo, este entorno está preparado para autenticarse contra un AD, cuya estructura de grupos es la siguiente:

Grupo : Alfresco y dentro tiene los Grupos: Desarrolladores y Ventas

En el fichero ldap-ad-authentication.properties tengo la siguiente configuración:


# This flag enables use of this LDAP subsystem for authenticatiion. 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=false

#
# 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@dominiodesa.local.com

# 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://10.240.101.1:389

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

# 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=

# 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=dsanchez,dc=agenciaidea,dc=elsendero,dc=es
ldap.synchronization.java.naming.security.principal=administrador@dominiodesa.local.com

ldap.synchronization.java.naming.security.credentials=n@bucodonosor19


# If positive, this property indicates that range retrieval should be used to fetch
# multi-valued attributes (such as member) in batches of the specified size.
# Overcomes any size limits imposed by Active Directory.       
ldap.synchronization.attributeBatchSize=1000

# The query to select all objects that represent the groups to import.
ldap.synchronization.groupQuery=(&(objectclass\=group)(memberOf\=cn\=AlfrescoGroups,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com))

# The query to select objects that represent the groups to import that have changed since a certain time.
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(memberOf\=cn\=AlfrescoGroups,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com)(!(modifyTimestamp<\={0})))

# The query to select all objects that represent the users to import.
ldap.synchronization.personQuery=(&(objectclass\=user)(|(memberOf\=cn\=Desarrolladores,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com)(memberOf\=cn\=Ventas,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com))(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)(|(memberOf\=cn\=Desarrolladores,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com)(memberOf\=cn\=Ventas,ou\=Alfresco,dc\=dominiodesa,dc\=local,dc\=com))(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=ou=Alfresco,dc=dominiodesa,dc=local,dc=com

# The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.
ldap.synchronization.userSearchBase=ou=UsuariosPropios,dc=dominiodesa,dc=local,dc=com

# 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=userHomesHomeFolderProvider

# The attribute on LDAP group objects to map to the authority name property in Alfresco
ldap.synchronization.groupIdAttributeName=cn

# The attribute on LDAP group objects to map to the authority display name property in Alfresco
ldap.synchronization.groupDisplayNameAttributeName=displayName

# 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

# If true progress estimation is enabled. When enabled, the user query has to be run twice in order to count entries.
ldap.synchronization.enableProgressEstimation=true

En este caso están definidas las rutas de las UO donde estan los usuarios y funciona correctamente.

El problema es que para pasarlo  a un entorno de producción el entramado de grupos del AD es diferente, existiendo multitud de UO, con otras dentro.

Existe alguna manera de indicarle a Alfresco para que tome todos los usuarios, sin tener que definirlos como se está haciendo en el entorno de desarrollo ?

Un saludo y gracias

Outcomes