refactor: remove the runtime binary binding; every release registration path verifies the CI signature [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

The hash a node reports about itself cannot be trusted (a swapped binary can
copy the old hash), so the runtime binding only caught files that were replaced
by something that did not lie. Provenance stays where it can be verified: the
signed release manifest (digest) and the signed SHA256SUMS.

- Remove BinaryBindingService, the node_bindings table (schema v15 drops it),
  BinaryPolicy, the handshake hash/manifest fields and the admin binary column.
- Drop the per-platform "binaries" list from the release manifest, the hash
  scripts and the updater's installed.manifest copy.
- ReleaseService.PublishAsync now verifies the release signature, so the admin
  POST /releases route is no longer an unsigned path; tests sign with a test key.
- Docs: section 16 explains why the runtime check is gone.
This commit is contained in:
justme committed 2026-10-08 18:30:05 +08:00
1 parent a4f3d1892a
commit 904ea2b0ae
49 files changed
+115 -1143

No files matched your search

+1 -100
View File
@@ -1374,7 +1374,7 @@
"tags": [
"admin-build"
],
"summary": "Register a CI-signed release manifest; online nodes get it right away (their updaters verify the signature). Admin or release tokens",
"summary": "Register a CI-signed release manifest (the signature is checked against the release key); online nodes get it right away. Admin or release tokens",
"operationId": "releases_publish",
"requestBody": {
"content": {
@@ -4472,56 +4472,6 @@
"x-moshiro-capability": "update.confirm"
}
},
"/api/admin/nodes/{id}/binary": {
"delete": {
"tags": [
"admin-build"
],
"summary": "Accept the node's current binary: clear its binding so the next handshake binds it again",
"operationId": "nodes_binary_clear",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "No Content",
"content": {
"application/json": {
"schema": { }
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
},
"x-moshiro-capability": "fleet.write"
}
},
"/api/admin/backend/update": {
"get": {
"tags": [
@@ -7139,45 +7089,6 @@
}
}
},
"NodeBinaryDto": {
"required": [
"sha256",
"signed",
"seq",
"bound_at",
"violation",
"violation_at"
],
"type": "object",
"properties": {
"sha256": {
"type": "string"
},
"signed": {
"type": "boolean"
},
"seq": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [
"integer",
"string"
],
"format": "int64"
},
"bound_at": {
"format": "date-time"
},
"violation": {
"type": [
"null",
"string"
]
},
"violation_at": {
"format": "date-time"
}
}
},
"NodeBuildDto": {
"required": [
"id",
@@ -7250,16 +7161,6 @@
}
]
},
"binary": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/NodeBinaryDto"
}
]
},
"owners": {
"type": [
"null",