所以我有類似下面的LDAP查詢,我試圖添加到ADFS自定義聲明規則中。在ADFS查詢中返回用戶角色的子集
(的memberOf = CN = Parent_group,OU = Child_group1,OU = Child_group1,DC =發展)
Parent_group包含了所有我感興趣的(Child_group1,Child_group2)組,兒童組持有我想要的角色。
我目前的ADFS規則返回用戶嘗試登錄
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> add(store = "Active Directory", types = ("http://schemas.microsoft.com/ws/2008/06/identity/claims/role"), query = ";tokenGroups;{0}", param = c.Value);
我可以組合這些只提供角色的用戶的一個子集下的所有角色?
編輯: 只是爲了下面這個答案擴大是我結束了: 我用了兩個規則,一個得到不同的名稱和第二使用的專有名稱得到我想要
組c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => add(store = "Active Directory", types = ("http://schemas.com/identity/distinguishedName"), query = "; distinguishedName;{0}", param = c.Value);
c:[Type == "http://schemas.com/identity/distinguishedName"] && c2:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => add(store = "Active Directory", types = ("http://schemas.com/groups/"), query = "(&(memberOf=CN=Parent_group,OU=Child_groups1,OU=Child_groups2,DC=domain,DC=company,DC=ROOT)(member={0}));CN;{1}", param = c.Value, param = c2.Value);
{0}使用可分辨名稱將查詢減少爲僅涉及用戶的組。 {1}使用Windows帳戶名稱,因此我不必對域/用戶進行硬編碼。
你似乎是唯一回答這些ADFS問題的人!我對你的答案有點困惑,特別是兩個部分:&(objectClass = user)是我需要放置的東西還是需要根據我的需要改變的東西? ;郵件;域\用戶同樣的問題如上。 – RichardMc