Citrix Virtual Apps and Desktops

上下文应用程序保护

上下文应用程序保护提供了精细的灵活性,可以根据用户、其设备和网络状况,有条件地为一部分用户应用应用程序保护策略。

实施上下文应用程序保护

您可以使用 Broker 访问策略规则中定义的连接过滤器来实施上下文应用程序保护。Broker 访问策略定义了用于控制用户能否访问桌面组的规则。该策略由一组规则组成。每个规则都与单个桌面组有关且包含一组连接过滤器和访问权限控制。

当用户的连接详细信息与 Broker 访问策略中的一个或多个规则的连接过滤器匹配时,用户将获得对桌面组的访问权限。默认情况下,用户无权访问站点中的任何桌面组。您可以根据需求创建其他 Broker 访问策略。多个规则可以应用于同一个桌面组。有关详细信息,请参阅 New-BrokerAssignmentPolicyRule

如果用户的连接与访问策略规则中定义的连接过滤器匹配,则 Broker 访问策略规则中的以下参数能够灵活根据上下文启用应用程序保护:

  • AppProtectionKeyLoggingRequired
  • AppProtectionScreenCaptureRequired

使用 Broker 访问策略中引用的智能访问过滤器来优化连接过滤器。有关配置智能访问过滤器的信息,请参阅此支持文章。请参考以下场景,了解如何使用智能访问策略设置上下文应用程序保护。

必备条件

请确保您具有以下对象:

  • Citrix Virtual Apps and Desktops 版本 2109 或更高版本
  • Delivery Controller 版本 2109 或更高版本
  • StoreFront 版本 1912 或更高版本
  • NetScaler 与 StoreFront 之间的成功连接。有关详细信息,请参阅将 Citrix Gateway 与 StoreFront 集成
  • 为某些 LTSR 版本导入 XML 表 - 请参考下面的步骤 1
  • 对于需要智能访问标记的场景,请在 NetScaler Gateway 上启用智能访问。有关详细信息,请参阅此支持文章
  • 许可要求 -
    • 应用程序保护本地许可证
    • Citrix Gateway 通用许可证适用于使用智能访问标记的场景

启用上下文应用程序保护

  1. Citrix 下载页面下载适用于 Citrix Virtual Apps and Desktops 版本的上下文应用程序保护策略(功能表)。

  2. 在 Delivery Controller 上运行以下 PowerShell 命令:asnp Citrix*Set-BrokerSite-TrustRequestsSentToTheXmlServicePort $true
  3. 运行以下命令以在 Delivery Controller 中启用上下文应用程序保护:Import-ConfigFeatureTable <path to the downloaded feature table>

    例如,Import-ConfigFeatureTable\Downloads\FeatureTable.OnPrem.AppProtContextualAccess.xml

启用上下文应用程序保护 - 若干场景

场景 1:为通过 Access Gateway 进入的外部用户启用应用程序保护

默认情况下,为每个交付组创建两个 Broker 访问策略。一个用于来自 Access Gateway 的连接,另一个用于直接连接。您只能为来自 Access Gateway 的连接启用应用程序保护。

以下步骤用于为交付组 Admin_Desktop_Group 中的外部用户启用应用程序保护,该交付组包含名为 Admin_Desktop 的桌面:

  1. 从 Delivery Controller 运行 PowerShell 命令 Get-BrokerAccesspolicyRule。此命令将为您提供为 Admin_Desktop_Group_AGAdmin_Desktop_Group_Direct 组定义的两个 Broker 访问策略。

  2. 要为 Access Gateway 连接启用应用程序保护策略,请运行以下命令:Set-BrokerAccessPolicyRule Admin_Desktop_Group_AG -AppProtectionKeyLoggingRequired $true -AppProtectionScreenCaptureRequired $true

  3. 要为直接连接禁用应用程序保护策略,请运行以下命令:Set-BrokerAccessPolicyRule Admin_Desktop_Group_Direct -AppProtectionKeyLoggingRequired $false -AppProtectionScreenCaptureRequired $false

  4. 验证。注销 Citrix Workspace 应用程序(如果已打开)。重新登录 Citrix Workspace 应用程序。通过 Access Gateway 从外部连接启动资源 Admin_Desktop。您将看到应用程序保护策略已应用于管理员桌面。

场景 2:对某些设备类型禁用应用程序保护。例如,iPhone

以下是在名为 Win10Desktop 的交付组上为 iPhone 用户禁用应用程序保护的步骤。

步骤 1:创建智能访问策略

  1. 登录 Citrix ADC 管理 UI。
  2. 在左侧导航菜单中,转到 Citrix Gateway > 虚拟服务器

    记下 VPN 虚拟服务器名称,这是稍后配置 Broker 访问策略所必需的。

  3. 单击 VPN 虚拟服务器。滚动到页面底部,然后单击会话策略。此时将显示会话策略列表。
  4. 单击 Add Binding(添加绑定)。

    添加绑定

  5. 单击添加以创建会话策略。

    创建Citrix Gateway 会话

  6. 输入会话策略的名称。在此案例中,为 temp

    输入会话策略名称

  7. 单击“配置文件”旁边的添加以指定配置文件名称。单击创建

    指定配置文件名称

  8. 从“会话策略”窗口中单击表达式编辑器
  9. 创建以下表达式以在 User Agent 字符串中检查是否存在 iPhoneHTTP.REQ.HEADER(“User-Agent”).CONTAINS(“iPhone”)

    创建表达式

  10. 单击绑定以创建会话策略。

第 2 步:创建 Broker 访问策略规则。

要为通过 Access Gateway 访问 Win10Desktop 的 iPhone 用户应用该策略,

  1. 请在 Delivery Controller (DDC) 中运行以下命令:Get-BrokerAccessPolicyRule,该命令列出了在 DDC 中定义的所有 Broker 访问策略。在此示例中,交付组 Win10Desktop 的 Broker 访问策略是 Win10Desktop_AGWin10Desktop_Direct。为下一个步骤记下交付组的桌面组 UID。

  2. 使用以下命令为 Win10Desktop 创建 Broker 访问策略规则,以过滤通过 Access Gateway 访问的 iPhone 用户:New-BrokerAccessPolicyRule -Name Win10Desktop_AG_iPhone -DesktopGroupUid <Uid_of_desktopGroup> -AllowedConnections ViaAG -AllowedProtocols HDX, RDP -AllowedUsers AnyAuthenticated -AllowRestart $true -AppProtectionKeyLoggingRequired $false -AppProtectionScreenCaptureRequired $false -Enabled $true -IncludedSmartAccessFilterEnabled $true

    Uid_of_desktopGroup 是通过在步骤 1 中运行 GetBrokerAccessPolicy 规则所获得的交付组的 DesktopGroupUID。

  3. 要为通过 Access Gateway 访问的 Win10Desktop iPhone 用户禁用应用程序保护,请使用以下命令参阅智能访问标记 temp(在“步骤 1:创建智能访问策略”中创建):

  4. 要为通过 Access Gateway 访问的 Win10Desktop iPhone 用户禁用应用程序保护,请参阅在步骤 1 中创建的智能访问标记 temp。使用以下命令创建智能访问策略:Set-BrokerAccessPolicyRule Win10Desktop_AG_iPhone -IncludedSmartAccessTags Primary_HDX_Proxy:temp -AppProtectionScreenCaptureRequired $false -AppProtectionKeyLoggingRequired $false

    Primary_HDX_Proxy 是在前面步骤 1“创建智能访问策略”中的 VPN 虚拟服务器名称。

  5. 要为其他 Win10desktop 用户启用应用程序保护策略,请使用以下命令:Set-BrokerAccessPolicyRule Win10Desktop_AG -AppProtectionScreenCaptureRequired $true -AppProtectionKeyLoggingRequired $true

  6. Verification(验证)

    对于 iPhone:注销 Citrix Workspace 应用程序(如果已在 iPhone 上打开)。 通过 Access Gateway 连接从外部登录到 Citrix Workspace 应用程序。 您应该能够在 StoreFront 中看到所需的资源,并且应用程序保护应处于禁用状态。

    对于除 iPhone 以外的设备: 注销 Citrix Workspace 应用程序(如果已在设备上打开)通过 Access Gateway 连接从外部登录到 Citrix Workspace 应用程序。 您应该能够在 StoreFront 中看到所需的资源,并且应用程序保护应处于禁用状态。

场景 3 - 对从基于浏览器的访问启动的连接禁用应用程序保护,并为来自 Citrix Workspace 应用程序的连接启用应用程序保护

以下步骤用于在从浏览器启动连接时为名为 Win10Desktop 的交付组禁用应用程序保护。

  1. 步骤 1:创建智能访问策略

    1. 创建智能访问策略以过滤从 Citrix Workspace 应用程序启动的连接,如场景 2 中的规定。创建以下表达式以在 User Agent 字符串中检查是否存在 CitrixReceiverHTTP.REQ.HEADER(“User-Agent”).CONTAINS(“CitrixReceiver”)。在此案例中,智能访问策略是 cwa

      创建表达式

    2. 创建另一个智能访问策略 HTTP.REQ.HEADER(“User-Agent”).CONTAINS(“CitrixReceiver”).NOT 以过滤不是从 Citrix Workspace 应用程序启动的连接。在此案例中,此智能访问策略是 browser

      创建会话策略

  2. 步骤 2:创建 Broker 访问策略规则

    1. 运行 GetBrokerAccessPolicyRule 以查看 Win10Desktop 的两个 Broker 访问策略。对于交付组 Win10Desktop,Broker 访问策略是 Win10Desktop_AG 和 Win10Desktop_Direct。记下 Win10Desktop 的桌面组 UID。

    2. 为 Win10Desktop 创建 Broker 访问策略以过滤从 Citrix Workspace 应用程序启动的连接。

      New-BrokerAccessPolicyRule -Name Win10Desktop_AG_CWA -DesktopGroupUid <Uid_of_desktopGroup> -AllowedConnections ViaAG -AllowedProtocols HDX, RDP -AllowedUsers AnyAuthenticated -AllowRestart $true -Enabled $true -IncludedSmartAccessFilterEnabled $true.

      Uid_of_desktopGroup 是通过在步骤 1 中运行 GetBrokerAccessPolicy 规则所获得的交付组的 DesktopGroupUID。

    3. 通过引用智能访问标记 cwa: Set-BrokerAccessPolicyRule Win10Desktop_AG_CWA -IncludedSmartAccessTags Primary_HDX_Proxy:cwa -AppProtectionScreenCaptureRequired $true -AppProtectionKeyLoggingRequired $true,使用以下命令仅为通过 CWA 建立的连接启用应用程序保护策略。Primary_HDX_Proxy 是在前面步骤 1“创建智能访问策略”中记下的 VPN 虚拟服务器名称。

    4. 使用以下命令为通过浏览器建立的其他连接禁用应用程序保护策略:Set-BrokerAccessPolicyRule Win10Desktop_AG -IncludedSmartAccessTags Primary_HDX_Proxy:browser -AppProtectionScreenCaptureRequired $false -AppProtectionKeyLoggingRequired $false

    5. 验证。注销 Citrix Workspace 应用程序(如果已打开)。重新登录 Citrix Workspace 应用程序,然后通过 Access Gateway 从外部连接启动所需的资源。您会看到已为该资源启用应用程序保护策略。通过外部连接从浏览器启动相同的资源,您会看到应用程序保护策略已被禁用。

场景 4:为特定 Active Directory 组中的用户禁用应用程序保护

以下步骤是为属于 Active Directory 组 xd.local\sales的 Win10Desktop 用户禁用应用程序保护。

  1. 运行 GetBrokerAccessPolicyRule 以查看 Win10Desktop 的两个 Broker 访问策略。对于交付组 Win10Desktop,存在两个 Broker 访问策略 Win10Desktop_AGWin10Desktop_Direct。记下 Win10Desktop 的桌面组 UID。

  2. 为 Win10Desktop 创建 Broker 访问策略规则,以过滤 Active Directory 组 xd.local\sales 中的用户建立的连接。

    New-BrokerAccessPolicyRule -Name Win10Desktop_AG_Sales_Group -DesktopGroupUid <Uid_of_desktopGroup> -AllowedConnections ViaAG -AllowedProtocols HDX, RDP -AllowedUsers Filtered -AllowRestart $true -Enabled $true -IncludedSmartAccessFilterEnabled $true

    Uid_of_desktopGroup 是通过在步骤 1 中运行 GetBrokerAccessPolicy 规则所获得的交付组的 DesktopGroupUID。

  3. 使用以下命令禁用 Windows 10 桌面用户(属于 AD 组 xd.local\sales)的应用程序保护策略:Set-BrokerAccessPolicyRule Win10Desktop_AG_Sales_Group -AllowedUsers Filtered -IncludedUsers xd.local\sales -IncludedUserFilterEnabled $true -AppProtectionScreenCaptureRequired $false -AppProtectionKeyLoggingRequired $false

  4. 使用以下命令为除 xd.local\sales 中的用户之外的其余网关连接启用应用程序保护策略:Set-BrokerAccessPolicyRule Win10Desktop_AG -AllowedUsers Anyauthenticated -ExcludedUserFilterEnabled $true -ExcludedUsers xd.local\sales -AppProtectionScreenCaptureRequired $true -AppProtectionKeyLoggingRequired $true
  5. 验证。注销 Citrix Workspace 应用程序(如果已打开)。 以 xd.local\sales Active Directory 组中的用户身份登录 Citrix Workspace 应用程序。启动受保护的资源,您会看到应用程序保护已被禁用。注销 Citrix Workspace 应用程序,然后以不属于 xd.local\sales的用户身份重新登录。启动受保护的资源,您将看到应用程序保护已启用。
上下文应用程序保护