Files
mesh-controller/internal/inventory/migrations/0101-the-cores-credentials-the-vault-sealed.sql
T
mesh-tools 97a2d841c7 Land feature 57's controller work on its release branch
The controller plans config, templates and moved providers' provisions,
hands bus accounts to the vault and judges the new manifest words, on the
feature's SDK and node-engine validator (feature 57, config and provisioning).
2026-10-15 21:27:33 +00:00

19 lines
1.2 KiB
SQL

-- The core's own credentials as the vault sealed them to their machine (novox/hq ADR 0349 §16, issue 755).
--
-- The bus's and the provisioner's credentials travel in their machine's declaration sealed by the vault to that
-- machine, which the controller carries and cannot open. The vault seals each answer afresh, so the box the
-- controller last got is kept here and carried again while the vault's generation and the machine's key are the
-- same: a declaration that changed with every answer would be sent for ever. It is also what a send carries when
-- the vault does not answer, so the machine keeps the file it has. Kept as text, byte for byte as it was carried
-- (jsonb would reorder its keys, and the declaration with them). Sealed to the machine's key: no value.
create table core_box (
node uuid not null references node(id) on delete cascade,
module text not null,
name text not null,
generation integer not null check (generation > 0),
sealed_to text not null,
box text not null,
got_at timestamptz not null default now(),
primary key (node, module, name)
);