cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent users without an existing profile from logging in

hsturner
Champ on-the-rise
Champ on-the-rise
I have another issue now.  We only want users that have an active AD profile in on of the groups to be able to log into Alfresco. We have found that users can use <username>@<domain> to log into alfresco and as long as they enter in the correct password that can be authenticated by a domain controller in the Active Directory forest, they can successfully log into alfresco, even though they are not part of any AD group that is synching with Alfresco. For these users alfresco creates an new local account for them, but they can only see whatever is set to Everyone for access.

How do I lock this down to only allow users that are in AD groups that are synched to alfresco? If they are authenticated by AD but not in a AD group that is synched to Alfresco I want to lock them out.

Below is the NTLM passthru and LDAP being used

<blockcode>
### NTLM Passthru ###
authentication.chain=alfrescoNtlm1:alfrescoNtlm,passthru1Smiley Tongueassthru,ldap-ad1:ldap-ad
passthru.authentication.useLocalServer=false
passthru.authentication.servers=XXXX.XX\\x.x.x.2,XXXX.XX\\x.x.x.3,YYY\\x.x.x.4,YYY\\x.x.x.5

ntlm.authentication.sso.enabled=false
alfresco.authentication.allowGuestLogin=false
ntlm.authentication.mapUnknownUserToGuest=false
passthru.authentication.authenticateCIFS=true
passthru.authentication.authenticateFTP=false
passthru.authentication.guestAccess=false
passthru.authentication.defaultAdministratorUserNames=*******
passthru.authentication.offlineCheckInterval=300

### LDAP-AD ###
#
# LDAP Sync
#
# 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=false
ldap.authentication.java.naming.security.authentication=simple

# 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
ldap.authentication.userNameFormat=%s
ldap.authentication.allowGuestLogin=false
ldap.authentication.java.naming.provider.url=ldap://x.x.x.2:3268

#
synchronization.import.cron=0 0/10 * ? * *

# 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\=LDAPQuery,CN\=Users,DC\=xxxx,DC\=xx

# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=9\@NnI\#cuDE\!6

# 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)(memberOf=cn\=ERP_Alfresco,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx))

# 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\=ERP_Alfresco,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx))

# The query to select all objects that represent the users to import.
ldap.synchronization.personQuery=(&(objectclass\=user)(|(memberOf=cn\=Alfresco_ITI,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ITS,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_TAD,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Managers,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Supervisors,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Techs,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_Admin,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_User,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_Collaborator,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_MSG,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx))(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\=Alfresco_ITI,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ITS,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_TAD,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Managers,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Supervisors,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_Lab_Techs,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_Admin,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_User,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_ERP_Project_Collaborator,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx)(memberOf=cn\=Alfresco_MSG,ou\=Alfresco Groups,ou\=Security Groups,dc\=xxxx,dc\=xx))(userAccountControl\:1.2.840.113556.1.4.803\:\=512))


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

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

# The name of the operational attribute recording the last update time for a group or user.
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
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 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 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

ldap.synchronization.synchronizeChangesOnly=false

# enable user access auditing
audit.enabled=true
audit.alfresco-access.enables=true
</blockcode>
3 REPLIES 3

eswbitto
Confirmed Champ
Confirmed Champ
You can change the file authentication-services-context.xml

Look for the line that has

<property name="createMissingPeople">


and set the value to "false"

hsturner
Champ on-the-rise
Champ on-the-rise
Thanks for your help.

Where do I find  authentication-services-context.xml?

eswbitto
Confirmed Champ
Confirmed Champ
It should be in your install here.


/alfresco install/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/authentication-services-context.xml