ADFS 3,创建规则以将组成员身份作为声明发送

时间:2018-05-17 21:15:41

标签: saml-2.0 adfs3.0

我正在尝试将一些群组成员身份作为ADFS3上的声明发送给云依赖方。

我正在使用Microsoft文章(下方)创建规则以将组成员身份作为声明发送。 MS文章在声明规则模板下说,选择将组成员身份作为声明发送,然后在为规则命名并从Active Directory中选择一个组后,它没有指定要选择的内容"外发声明类型&#34 ;什么进入"外出索赔价值"框。

有人有任何建议吗?

https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-rule-to-send-group-membership-as-a-claim

谢谢, 马吉德

2 个答案:

答案 0 :(得分:1)

以下自定义规则有效。

      @RuleName = "Add Group Claims"
                     c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", 
                     Issuer == "AD AUTHORITY"]
                      => add(store = "Active Directory", types = ("http://test.com/phase1"), query = 
                     ";memberOf;{0}", param = c.Value);

                     @RuleName = "Edit Group"
                     c:[Type == "http://test.com/phase1"]
                      => add(Type = "http://test.com/phase2", Value = RegExReplace(c.Value, ",[^\n]*", ""));

                     @RuleName = "Remove CN from Group"
                     c:[Type == "http://test.com/phase2"]
                      => add(Type = "http://schemas.xmlsoap.org/claims/Group", Value = RegExReplace(c.Value, 
                     "^CN=", ""));

                     @RuleName = "Send Only Groups Containing ADFS"
                     c:[Type == "http://schemas.xmlsoap.org/claims/Group", Value =~ "(?i)Groups-prefix"]

答案 1 :(得分:0)

假设您想要传递AD组" isAdmin"。

第一部分是在AD中选择该组。

然后决定一个群组名称(例如http://company.com/Admin),然后决定一个群组值(例如isAdmin)。

然后,如果用户是该组的成员,您将获得声明:

http://company.com/Admin/isAdmin