This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
内容检查标注
Citrix ADC 设备发送 ICAP 请求时,ICAP 服务器使用状态代码指定响应状态。状态代码还指定了设备要执行的操作。例如,如果对于 REQMOD ICAP 请求,ICAP 响应中的状态代码为 200 OK,如果已设置 res-hdr
,则 ICAP 客户端可以将从 ICAP 服务器收到的响应发送给用户。但是,如果未设置 res-hdr
,则 ICAP 客户端(Citrix ADC 设备)可以将原始或经过调整的请求转发到源后端服务器。
但在某些情况下,ICAP 服务器无法做出最终决定。相反,它只向设备提供请求的信息,设备可以根据策略评估进行决定。在这种情况下,ICAP 客户端不能仅依赖 ICAP 响应状态代码,而是查看收到的 ICAP 标头并评估标头上的策略表达式并应用关联的操作。
以下是需要 ICAP 内容检查标注的一些使用案例:
- 收到 SSH 握手请求后,ICAP 客户端(Citrix ADC 设备)可能会对访问的域进行分类,并决定是继续握手还是放弃它。
- 在收到服务的 HTTP 请求后,设备可能会根据用户的租户 ID 检查外部服务器的访问权限。可以采取适当的行动。
在这两种情况下,ICAP 服务器对配置的策略都不了解,而只是将请求的信息发回设备。然后,设备对接收到的响应信息应用策略并应用相关操作。 将 ICAP 内容检查标注添加到 ICAP 框架中,以返回来自外部 ICAP 服务器的请求信息。此标注的功能与 HTTP 标注的工作方式非常相似。任何策略表达式(例如,响应程序或 AppFirewall)都可以触发对已配置的 ICAP 服务器的 ICAP 请求。请求的信息,通过 Return NexPR 配置,然后从 ICAP 响应中提取并传递到请求的模块
将 ICAP 内容检查标注添加到 ICAP 框架中,以返回来自外部 ICAP 服务器的请求信息。此标注的功能与 HTTP 标注的工作方式非常相似。ICAP 模块可以使用现有的高级策略表达式来触发对已配置的 ICAP 服务器的 ICAP 标注
内容检查标注策略表达式
以下内容检查策略表达式用作 ICAP 标注中的返回表达式。此内容检查标注表达式的语法类似于 HTTP 标注表达式。
SYS.CI_CALLOUT(<ContentInspection callout name>).Operator
其中,
<ContentInspection callout name>
是 ICAP 类型的 CONTENTInspection 标注,它定义了 ICAP 服务器的属性。以及用于向 ICAP 服务器发送和接收请求的 ICAP 配置文件。
来自 ICAP 标注代理的响应的返回类型决定了您可以在响应上使用的运算符集。如果要分析的响应部分是文本,则可以使用文本运算符来分析响应。例如,您可以使用CONTAINS(<string>)
运算符检查响应的指定部分是否包含特定字符串。
示例:
SYS.CI_CALOUT(CI 标注)。包含(“待检查的值”)
配置 ICAP 内容检查标注
完成以下步骤以在设备上配置 ICAP 内容检查标注。
- 添加会计师协会个人资料
- 添加内容检查标注
- 设置内容检查标注表达式
- 调用内容检查标注
添加会计师协会个人资料
添加内容检查标注
CONTENTInspectionCallOut 命令指定 ICAP 服务器信息以及返回表达式及其类型。
在命令提示符下,键入:
add contentInspection callout <name> -type ICAP [-profileName <string>] (-serverName <string> | (-serverip <ip_addr|ipv6_addr> [-serverport <positive_integer>])) [-returnType <returnType>] [-resultExpr <string>] [-comment <string>]
其中:
<profileName>
-会计师协会简介的名称
<returnType>
-( **布尔 | 数 | 文本**)
<resultExpr>
-收到 ICAP 响应时要评估的表达式必须以 ICAP.RES 开头。
示例:
提取 X-URL 类别 ICAP 响应标头的值,可以按照以下方式指定 ResulTexPR。
add contentInspection callout cic –type ICAP –profileName profile1 –resultExpr “ICAP.RES.HEADER("X-URL-Category")”
前面的表达式返回 X-URL-Category 的值检查返回值并应用关联的操作。
使用内容检查标注和功能操作的功能策略
当 Citrix ADC 功能需要使用 ICAP 与外部服务进行交互时,该功能可以使用内容检查标注 CI_CALLOUT。在此模式下,该功能使用功能策略表达式中的 CI_CALOUT 来触发向外部 ICAP 服务器的 ICAP 请求。在接收响应时,该功能可以在内容检查操作中指定 ResultExtract,以便从 ICAP 响应中提取所需信息。结果可以是布尔型、数字或文本。然后,要素可以根据提取的结果执行相关操作。让我们看看功能策略如何使用 CI Callout 来执行功能操作的使用案例。
用例 1:使用视频优化检测策略提取 SNI,如果域为 “社交媒体”,请放弃握手
请完成以下步骤来配置用例:
-
添加会计师协会个人资料
add icapProfile ICAPProfileName –mode REQMOD -insertHTTPRequest q{ "GET / HTTP/1.1\r\nHost: " + CLIENT.SSL.DETECTED_DOMAIN + "\r\n\r\n"}
-
添加代表 ICAP 服务器的内容检查标注和结果表达式,以从 ICAP 响应中提取类别信息。
add contentInspection callout cic -type ICAP -serverName icap-server-name -icapProfile ICAPProfileName -resultExpr "ICAP.res.header("X-URL-Category")" –resultType [same as callout resultType]
-
添加视频检测策略和表达式以获取接收域的 URL 类别信息,如果类别为 “社交媒体”,则删除请求。
add videooptimization detectionpolicy policy_urlcat -rule " SYS.CI_CALLOUT(cic).EQ(\"Social Media\")" -action DROP
用例 2: 从 ICAP 服务器检索 URL 类别并使用模式集阻止它
请完成以下步骤来配置用例:
-
添加定义模式和 HTTP 请求的 ICAP 配置文件。
add icapProfile ICAPProfileName –mode REQMOD -insertHTTPRequest q{ "GET / HTTP/1.1\r\nHost: " + CLIENT.SSL.DETECTED_DOMAIN + "\r\n\r\n"}
-
添加内容检查标注以获取类别信息。
add contentInspection callout cic -type ICAP -serverName icap-server-name -icapProfile ICAPProfileName -resultExpr "ICAP.res.header("X-URL-Category")"
-
添加一个模式集并将被阻止的类别模式绑定到它。
add policy patset blocked-category
bind policy patset blocked-category “gambling” –index 1
bind policy patset blocked-category “social media” –index 2
bind policy patset blocked-category “games” –index 3
-
添加视频优化检测策略以调用 ICAP 标注操作。
add videooptimization detectionpolicy policy_urlcat –rule SYS.CI_CALLOUT(cic).CONTAINS_ANY("blocked-category")" -action DROP
共享
共享
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.