10-03-2016 10:02 AM
Ciao a tutti, volevo integrare l'autenticazione LDAP su Alfresco community 5.1, usando windows server 2012 come domain controller.
Utilizzando queste righe sul file alfresco-global.properties
ntlm.authentication.sso.enabled=false
ldap.authentication.allowGuestLogin=false
ldap.authentication.userNameFormat=%s@lago.local
ldap.authentication.java.naming.provider.url=ldap://net-server76.lago.local:389
ldap.authentication.defaultAdministratorUserNames=Administrator,alfresco
ldap.synchronization.java.naming.security.principal=alfresco@lago.local
ldap.synchronization.java.naming.security.credentials=Lago_2016
ldap.synchronization.userSearchBase=ou=Users,dc=lago,dc=local
L'autenticazione viene fatta, ma non vengono importati i nomi degli utenti con il resto di informazioni presenti nell'active directory di Windows server 2012.
Qualcuno ha avuto lo stesso problema e sa come risolverlo?
grazie mille
10-03-2016 09:58 PM
Uso di Google Translator qui. Se ho capito bene, tutto quello che dovete fare è aggiungere la proprietà soffietto in alfresco-global.properties ldap.synchronization.active = true
Riavviare Alfresco dopo che e verificare se gli utenti ei gruppi sono stati importati.
10-04-2016 10:21 AM
Hi, I've tried your solution, but it doesn't work. Only the account name of the user has imported, no other info such as name, surname or email.
10-04-2016 10:39 AM
Ah, ok, so that's an important step.
If you got the username, that means the syncronization is working.
What you have to do now is to configure the attributes mapping by using properties.
Check this file and you will see how Alfresco maps the LDAP attributes with the person objects' attributes: community-edition/ldap-ad-authentication.properties at master · Alfresco/community-edition · GitHub
You can copy the properties you want to change and put them into alfresco-global.properties.
The problem now is that you already have the users syncronized, and in order to have them re-imported, you have to 2 options.
Restart Alfresco with a clean database and content store, or for the full syncronization by setting the property synchronization.synchronizeChangesOnly=false
You can see more properties here community-edition/default-synchronization.properties at master · Alfresco/community-edition · GitHub
10-05-2016 07:11 AM
Hi Douglas, thanks for your response. I've tried to follow your instructions but only the account name is shown in the profile(no others attributes like name, lastname, email...)
Here's my alfresco proprerties content:
###############################
## Common Alfresco Properties #
###############################
dir.root=/opt/alfresco/alf_data
alfresco.context=alfresco
alfresco.host=127.0.0.1
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=127.0.0.1
share.port=8080
share.protocol=http
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=Lago0001
db.name=alfresco
db.url=jdbcostgresql://localhost:5432/${db.name}
# Note: your database must also be able to accept at least this many connections. Please see your database documentation for instructions on how to configure this.
db.pool.max=275
db.pool.validate.query=SELECT 1
# The server mode. Set value here
# UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=UNKNOWN
### FTP Server Configuration ###
ftp.port=21
### RMI registry port for JMX ###
alfresco.rmi.services.port=50500
### External executable locations ###
ooo.exe=/opt/alfresco/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
jodconverter.enabled=false
jodconverter.officeHome=/opt/alfresco/libreoffice
jodconverter.portNumbers=8100
### Initial admin password ###
alfresco_user_store.adminpassword=42aef50aa4699dea4c6c13328b9d915c
### E-mail site invitation setting ###
notification.email.siteinvite=false
### License location ###
dir.license.external=/opt/alfresco
### Solr indexing ###
index.subsystem.name=solr4
dir.keystore=${dir.root}/keystore
solr.host=localhost
solr.port.ssl=8443
### Allow extended ResultSet processing
security.anyDenyDenies=false
### Smart Folders Config Properties ###
smart.folders.enabled=false
### Remote JMX (Default: disabled) ###
#alfresco.jmx.connector.enabled=false
alfresco.jmx.connector.enabled=false
# 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
authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad
ldap.synchronization.active = true
ntlm.authentication.sso.enabled=true
#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#
#ldap.authentication.allowGuestLogin=true
# 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@lago.local
# 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://net-server76.lago.local:389
#Custom Socket Factory.
#ldap.java.naming.ldap.factory.socket=org.alfresco.repo.security.authentication.ldap.AlfrescoLdapSSLSocketFactory
# The authentication mechanism to use for password validation
#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=Administrator,admin,alfresco
# Enable FTP authentication using LDAP
ldap.authentication.authenticateFTP=true
# The authentication mechanism to use for synchronization
ldap.synchronization.java.naming.security.authentication=simple
# The default principal to bind with (only used for LDAP sync). This should be a UPN or DN
ldap.synchronization.java.naming.security.principal=alfresco@lago.local
# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=(my 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
# 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)
# The query to select objects that represent the groups to import that have changed since a certain time.
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!(whenChanged<\={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)(!(whenChanged<\={0})))
# The group search base restricts the LDAP group query to a sub section of tree on the LDAP server.
#ldap.synchronization.groupSearchBase=ou\=Portale Documentale,dc=lago,dc=local
# The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.
ldap.synchronization.userSearchBase=ou\=users,dc=lago,dc=local
# The name of the operational attribute recording the last update time for a group or user.
ldap.synchronization.modifyTimestampAttributeName=whenChanged
# 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=largeHomeFolderProvider
# 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
# Requests timeout, in miliseconds, use 0 for none (default)
#ldap.authentication.java.naming.read.timeout=0
# LDAPS truststore configuration properties
#ldap.authentication.truststore.path=
#ldap.authentication.truststore.passphrase=
#ldap.authentication.truststore.type=
# Set to 'ssl' to enable truststore configuration via subsystem's properties
#ldap.authentication.java.naming.security.protocol=ssl
# Enable/disable connection pooling for synchronization
# For more information about connection pooling please refer to http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/pool.html.
# For more information about pool configuration please refer to http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html.
ldap.synchronization.com.sun.jndi.ldap.connect.pool=true
# A list of space-separated authentication types of connections that may be pooled. Valid types are "none", "simple", and "DIGEST-MD5".
#ldap.pooling.com.sun.jndi.ldap.connect.pool.authentication=none simple
# A string that indicates the level of debug output to produce. Valid values are "fine" (trace connection creation and removal) and "all" (all debugging information).
#ldap.pooling.com.sun.jndi.ldap.connect.pool.debug=
# The string representation of an integer that represents the number of connections per connection identity to create when initially creating a connection for the identity.
ldap.pooling.com.sun.jndi.ldap.connect.pool.initsize=1
# The string representation of an integer that represents the maximum number of connections per connection identity that can be maintained concurrently.
# Empty value means no maximum size.
#ldap.pooling.com.sun.jndi.ldap.connect.pool.maxsize=
# The string representation of an integer that represents the preferred number of connections per connection identity that should be maintained concurrently.
# Empty value means no preferred size.
#ldap.pooling.com.sun.jndi.ldap.connect.pool.prefsize=
# A list of space-separated protocol types of connections that may be pooled. Valid types are "plain" and "ssl".
#ldap.pooling.com.sun.jndi.ldap.connect.pool.protocol=plain
# The string representation of an integer that represents the number of milliseconds that an idle connection may remain in the pool without being closed and removed from the pool.
# Empty value means no timeout, connection stays in pool forever. Bad connections are automatically detected and removed from the pool by the LDAP provider
#ldap.pooling.com.sun.jndi.ldap.connect.pool.timeout=
# The string representation of an integer that represents the number of milliseconds to specify how long to wait for a pooled connection. If you omit this property, the application will wait indefinitely.
#ldap.pooling.com.sun.jndi.ldap.connect.timeout=
# LDAP-AD property name for user enabled/disabled status
ldap.synchronization.userAccountStatusProperty=userAccountControl
# The Account Status Interpreter bean name
ldap.synchronization.userAccountStatusInterpreter=ldapadUserAccountStatusInterpreter
Best regards
10-05-2016 11:33 AM
Hello again.
First of all, you don't have to copy all the properties into alfresco-global.properties.
You should copy only the ones you are going to change. All the other will use the default values from the original files, so, please, in order to keep your configuration cleaner, remove everything (related with LDAP) you are not changing.
And my second point, have you tried what I sent before?
The problem now is that you already have the users syncronized, and in order to have them re-imported, you have to 2 options.
Restart Alfresco with a clean database and content store, or for the full syncronization by setting the property synchronization.synchronizeChangesOnly=false
If you did it, please, tell me how you did it, exactly.
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.