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!
内容检查标注
当 NetScaler 设备发送 ICAP 请求时,ICAP 服务器使用状态代码来指定响应状态。状态代码还指定设备要执行的操作。例如,如果对于 REQMOD ICAP 请求,ICAP 响应中的状态代码为 200 OK 并且已设置,则 res-hdr
ICAP 客户端可以将从 ICAP 服务器收到的响应发送给用户。但 res-hdr
是,如果未设置,则 ICAP 客户端(NetScaler 设备)可以将原始或调整后的请求转发到源后端服务器。
但是在某些情况下,ICAP 服务器无法做出最终决定。相反,它只向设备提供请求的信息,设备可以根据策略评估做出决定。在这种情况下,ICAP 客户端不能仅依赖于 ICAP 响应状态代码,而是查看收到的 ICAP 标头并评估标头上的策略表达式并应用关联的操作。
以下是需要 ICAP 内容检查标注的一些用例:
- 收到 SSH 握手请求后,ICAP 客户端(NetScaler 设备)可能会对访问的域进行分类,然后决定是继续握手还是删除握手。
- 收到服务的 HTTP 请求时,设备可能会根据用户的租户 ID 检查外部服务器的访问权限。可以采取适当的措施。
在这两种情况下,ICAP 服务器对配置的策略一无所知,而只是将请求的信息发送回设备。然后,设备将策略应用于收到的响应信息并应用关联的操作。 ICAP 内容检查标注被添加到 ICAP 框架中,以便从外部 ICAP 服务器返回请求信息。此标注的功能与 HTTP 标注的工作方式非常相似。任何策略表达式,例如响应程序或 AppFirewall 都可以触发对配置的 ICAP 服务器的 ICAP 请求。然后从 ICAP 响应中提取通过 ReturnExPR 配置的请求信息并传递给请求的模块
ICAP 内容检查标注被添加到 ICAP 框架中,以便从外部 ICAP 服务器返回请求信息。此标注的功能与 HTTP 标注的工作方式非常相似。ICAP 模块可以使用现有的高级策略表达式,可用于触发对配置的 ICAP 服务器的 ICAP 标注。
内容检查标注策略表达式
以下内容检查策略表达式用作 ICAP 标注中的返回表达式。此内容检查标注表达式的语法类似于 HTTP 标注表达式。
SYS.CI_CALLOUT(<ContentInspection callout name>).Operator
其中,
<ContentInspection callout name>
是 ICAP 类型的内容检查标注,用于定义 ICAP 服务器的属性。以及用于向/从 ICAP 服务器发送和接收请求的 ICAP 配置文件。
来自 ICAP Callout Agent 的响应的返回类型决定了您可以在响应中使用的一组运算符。如果要分析的响应部分是文本,则可以使用文本运算符来分析响应。例如,您可以使用 CONTAINS(<string>)
运算符检查响应的指定部分是否包含特定字符串。
示例:
SYS.CI_CALLOUT(CI 标注)。包含(“要检查的值”)
配置 ICAP 内容检查标注
要在设备上配置 ICAP 内容检查标注,请完成以下步骤。
- 添加 ICAP 个人资料
- 添加内容检查标注
- 设置内容检查标注表达式
- 调用内容检查标注
添加 ICAP 个人资料
添加内容检查标注
C ontentInspectionCCallout 命令指定 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>
-( **BOOL | NUM | 文字**)
<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 的值检查返回值并应用关联的操作。
使用内容检查标注和功能操作的功能策略
当 NetScaler 功能需要使用 ICAP 与外部服务交互时,该功能可以使用内容检查标注 CI_CALLOUT。在此模式下,该功能使用功能策略表达式中的 CI_CALLOUT 触发对外部 ICAP 服务器的 ICAP 请求。收到响应后,该功能可以在 ContentExpection 操作中指定 ResultExpression,以便从 ICAP 响应中提取所需的信息。结果可以是布尔型、数字或文本。然后,要素可以根据提取的结果采取关联的操作。让我们看一个使用案例,说明功能策略如何使用 CI Callout 执行功能操作。
使用案例 1:使用视频优化检测策略提取 SNI 并在域为“社交媒体”时丢弃握手
要配置用例,请完成以下步骤:
-
添加 ICAP 个人资料
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_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_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.