backend: require confirmation for signed channel updates [CI]
ci/woodpecker/pr/verify Pipeline failed
ci/woodpecker/pr/web-build unknown status

This commit is contained in:
justme committed 2026-10-07 12:57:20 +08:00
1 parent 7160de2a36
commit 84f9d211bc
62 files changed
+1717 -70

No files matched your search

+377
View File
@@ -124,6 +124,37 @@
}
}
},
"/api/public/ipv6": {
"get": {
"tags": [
"public"
],
"summary": "IPv6 configuration and collector diagnostics without addresses",
"operationId": "ipv6_get",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageDtoOfAgentIpv6Dto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
}
}
},
"/api/public/lines/{line_id}": {
"get": {
"tags": [
@@ -3917,6 +3948,148 @@
}
}
},
"/api/admin/backend/update": {
"get": {
"tags": [
"admin-build"
],
"summary": "Current channel and host-verified backend update",
"operationId": "backend_update_get",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BackendUpdateDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
}
},
"post": {
"tags": [
"admin-build"
],
"summary": "Confirm one verified backend release before the host restarts it",
"operationId": "backend_update_confirm",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfirmBackendUpdateRequest"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "No Content",
"content": {
"application/json": {
"schema": { }
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"412": {
"description": "Precondition Failed",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
}
}
},
"/api/admin/backend/update/live": {
"get": {
"tags": [
"admin-build"
],
"summary": "Server-sent backend update notifications",
"operationId": "backend_update_live",
"responses": {
"200": {
"description": "OK"
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
}
}
},
"/api/admin/links": {
"get": {
"tags": [
@@ -4357,6 +4530,39 @@
"ipv6_supported": {
"type": "boolean",
"default": false
},
"ipv6": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Ipv6DiagnosticDto"
}
]
}
}
},
"AgentIpv6Dto": {
"required": [
"agent_id",
"name",
"online",
"ipv6"
],
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"name": {
"type": "string"
},
"online": {
"type": "boolean"
},
"ipv6": {
"$ref": "#/components/schemas/Ipv6DiagnosticDto"
}
}
},
@@ -4435,6 +4641,57 @@
}
}
},
"BackendUpdateDto": {
"required": [
"channel",
"enabled",
"state",
"current_tag",
"current_digest",
"available",
"error"
],
"type": "object",
"properties": {
"channel": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"state": {
"type": "string"
},
"current_tag": {
"type": [
"null",
"string"
]
},
"current_digest": {
"type": [
"null",
"string"
]
},
"available": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReleaseDto"
}
]
},
"error": {
"type": [
"null",
"string"
]
}
}
},
"BlocksDto": {
"required": [
"transport",
@@ -4512,6 +4769,16 @@
"items": {
"$ref": "#/components/schemas/NodeBuildDto"
}
},
"backend_update": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/BackendUpdateDto"
}
]
}
}
},
@@ -4628,6 +4895,22 @@
}
}
},
"ConfirmBackendUpdateRequest": {
"required": [
"seq"
],
"type": "object",
"properties": {
"seq": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [
"integer",
"string"
],
"format": "int64"
}
}
},
"ConnectedProbeDto": {
"required": [
"probe_id",
@@ -5424,6 +5707,65 @@
}
}
},
"Ipv6DiagnosticDto": {
"required": [
"address_configured",
"socket_supported",
"listening",
"has_global_address",
"has_default_route",
"state"
],
"type": "object",
"properties": {
"address_configured": {
"type": [
"null",
"boolean"
]
},
"socket_supported": {
"type": "boolean"
},
"listening": {
"type": [
"null",
"boolean"
]
},
"has_global_address": {
"type": [
"null",
"boolean"
]
},
"has_default_route": {
"type": [
"null",
"boolean"
]
},
"state": {
"type": "string"
},
"network_scope": {
"type": "string",
"default": "unknown"
},
"host_has_global_address": {
"type": [
"null",
"boolean"
]
},
"host_has_default_route": {
"type": [
"null",
"boolean"
]
}
}
},
"JoinTokenDto": {
"required": [
"id",
@@ -6201,6 +6543,27 @@
}
}
},
"PageDtoOfAgentIpv6Dto": {
"required": [
"items",
"next_cursor"
],
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentIpv6Dto"
}
},
"next_cursor": {
"type": [
"null",
"string"
]
}
}
},
"PageDtoOfApiTokenDto": {
"required": [
"items",
@@ -6815,6 +7178,16 @@
"items": {
"$ref": "#/components/schemas/ProbeConnectionDto"
}
},
"ipv6": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Ipv6DiagnosticDto"
}
]
}
}
},
@@ -7112,6 +7485,10 @@
},
"digest": {
"type": "string"
},
"channel": {
"type": "string",
"default": "release"
}
}
},