- WAF功能
- 节点自动注册到后台
- 其它接口
- 接口更新日志
- AI接口
- 定制页面上传
- API完成情况
- UEBA参数文档
- 防火墙配置
- 节点、域名、缓存
- 接口认证
- 节点管理
- 缓存配置
- 防火墙配置
- IP黑/白名单
- URL黑/白名单
- 防CC
- 防盗链
- 精准访问控制【2024.06更新】
- 区域访问限制
- APP专用防CC策略
- 内容安全风控:关键字【2024.06更新】
- 内容安全风控:图片
- 安全访问控制
- WAF功能
- 新WAF功能
- 防篡改
- 批量配置接口
- http防护【2024.05更新】
- 动态防护【2024.06更新】
- 资源访问控制【2024.06更新】
- bot防护【2024.06更新】
- api防护【2024.06更新】
- url统计模块【2024.06更新】
- api基线管理
- httpStream
- 蜜罐功能(新增)
- 证书管理
- 统计数据
- 其它
- 健康检查
- AI接口
- 接口认证
- 测试包
- UEBA【2024.06更新】
- UEBA2.0(2025.06新增)
- 【内部用】ip库管理【2024.06更新】
api防护配置增加
开发中
POST
/firewall/api_protect
key值传入规范#
若鉴权方式为动态,key传入自定义值 具体传值方式如下
···
加密秘钥为key+url // www.example.com/url/1.php 则只需要传入key+/url/1.php
Payload 中 time为当前时间的时间戳 以秒计算
exp(过期时间): 应当与接口中保持一致 exp=iat+exitTime
token加密方式为hs256
规范参数为
{
"time":1724739275, #和签发时间一致
"iat": 1724739275, # 签发时间
"nbf": 1724739275, # 生效时间
"exp": 1724825775 # 过期时间
}
生成的token应该存入指定的header中
····
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Accept
string
必需
默认值:
application/json
Body 参数application/json
domain
array [object {2}]
必需
domain_uuid
string
必需
api
array [object {6}]
必需
示例
{
"domain": [
{
"domain_uuid": "string",
"api": [
{
"url": "string",
"authentication": {
"type": 0,
"failCount": 0,
"banTime": 0,
"hash": "string",
"key": "string",
"header": "string",
"banType": 0,
"exitTime": 0,
"callTime": 0,
"callCount": 0,
"ipAddress": [
"string"
],
"region": [
"string"
]
},
"check": {
"active": true,
"checkRule": [
"string"
],
"failCount": 0,
"banTime": 0,
"banType": 0
},
"rateLimit": {
"active": true,
"callCount": 0,
"callTime": 0,
"failCount": 0,
"banTime": 0,
"banType": 0
},
"sensitive": {
"active": true,
"rule": [
"string"
],
"failType": 0,
"gzip": true,
"hitTime": 0,
"hitCount": 0,
"countFailType": 0,
"blockType": 0,
"blockTime": 0
},
"weakPasswords": {
"active": true,
"isTop": true,
"isChar": true,
"mixLength": 0,
"param": [
"string"
]
}
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/firewall/api_protect' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": [
{
"domain_uuid": "string",
"api": [
{
"url": "string",
"authentication": {
"type": 0,
"failCount": 0,
"banTime": 0,
"hash": "string",
"key": "string",
"header": "string",
"banType": 0,
"exitTime": 0,
"callTime": 0,
"callCount": 0,
"ipAddress": [
"string"
],
"region": [
"string"
]
},
"check": {
"active": true,
"checkRule": [
"string"
],
"failCount": 0,
"banTime": 0,
"banType": 0
},
"rateLimit": {
"active": true,
"callCount": 0,
"callTime": 0,
"failCount": 0,
"banTime": 0,
"banType": 0
},
"sensitive": {
"active": true,
"rule": [
"string"
],
"failType": 0,
"gzip": true,
"hitTime": 0,
"hitCount": 0,
"countFailType": 0,
"blockType": 0,
"blockTime": 0
},
"weakPasswords": {
"active": true,
"isTop": true,
"isChar": true,
"mixLength": 0,
"param": [
"string"
]
}
}
]
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
total
integer
必需
data
object
必需
success
array [object {2}]
必需
failed
array[string]
必需
示例
{"code":200,"message":"失败","total":0,"data":{"success":[],"failed":[{"domain_uuid":"35296efd341f520d90b686f6591d48c1dx73dx23y","api":[{"url":"/api/base/captcha","rateLimit":{"active":false,"callCount":3,"failCount":3,"callTime":3,"banType":3,"banTime":3600},"check":{"banTime":3600,"failCount":3,"banType":3,"active":false,"checkRule":[""]},"sensitive":{"gzip":false,"failType":1,"active":false,"rule":[""],"hitTime":10,"hitCount":1,"countFailType":1,"blockType":3,"blockTime":3600},"authentication":{"type":0,"banTime":3600,"failCount":3,"banType":3,"key":"","hash":"","header":"","exitTime":12,"callTime":12,"callCount":1,"ipAddress":[""],"region":[""]},"weakPasswords":{"active":true,"isTop":true,"isChar":false,"mixLength":0,"param":["password"]}}],"error":"URL已存在"}]}}
🟢200成功
修改于 2025-02-27 07:19:55