我们执行从企业版Al新鲜co4.2到5.1的迁移。公司中有两个Active域(主域和子域),因此我们在Al新鲜AD 5.1中配置了两个LDAP(AD)子系统。
性能结构:/opt/tomcat7/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap2 /opt/tomcat7/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap1
问题是,身份验证和同步只适用于一个ldap-ad子系统(ldap1或ldap2),后者在身份验证链列表中处于第一位(ldap1和ldap2不一起工作)。
例如,如果ldap1在列表中占据第一位,则该用户从ldap2登录失败(反之亦然)。在本例中,我在alfresco.log中看到了错误:
Caused by: net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext 我的财产:
/opt/tomcat7/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap1/ldap-ad-authentication.properties
ldap.authentication.active=true
ldap.authentication.allowGuestLogin=false
ldap.authentication.userNameFormat=%s@fake.local
ldap.authentication.java.naming.provider.url=ldap://fake.local:***
ldap.authentication.defaultAdministratorUserNames=fake_user
ldap.authentication.java.naming.referral=follow
ldap.synchronization.java.naming.security.principal=fake_user@fake.local
ldap.synchronization.java.naming.security.credentials=somepassword
ldap.synchronization.groupSearchBase=ou=Archiv,ou=FileServerGroups,ou=Groups,dc=fake,dc=local
ldap.synchronization.userSearchBase=dc=fake,dc=local
ldap.synchronization.groupDisplayNameAttributeName=description
ldap.synchronization.userOrganizationalIdAttributeNameCustom=distinguishedName
ldap.synchronization.com.sun.jndi.ldap.connect.pool=true/opt/tomcat7/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap2/ldap-ad-authentication.properties
ldap.authentication.active=true
ldap.authentication.allowGuestLogin=false
ldap.authentication.userNameFormat=%s@gss.fake.local
ldap.authentication.java.naming.provider.url=ldap://gss.fake.local:***
ldap.authentication.defaultAdministratorUserNames=fake_user
ldap.authentication.java.naming.referral=follow
ldap.synchronization.java.naming.security.principal=fake_user@fake.local
ldap.synchronization.java.naming.security.credentials=somepassword%
ldap.synchronization.groupSearchBase=ou=Archiv,ou=FileServerGroups,ou=Groups,dc=gss,dc=fake,dc=local
ldap.synchronization.userSearchBase=dc=gss,dc=fake,dc=local
ldap.synchronization.groupDisplayNameAttributeName=description
ldap.synchronization.userOrganizationalIdAttributeNameCustom=distinguishedName
ldap.synchronization.com.sun.jndi.ldap.connect.pool=truealfresco-global.properties
### Authentication ###
#authentication.chain=ldap1:ldap-ad,ldap2:ldap-ad,alfrescoNtlm1:alfrescoNtlm
authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad,ldap2:ldap-ad提前感谢!
发布于 2018-11-21 13:18:19
最后,我解决了与身份验证用户相关的问题。我放置了参数的空字符串:
ldap.authentication.userNameFormat=对于文件中的每个LDAP子系统,ldap-ad-authentication.properties.
之后,来自两个ldaps的用户可以成功登录。
ldap.authentication.userNameFormat 指定如何将用户输入的用户标识符映射到传递到LDAP的标识符。如果设置为空字符串( ldap子系统的缺省值),将执行涉及ldap.synchronization.personQuery和ldap.synchronization.userIdAttributeName的LDAP查询,以动态地从用户ID解析DN。这允许对目录进行结构化,并且不需要用户ID出现在DN中。 如果设置为非空值,则该值中的子字符串%s将被替换为输入的用户ID,以生成传递给LDAP的ID。这将LDAP用户名限制为固定格式。此值的推荐格式取决于您的LDAP服务器。
https://stackoverflow.com/questions/52739379
复制相似问题