active-directory - Alfresco - 为 Active Directory 配置 2 个 groupSearchBases
问题描述
如何为 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(专有名称)路径,而不是查询。这意味着您应该为您的用户和组查询选择两个组织单位都从属的路径:OU=AWE,DC=main,DC=awe
。
然后,您需要构建用户和组查询,以便仅按预期返回组和用户。例如,人员查询可能如下所示:
(&
(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 语法过滤器 | 微软技术网
推荐阅读
- java - 无法使用 Java 进程执行带有包含 # (哈希)字符的参数的 python 可执行文件
- php - 从字符串中读取 XML 数据
- c# - 每次我尝试向列表中添加值时都会出错
- flutter - Flutter 两个 ListView 并排溢出
- html - 制作一个按钮网格,根据屏幕纵横比更改布局
- postgresql - PostGIS:如何使用通用 3D GEOMETRY 列创建表?
- python - 当值在文件中时,Python脚本在日志文件中找不到值
- c++ - 在c ++中仅连接字符串中的选定元素
- javascript - 反应原生下拉刷新以获取数据
- reactjs - 样式定义中具有 fontweight css 规则的组件会导致打字稿错误:没有重载匹配此定义错误