The vault serves the verbs enrolment-token, node-account, rotate-node, node-account-confirm and abandon, keeps the state node-logins, and says rotation-begun, node-account-ready and rotation-done (ADR 0587 §3, §5, §8; ADR 0583 §1-§7 and insights; ADR 0561 §4, §5). Only mesh-enrolment asks the first two and sign for an enrolment; a rotation needs a hand act read back from mesh-hand-acts by its id, runs one at a time with the bus node last, and is ready only when the loaded list holds the new login and done when it lacks the old one. A node's login is handed to that node's engine alone, sealed to the key it stated. The key of a node that leaves the placement is deleted. Accounts kept for an enrolment or a node are marked and never retired as unwanted. Subtasks 774/S43 to S50 in one commit: they share enrolment.go, noderotation.go, tools.go and the manifest, and could not be cut apart without a commit that does not build. New tests: 3 unit functions (table-style flows) and the one integration test of S50; mesh-vault stays at 134 unit and 2 integration tests, within the module budget of 500 and 50, so none was merged or deleted. The integration test's player gained a mesh/ask answer. (issue 774, 774/S43, 774/S44, 774/S45, 774/S46, 774/S47, 774/S48, 774/S49, 774/S50) Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
221 lines
4.5 KiB
JSON
221 lines
4.5 KiB
JSON
{
|
|
"module": "mesh-vault",
|
|
"version": "1",
|
|
"runs-as": "mesh-vault",
|
|
"provides": [
|
|
{
|
|
"name": "secret",
|
|
"credential": {
|
|
"form": "pair"
|
|
},
|
|
"scope": "mesh",
|
|
"identity": {
|
|
"in": "a vault entry"
|
|
}
|
|
}
|
|
],
|
|
"emits": [
|
|
"provisioned",
|
|
"rotated",
|
|
"secret-changed",
|
|
"account-hashed",
|
|
"own-replaced",
|
|
"account-issued",
|
|
"signed",
|
|
"rotation-begun",
|
|
"node-account-ready",
|
|
"rotation-done"
|
|
],
|
|
"invokes": [
|
|
"seat:mesh-hand-acts.hand-acts"
|
|
],
|
|
"reads": [
|
|
"node-engine.have",
|
|
"mesh-grants.accounts",
|
|
"mesh-controller.lease",
|
|
"mesh-delivery-assigner.placement",
|
|
"mesh-provisioner.plans",
|
|
"mesh-provisioner.provisions"
|
|
],
|
|
"state": [
|
|
{
|
|
"name": "bus-accounts",
|
|
"history": 2
|
|
},
|
|
"signers",
|
|
"bound",
|
|
"node-logins"
|
|
],
|
|
"receives": {
|
|
"secret": "${dir:grants}/mesh.json"
|
|
},
|
|
"grants": {
|
|
"secret": "${dir:grants}"
|
|
},
|
|
"keeps": "/var/lib/mesh-vault/root",
|
|
"data": {
|
|
"own": [
|
|
{
|
|
"id": "state",
|
|
"path": "${dir:state}",
|
|
"class": "valuable",
|
|
"why": "the vault's own keys"
|
|
},
|
|
{
|
|
"id": "ledger",
|
|
"path": "${dir:ledger}",
|
|
"class": "valuable",
|
|
"why": "every secret the vault keeps"
|
|
},
|
|
{
|
|
"id": "root",
|
|
"path": "${dir:root}",
|
|
"class": "valuable",
|
|
"why": "the vault's root material"
|
|
},
|
|
{
|
|
"id": "store",
|
|
"path": "${dir:store}",
|
|
"class": "valuable",
|
|
"why": "every secret the vault holds, sealed to its own key and to the operator key"
|
|
}
|
|
],
|
|
"consumers": {
|
|
"secret": {
|
|
"class": "valuable",
|
|
"in": "ledger",
|
|
"why": "a secret given to a consumer is kept nowhere else in the clear"
|
|
}
|
|
}
|
|
},
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-vault",
|
|
"runtime-health": {
|
|
"kind": "tool",
|
|
"tool": "vault_health",
|
|
"interval": "60s",
|
|
"timeout": "10s",
|
|
"looks": 2,
|
|
"grace": "60s"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-vault",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-vault"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-vault",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "grants",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-vault",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "ledger",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-vault",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "root",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-vault",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "store",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-vault",
|
|
"unknown": "program"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-vault",
|
|
"binary": "mesh-vault",
|
|
"loads": [
|
|
"mesh-vault"
|
|
],
|
|
"env": {
|
|
"MESH_RECEIVES": "${dir:grants}/mesh.json",
|
|
"MESH_VAULT_LEDGER": "${dir:ledger}",
|
|
"MESH_VAULT_ROOT": "${dir:root}",
|
|
"MESH_VAULT_STORE": "${dir:store}",
|
|
"MESH_VAULT_STATE": "${dir:state}",
|
|
"MESH_VAULT_SECRET_ASK_CALLERS": "node-tools",
|
|
"MESH_VAULT_ENROLMENT_CALLERS": "mesh-enrolment"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"tools": [
|
|
"secret_export",
|
|
"secret_holders",
|
|
"secret_verify",
|
|
"secret_handed",
|
|
"secret_own",
|
|
"account_hash",
|
|
"account_adopt",
|
|
"account_retire",
|
|
"secret_asks",
|
|
"secret_vault_export",
|
|
"provisioner_retirement",
|
|
"provisioner_retire_approve",
|
|
"provisioner_retire_reject",
|
|
"provisioner_delete",
|
|
"vault_status",
|
|
"vault_health",
|
|
"own_drift",
|
|
"own_take_switch",
|
|
"vault_signers",
|
|
"vault_signed",
|
|
"signers_reassert",
|
|
"node_logins"
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "mesh-vault",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"get",
|
|
"accept",
|
|
"secret-ask",
|
|
"issued",
|
|
"rotate",
|
|
"move-in",
|
|
"node-key",
|
|
"move-asks",
|
|
"own",
|
|
"issue-account",
|
|
"sign",
|
|
"enrolment-token",
|
|
"node-account",
|
|
"rotate-node",
|
|
"node-account-confirm",
|
|
"abandon"
|
|
]
|
|
}
|
|
]
|
|
}
|