我正在尝试将 LDAP Active Directory 与 Keycloak 集成。我已经能够使用按 LDAP 属性过滤的自定义用户 LDAP 过滤器同步 LDAP 用户 - (theAttribute=theValue)。有没有按组过滤的方法/语法?例如,假设我有 Active Directory 组“我的组”,并且我只想与该组中的 Keycloak 用户同步。什么是搜索自定义用户 LDAP 过滤器?
最佳答案
怎么样memberOf
?例如:
(&(objectCategory=Person)(sAMAccountName=*)(theAttribute=theValue)(memberOf=cn=My Group,dc=example,dc=com))
请引用RFC2254 "The String Representation of LDAP Search Filters"更多细节:
关于ldap - Keycloak LDAP 集成 : using of Custom User LDAP Filter to filter by group,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50894870/