SSSD、openLDAP 和嵌套群組

SSSD、openLDAP 和嵌套群組

我試圖弄清楚如何建立我的 ldap 和/或配置 sssd 來讀取嵌套群組的成員資格。

像這樣的事情適用於普通組成員身份:

DN: cn=server-admins,ou=Groups,dc=example,dc=com
groupOfNames (structural)
posixGroup (auxiliary)
memberUid userName1
memberUid userName2

sssd.conf 執行如下操作:

[sssd]
config_file_version = 2
domains = default
services = nss, pam
full_name_format = %1$s

[domain/default]
debug_level = 2
id_provider = ldap
auth_provider = ldap
cache_credentials = True
ldap_uri = ldaps://ldapserver:636
ldap_search_base = dc=example,dc=com
# start searching here
ldap_user_search_base = ou=People,dc=example,dc=com
# search these people
ldap_group_search_base = ou=Groups,dc=example,dc=com
ldap_group_nesting_level = 10
simple_allow_groups = server-admins

如果我id userName1獲得server-admins會員資格並可以使用該使用者登入。

但是,我想做的是這樣的:

DN: cn=server-admins,ou=Groups,dc=example,dc=com
groupOfNames (structural)
posixGroup (auxiliary)
member cn=jobTitleGroup1,ou=Roles,dc=example,dc=com

然後擁有jobTitleGroup1包含人員的成員資格:

DN: cn=jobTitleGroup1,ou=Roles,dc=example,dc=com
groupOfNames (structural)
posixGroup (auxiliary)
memberUid userName1
memberUid userName2

問題是 sssd 似乎只識別 memberUid 屬性,並且似乎看不到/搜尋 的嵌套組成員身份jobTitleGroup1

所以我不知道如何進行嵌套群組,和/或不知道如何讓 sssd 讀取嵌套群組的成員資格。任何幫助,將不勝感激。

答案1

兩週後,我找到了答案。問題有兩件事,其中之一是因為第一件事。

第一個問題是,因為我使用 rfc2307bis 架構配置了 ldap,所以我的群組正在使用 groupOfNames 和「member」屬性。

但是,除非我使用“memberUid”,否則 sssd 不會識別成員資格。 memberUid 是第二個問題。

在domain/default下的sssd.conf中我需要以下內容:

[domain/default]
ldap_schema = rfc2307bis
ldap_group_object_class=groupOfNames
ldap_group_member=member

那我的權限群組可能是:

DN: cn=server-admins,ou=Groups,dc=example,dc=com
groupOfNames (structural)
posixGroup (auxiliary)
member cn=jobTitleGroup1,ou=Roles,dc=example,dc=com

我的角色組可能是:

DN: cn=jobTitleGroup1,ou=Roles,dc=example,dc=com
groupOfNames (structural)
posixGroup (auxiliary)
member uid=userName1,ou=People,dc=example,dc=com
member uid=userName2,ou=People,dc=example,dc=com

相關內容