Application Profiles 将检测与缓解分开。配置文件可用后,Cloudflare 会运行始终开启的检测。
违规不会自动阻止请求。准备缓解流量时,请使用 Custom Rule。
对学习得到的 Schema Profiles 使用此表达式:
cf.schema_validation.learned.violated对上传的 Schema Profiles 使用此表达式:
cf.schema_validation.uploaded.violated在创建阻止规则之前,先在 Security Analytics 中监控所选字段。
将缓解限定到目标主机名和路径:
cf.schema_validation.learned.violated and http.host eq "api.example.com" and starts_with(http.request.uri.path, "/v1/orders/")使用完整身份将缓解限定到某个 operation。包含 HTTP 方法、主机名和路径:
cf.schema_validation.learned.violated and http.request.method eq "POST" and http.host eq "api.example.com" and http.request.uri.path eq "/v1/orders"将配置文件违规与 Attack Score 组合:
cf.schema_validation.learned.violated and cf.waf.score lt 20将上传配置文件的违规与 Bot Score 组合:
cf.schema_validation.uploaded.violated and cf.bot_management.score lt 10先查看生产流量和采样违规原因。然后 创建 Custom Rule,并选择合适的动作。
遵循以下推出实践:
- 先在 Security Analytics 中进行监控。
- 将第一条规则限定到一个 operation。
- 在扩大范围之前查看效果。
- 应用发布后重新检查配置文件。
- 客户端变更后重新检查违规。
有关字段详情,请参阅 Application Profile 字段。