首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Al新鲜in 5.1中使用两个LDAP配置身份验证和同步

在Al新鲜in 5.1中使用两个LDAP配置身份验证和同步
EN

Stack Overflow用户
提问于 2018-10-10 11:37:56
回答 1查看 1K关注 0票数 0

我们执行从企业版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中看到了错误:

代码语言:javascript
复制
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

代码语言:javascript
复制
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

代码语言:javascript
复制
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=true

alfresco-global.properties

代码语言:javascript
复制
### Authentication ###
#authentication.chain=ldap1:ldap-ad,ldap2:ldap-ad,alfrescoNtlm1:alfrescoNtlm
authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap-ad,ldap2:ldap-ad

提前感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-21 13:18:19

最后,我解决了与身份验证用户相关的问题。我放置了参数的空字符串:

代码语言:javascript
复制
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服务器。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52739379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档