Alfresco - 为 Active Directory 配置 2 个 groupSearchBases

Alfresco - Configure 2 groupSearchBases for Active Directory

如何为 Alfresco 配置 2 个 groupSearchBase?

现在我的 global.properties 中有这个 属性:

ldap.synchronization.groupSearchBase=CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe

但是我需要用路径配置第二个搜索库

CN=Alfresco users,OU=Labs,OU=AWE,DC=main,DC=awe

。我尝试过的是使用 语句配置 属性,如下所示:

ldap.synchronization.groupSearchBase=(|(CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe)(CN\=Alfresco users,OU\=Labs,OU\=AWE,DC\=main,DC\=awe))

这个设置给我一个错误:

00:30:07,147 ERROR [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] Synchronization aborted due to error
org.alfresco.error.AlfrescoRuntimeException: 02290000 Error during LDAP Search. Reason: null
...
Caused by: javax.naming.PartialResultException [Root exception is javax.naming.NamingException: LDAP response read timed out, timeout used:5000ms. [Root exception is com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe']; remaining name '']
...
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:5000ms. [Root exception is com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe']; remaining name ''
...
Caused by: com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'DC\=main,DC\=awe'

我还最小化了 searchBase 路径以包含两个目录,如下所示:

ldap.synchronization.groupSearchBase=CN\=Alfresco users,OU\=AWE,DC\=main,DC\=awe

但这也给了我一个错误:

    org.alfresco.error.AlfrescoRuntimeException: 02310000 Error during LDAP Search. Reason: [LDAP: error code 32 - 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of: 'OU=AWE,DC=main,DC=awe'
...
    Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-03100238, problem 2001 (NO_OBJECT), data 0, best match of:'OU=AWE,DC=main,DC=awe'

我做错了什么以及如何对两个 groupSearchBase 进行露天搜索(如果可能,最简单的方法)。提前致谢。

如评论中所述,搜索基础是 LDAP(专有名称)路径,而不是查询。这意味着您应该 select 您的用户和组查询的搜索基础到两个组织单位都从属的路径:OU=AWE,DC=main,DC=awe.

然后您需要构建用户和组 query 以便仅按预期返回组和用户。例如。对于人员查询可以如下所示:

(&
 (objectCategory\=Person)
 (|
   (memberOf\:1.2.840.113556.1.4.1941\:\=CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe)
   (memberOf\:1.2.840.113556.1.4.1941\:\=CN\=Alfresco users,OU\=Labs,OU\=AWE,DC\=main,DC\=awe)
 )
 (userAccountControl\:1.2.840.113556.1.4.803\:\=512)
)

对于群组搜索,您也应该这样做。

提示:1.2.840.113556.1.4.1941 是一个特定于 Active Directory 的过滤器,用于检索嵌套组(递归检索该 DN 的所有成员)。有关详细信息,请查看 Active Directory: LDAP Syntax Filters | MS Tecnet