【发布时间】:2021-03-31 06:19:11
【问题描述】:
如何为 Alfresco 配置 2 个 groupSearchBases?
现在我的 global.properties 中有这个属性:
ldap.synchronization.groupSearchBase=CN\=Alfresco users,OU\=Users,OU\=AWE,DC\=main,DC\=awe
但我需要用路径配置第二个搜索库
CN=Alfresco 用户,OU=Labs,OU=AWE,DC=main,DC=awe
。我尝试使用 OR 语句配置属性,如下所示:
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'
我做错了什么以及如何在露天搜索两个 groupSearchBases(如果可能的话,最简单的方法)。提前致谢。
【问题讨论】:
-
您在与哪个 LDAP 服务器通信? (正确的语法各不相同)
-
活动目录。我不知道这很重要。 @Gagravarr
-
您只能设置一个组群。您可以使用
OU=AWE,DC=main,DC=awe(包含 OU=Labs 和 OU=Users),然后尝试通过 groupQuery 过滤它们,例如。(&(objectclass=group)(|(OU=Labs)(OU=Users))(CN=Alfresco users)),如果组条目引用它们各自的 OU,这应该可以工作。否则(如果目标是同步这些组的成员),您还可以向 personQuery 添加过滤器,例如。(&(objectclass=user)(memberOf:...)). -
您只能拥有一个搜索库,正如@EricLavault 解释的那样,您需要对查询进行过滤。但是,只有一些 LDAP 服务器支持基于条目所在的树进行过滤。带有 AD 的 IIRC 类似于
ou:dn:=labs在 DN 中获取 OU
标签: active-directory ldap alfresco