mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
refactor(firewall): simplify whitelist configuration and rule protection (#13838)
This commit is contained in:
@@ -19106,7 +19106,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/hosts/firewall/rules/delete": {
|
||||
"post": {
|
||||
"description": "Returns a taskID immediately; per-rule deletion results and failures are written to the task log.",
|
||||
"description": "Deletes managed rules by UUID or unprotected before-chain rules by instance key. Returns a taskID immediately; results are written to the task log.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -19143,7 +19143,7 @@ const docTemplate = `{
|
||||
"Timestamp": []
|
||||
}
|
||||
],
|
||||
"summary": "Queue managed firewall rule deletion",
|
||||
"summary": "Queue firewall rule deletion",
|
||||
"tags": [
|
||||
"Firewall"
|
||||
],
|
||||
@@ -19419,7 +19419,7 @@ const docTemplate = `{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19433,10 +19433,7 @@ const docTemplate = `{
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -19467,7 +19464,7 @@ const docTemplate = `{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19481,10 +19478,7 @@ const docTemplate = `{
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -19515,7 +19509,7 @@ const docTemplate = `{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19529,10 +19523,7 @@ const docTemplate = `{
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -36413,17 +36404,36 @@ const docTemplate = `{
|
||||
"type": "object"
|
||||
},
|
||||
"dto.FirewallRuleDelete": {
|
||||
"description": "Provide managed rule UUIDs, before-chain rule targets, or both.",
|
||||
"properties": {
|
||||
"beforeRules": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.FirewallRuleDeleteTarget"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"uuids": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"dto.FirewallRuleDeleteTarget": {
|
||||
"properties": {
|
||||
"instanceKey": {
|
||||
"maxLength": 128,
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"$ref": "#/definitions/filter.Scope"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uuids"
|
||||
"scope",
|
||||
"instanceKey"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
@@ -19102,7 +19102,7 @@
|
||||
},
|
||||
"/hosts/firewall/rules/delete": {
|
||||
"post": {
|
||||
"description": "Returns a taskID immediately; per-rule deletion results and failures are written to the task log.",
|
||||
"description": "Deletes managed rules by UUID or unprotected before-chain rules by instance key. Returns a taskID immediately; results are written to the task log.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -19139,7 +19139,7 @@
|
||||
"Timestamp": []
|
||||
}
|
||||
],
|
||||
"summary": "Queue managed firewall rule deletion",
|
||||
"summary": "Queue firewall rule deletion",
|
||||
"tags": [
|
||||
"Firewall"
|
||||
],
|
||||
@@ -19415,7 +19415,7 @@
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19429,10 +19429,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -19463,7 +19460,7 @@
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19477,10 +19474,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -19511,7 +19505,7 @@
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Returns a synchronization taskID. The whitelist configuration is saved only after synchronization succeeds.",
|
||||
"description": "Saves whitelist configuration only. Missing rules are added on startup, restart, initialization, or synchronization; existing rules are not removed.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -19525,10 +19519,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilterChainOperationResponse"
|
||||
}
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
@@ -36409,17 +36400,36 @@
|
||||
"type": "object"
|
||||
},
|
||||
"dto.FirewallRuleDelete": {
|
||||
"description": "Provide managed rule UUIDs, before-chain rule targets, or both.",
|
||||
"properties": {
|
||||
"beforeRules": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.FirewallRuleDeleteTarget"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"uuids": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"dto.FirewallRuleDeleteTarget": {
|
||||
"properties": {
|
||||
"instanceKey": {
|
||||
"maxLength": 128,
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"$ref": "#/definitions/filter.Scope"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uuids"
|
||||
"scope",
|
||||
"instanceKey"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user