创建规则以使用自定义规则发送声明

通过使用 Active Directory 联合身份验证服务 (AD FS) 中的“使用自定义规则发送声明”模板,你可以针对标准规则模板不能满足组织要求的情况创建自定义声明规则。 自定义声明规则以声明规则语言编写,必须先复制到“自定义规则”文本框中,然后才能在规则集中使用。 若要了解如何为高级规则构造语法,请参阅声明规则语言的角色

可以按照以下过程通过 AD FS 管理单元创建声明规则。

本地计算机上的 Administrators 中的成员身份或等效身份是完成这些过程所需的最低要求。 查看有关使用适当帐户和本地和域默认组中组成员身份的详细信息。

在 Windows Server 2016 中的信赖方信任上创建规则来传递或筛选传入声明

  1. 在服务器管理器中,单击“工具”,选择“AD FS 管理”

  2. 在控制台树中的“AD FS”下,单击“信赖方信任”。 Screenshot that shows where to select Relying Party Trusts in the console tree when you create a rule to pass through or filter an incoming claim on a Relying Party Trust in Windows Server 2016.

  3. 右键单击所选信任,然后单击“编辑声明颁发策略”。 Screenshot that shows where to select the Edit Claim Issuance Policy menu option when you create a rule to pass through or filter an incoming claim on a Relying Party Trust in Windows Server 2016.

  4. 在“编辑声明颁发策略”对话框中的“颁发转换规则”下,单击“添加规则”以启动规则向导。 Screenshot that shows where to select Add Rule when you create a rule to pass through or filter an incoming claim on a Relying Party Trust in Windows Server 2016.

  5. 在“选择规则模板”页上的“声明规则模板”下,从列表中选择“使用自定义规则发送声明”,然后单击“下一步”。 Screenshot that shows where to select the Send Claims Using a Custom Rule when you create a rule to pass through or filter an incoming claim on a Relying Party Trust in Windows Server 2016.

  6. 在“配置规则”页上的“声明规则名称”中,键入此规则的显示名称。 在“自定义规则”下,键入或粘贴需要用于此规则的声明规则语言语法。 Screenshot that shows where type the claim rule name.

  7. 单击“完成”。

  8. 在“编辑声明规则”对话框中,单击“确定”保存规则。

在 Windows Server 2016 中的声明提供方信任上创建规则来传递或筛选传入声明

  1. 在服务器管理器中,单击“工具”,选择“AD FS 管理”

  2. 在控制台树中的“AD FS”下,单击“声明提供方信任”。 Screenshot that shows where to select Claims Provider Trusts when you create a rule to pass through or filter an incoming claim on a Claims Provider Trust in Windows Server 2016

  3. 右键单击所选信任,然后单击“编辑声明规则”。 Screenshot that shows where to select Edit Claim Rules when you create a rule to pass through or filter an incoming claim on a Claims Provider Trust in Windows Server 2016.

  4. 在“编辑声明规则”对话框中的“接受转换规则”下,单击“添加规则”以启动规则向导。 Screenshot that shows where to select Add Rule when you create a rule to pass through or filter an incoming claim on a Claims Provider Trust in Windows Server 2016.

  5. 在“选择规则模板”页上的“声明规则模板”下,从列表中选择“使用自定义规则发送声明”,然后单击“下一步”。 Screenshot that shows where so select the Send Claim Using a Custom Rule template when you create a rule to pass through or filter an incoming claim on a Claims Provider Trust in Windows Server 2016.

  6. 在“配置规则”页上的“声明规则名称”中,键入此规则的显示名称。 在“自定义规则”下,键入或粘贴需要用于此规则的声明规则语言语法。 Screenshot that shows where to type the claim rule name when you create a rule to pass through or filter an incoming claim on a Claims Provider Trust in Windows Server 2016.

  7. 单击“完成”。

  8. 在“编辑声明规则”对话框中,单击“确定”保存规则。

在 Windows Server 2012 R2 中使用自定义声明创建发送声明的规则

  1. 在服务器管理器中单击“工具”,然后单击“AD FS 管理”。

  2. 在控制台树中的“AD FS\信任关系”下,单击“声明提供方信任”或“信赖方信任”,然后在列表中单击要在其中创建此规则的特定信任。

  3. 右键单击所选信任,然后单击“编辑声明规则”。 Screenshot that shows where to select Edit Claim Rules when you create a rule to send claims by using a custom claim in Windows Server 2012 R2.

  4. 在“编辑声明规则”对话框中,选择以下选项卡之一,具体取决于要编辑的信任以及要在其中创建此规则的规则集,然后单击“添加规则”以启动与该规则集关联的规则向导:

    • 接受转换规则

    • 颁发转换规则

    • 颁发授权规则

    • 委派授权规则create rule

  5. 在“选择规则模板”页上的“声明规则模板”下,从列表中选择“使用自定义规则发送声明”,然后单击“下一步”。 Screenshot that shows where to select the Send Claims Using a Custom Rule template when you create a rule to send claims by using a custom claim in Windows Server 2012 R2.

  6. 在“配置规则”页上的“声明规则名称”中,键入此规则的显示名称。 在“自定义规则”下,键入或粘贴需要用于此规则的声明规则语言语法。 Screenshot that shows where to type the claim rule name when you create a rule to send claims by using a custom claim in Windows Server 2012 R2.

  7. 单击“完成”。

  8. 在“编辑声明规则”对话框中,单击“确定”保存规则。

其他参考

配置声明规则

清单:为信赖方信任创建声明规则

清单:为声明提供方信任创建声明规则

何时使用授权声明规则

声明的角色

声明规则的角色