通过 Browser Isolation,您可以根据身份、安全威胁或内容定义策略来动态隔离网站。
当 HTTP 策略应用 Isolate(隔离)操作时,用户的网页浏览器将无感地接收到与 HTML 兼容的远程浏览器客户端。隔离策略可应用于包含 Accept: text/html* 的请求(即针对网页的请求)。这使得 Browser Isolation 策略可以与 API 流量并存。
以下示例为所有 Web 流量启用隔离:
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Host(主机) | matches regex(匹配正则表达式) | .* |
Isolate(隔离) |
如果您需要隔离特定页面,可以列出您想要隔离流量的域:
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Domain(域) | in(属于) | example.com, example.net |
Isolate(隔离) |
您可以选择禁用某些目标或类别的隔离。以下配置对定向到 example.com 的流量禁用隔离:
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Host(主机) | in(属于) | example.com |
Do Not Isolate(不隔离) |
当您隔离一个网站时,您还可以限制用户在该网站上的操作。当您选择 Isolate 操作时,以下可选设置会出现在 Gateway HTTP 策略构建器中。配置这些设置可在用户与远程浏览器中的不可信网站交互时防止数据丢失 ↗,例如,阻止用户从隔离的内部应用程序中复制机密数据。
flowchart LR
subgraph remotebrowser[远程浏览器]
siteA["隔离的
网站"]--数据-->remoteclip["远程
剪贴板"]
end
subgraph client[客户端]
localclip["本地
剪贴板"]
end
remoteclip-->localclip
- Allow(允许):(默认)用户可以将内容从隔离网站复制到其本地剪贴板。
- Allow only within isolated browser(仅允许在隔离浏览器内):用户只能将内容从隔离网站复制到远程剪贴板。用户无法将内容从远程浏览器复制到本地剪贴板。您可以将此设置与 粘贴(从客户端到远程):Allow only within isolated browser(仅允许在隔离浏览器内) 配合使用,以仅允许在隔离的网站之间进行复制粘贴。
- Do not allow(不允许):禁止用户从隔离网站复制内容。
flowchart LR
subgraph client[客户端]
localclip["本地
剪贴板"]
end
subgraph remotebrowser[远程浏览器]
remoteclip["远程
剪贴板"]-->siteA["隔离的
网站"]
end
localclip--数据-->remoteclip
- Allow(允许):(默认)用户可以将本地剪贴板的内容粘贴到隔离网站。
- Allow only within isolated browser(仅允许在隔离浏览器内):用户只能将远程剪贴板的内容粘贴到隔离网站。用户无法将本地剪贴板的内容粘贴到远程浏览器。您可以将此设置与 复制(从远程到客户端):Allow only within isolated browser(仅允许在隔离浏览器内) 配合使用,以仅允许在隔离的网站之间进行复制粘贴。
- Do not allow(不允许):禁止用户将内容粘贴到隔离网站中。
- Allow(允许):(默认)用户可以将文件从隔离网站下载到其本地机器。
- Do not allow(不允许):禁止用户从隔离网站下载文件到其本地机器。
- View in remote browser(在远程浏览器中查看):用户可以在隔离环境中打开并查看文件。
- Allow(允许):(默认)用户可以将文件从其本地机器上传到隔离网站。
- Do not allow(不允许):禁止用户从其本地机器将文件上传到隔离网站。
- Allow(允许):(默认)用户可以向隔离网站输入键盘内容。
- Do not allow(不允许):禁止用户向隔离网站输入键盘内容。
- Allow(允许):(默认)用户可以将隔离的网页打印到其本地机器上。
- Do not allow(不允许):禁止用户将隔离的网页打印到其本地机器上。
使用自定义拦截对话框,当用户在隔离的浏览器会话中被阻止执行特定操作(如复制、粘贴、下载、上传、键盘输入或打印)时,您可以托管一个自定义拦截页面。
管理员可以配置自定义拦截对话框以解释拦截的原因,并引导用户使用提供的查询参数来解决他们的问题:
action:copy(复制)、paste(粘贴)、download(下载)、upload(上传)、perform keyboard inputs(键盘输入)和 print(打印)cf_colo:例如sea01client_url:例如https://example.compolicy_id:32 字符 IDrbi_debug_id:32 字符 IDuser_id:32 字符 ID
自定义拦截对话框仍处于 Beta 阶段。请联系您的账户团队开始使用自定义拦截对话框。
隔离安全威胁(例如恶意软件和网络钓鱼)。
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Security Categories(安全类别) | in(属于) | All security risks(所有安全风险) | Isolate(隔离) |
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "Isolate all security threats",
"description": "Isolate security threats such as malware and phishing",
"enabled": true,
"action": "isolate",
"filters": [
"http"
],
"traffic": "any(http.request.uri.security_category[*] in {68 178 80 83 176 175 117 131 134 151 153})",
"identity": "",
"device_posture": ""
}'隔离高风险内容类别(例如新注册的域名)。
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Content Categories(内容类别) | in(属于) | Security Risks(安全风险) | Isolate(隔离) |
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "Isolate high risk content",
"description": "Isolate high risk content categories such as newly registered domains",
"enabled": true,
"action": "isolate",
"filters": [
"http"
],
"traffic": "any(http.request.uri.content_category[*] in {32 169 177 128})",
"identity": "",
"device_posture": ""
}'隔离新闻和媒体网站(它们是恶意广告攻击的目标)。
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Content Categories(内容类别) | in(属于) | News and Media(新闻与媒体) | Isolate(隔离) |
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "Isolate news and media",
"description": "Isolate news and media sites, which are targets for malvertising attacks",
"enabled": true,
"action": "isolate",
"filters": [
"http"
],
"traffic": "any(http.request.uri.content_category[*] in {122})",
"identity": "",
"device_posture": ""
}'隔离尚未被 Cloudflare Radar 分类的内容。
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Content Categories(内容类别) | not in(不属于) | All content categories(所有内容类别) | Isolate(隔离) |
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "Isolate uncategorized content",
"description": "Isolate content not categorized by Cloudflare Radar",
"enabled": true,
"action": "isolate",
"filters": [
"http"
],
"traffic": "not(any(http.request.uri.content_category[*] in {2 67 125 133 3 75 183 89 182 6 90 91 144 150 7 70 74 76 79 92 96 100 106 107 116 120 121 122 127 139 156 164 99 9 101 137 10 103 146 11 12 77 98 108 110 111 118 126 129 172 168 113 33 179 166 15 115 119 124 141 161 17 85 87 102 157 135 138 180 162 140 142 32 169 177 128 22 73 82 88 148 23 24 181 71 72 173 78 84 86 94 97 104 105 114 174 93 130 132 136 147 149 154 158 152 26 69 184 81 95 109 123 145 155 159 160 163 165 167}))",
"identity": "",
"device_posture": ""
}'隔离 ChatGPT 的使用。
| 选择器 | 运算符 | 值 | 操作 |
|---|---|---|---|
| Application(应用程序) | in(属于) | ChatGPT | Isolate(隔离) |
在 Configure policy settings(配置策略设置) 中,您可以为 ChatGPT 自定义限制。例如,为防止用户输入敏感信息,您可以选择 Disable copy / paste(禁用复制/粘贴) 和 Disable file uploads(禁用文件上传)。
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "Isolate ChatGPT",
"description": "Isolate the use of ChatGPT",
"enabled": true,
"action": "isolate",
"filters": [
"http"
],
"traffic": "any(app.ids[*] in {1199})",
"identity": "",
"device_posture": ""
}'