diff --git a/go/catalogue/seats.go b/go/catalogue/seats.go index 805d0be..312c3b0 100644 --- a/go/catalogue/seats.go +++ b/go/catalogue/seats.go @@ -209,6 +209,16 @@ var defaultSeats = append([]Seat{ "first or changed key is recorded and the machine's core secrets are said changed; the same key " + "again changes nothing.", Input: schema(map[string]string{"key": "the machine's sealing key, a raw X25519 public key in base64"}, nil)}, + // A machine's node-engine composes its own modules and asks their secrets sealed to its key (novox/hq ADR 0547 + // §2, ADR 0550 §5, issue 1126); granted as buscompose's Principal.AsksItsOwnSecrets says. + {Name: "own", Optional: true, Description: "Answer the node-engine of one machine, about its own machine " + + "alone (as the bus proved the caller, never an argument), its modules' own secrets and the pair " + + "credentials it consumes or provides that it names, each sealed to the key it stated with node-key. A " + + "credential the vault does not hold is named missing; never a value in the clear.", + Input: map[string]any{"type": "object", "properties": map[string]any{"credentials": map[string]any{ + "type": "array", "items": map[string]any{"type": "object"}, + "description": "the pair credentials the machine's composition reads, each {role: consumer|provider, " + + "provision, consumer, consumer_module, provider, local}"}}}}, {Name: "move-asks", Optional: true, Description: "Copy rows of the controller's record of asks at a desk " + "into the vault's, as they are and once, from the controller alone. No value is in any of them.", Input: map[string]any{"type": "object", "properties": map[string]any{"asks": map[string]any{ diff --git a/go/catalogue/vault_seat_test.go b/go/catalogue/vault_seat_test.go index ed7c3c1..77630ee 100644 --- a/go/catalogue/vault_seat_test.go +++ b/go/catalogue/vault_seat_test.go @@ -121,6 +121,8 @@ func TestTheVaultsSeatPromisesTheMove(t *testing.T) { "move-in": {"node", "module", "name", "provider", "provision", "consumer", "consumer_module", "local", "origin", "generation", "made_at", "call", "sealed", "read_back_to"}, "move-asks": {"asks"}, + // And own (issue 1126): a machine's node-engine asks its own machine's secrets, sealed to its stated key. + "own": {"credentials"}, } for name, args := range want { var verb *Verb @@ -148,7 +150,7 @@ func TestTheVaultsSeatPromisesTheMove(t *testing.T) { } serving := Manifest{Module: "mesh-vault", Provides: []Offer{{Name: "secret", Scope: ScopeMesh}}, Claims: []Claim{{Name: "mesh-vault", Scope: ScopeMesh, - Serves: []string{"get", "accept", "secret-ask", "issued", "rotate", "move-in", "move-asks"}}}} + Serves: []string{"get", "accept", "secret-ask", "issued", "rotate", "move-in", "node-key", "move-asks", "own"}}}} if err := CanHold(serving, seat); err != nil { t.Fatalf("the vault serving the move was refused: %v", err) }