Give Input what the credential half of the rendering reads: the credentials made for consumers, own secrets held, kept core boxes, the bus's user list and memberships, serving keys and certificates (issue 1364)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package compose
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
@@ -62,6 +63,60 @@ type Input struct {
|
||||
// OperatorExport is every operator-sealed secret in the mesh, for a module that keeps them (inv.OperatorExport): sealed
|
||||
// values the composition carries without opening. Nil when the mesh has no operator key.
|
||||
OperatorExport *catalogue.KeptExport
|
||||
|
||||
// Issued is the credentials made for the consumers of each provider (inv.SecretsFrom): one row for each pair credential
|
||||
// that exists, by the provider node it is for. The grants a provider must create are read from these, so a credential not
|
||||
// made yet has no grant until the send that makes it.
|
||||
Issued []Issued
|
||||
// OwnSecrets is the own secrets held on each machine (the module_secret rows): who made each, and the key it is sealed to.
|
||||
// Their sealed values are optional.
|
||||
OwnSecrets []OwnSecretRow
|
||||
// KeptCoreBoxes is the vault's box last kept for each core credential on each machine (inv.KeptCoreBoxes).
|
||||
KeptCoreBoxes []CoreBox
|
||||
// BusUsers is the bus's user list as the controller composes it from the bus records and the hashes it holds (composeBusUsers),
|
||||
// for the machine that runs the bus: names and hashes, never passwords. Empty when the Input does not carry it, and then
|
||||
// the composition uses a stand-in, named foreseen. BusMissing are the users left out of it for want of a credential.
|
||||
BusUsers string
|
||||
BusMissing []string
|
||||
// BusMinted are the bus users the mesh has minted a password hash for (inv.BusUserHash): `<node>.<module>` for a module and
|
||||
// `provisioner.<node>` for a machine's provisioner client.
|
||||
BusMinted []string
|
||||
// BusMemberships is, by node, the membership sealed to it for the bus the mesh is moving to (inv.BusMemberships).
|
||||
BusMemberships map[string]string
|
||||
// Authority is the mesh's own certificate (identity.EstablishAuthority), public. Optional.
|
||||
Authority string
|
||||
}
|
||||
|
||||
// Issued is one pair credential made for a consumer of a provider (inv.Secret): ForProvider is its copy sealed to the
|
||||
// provider, optional.
|
||||
type Issued struct {
|
||||
Provision string
|
||||
Consumer string
|
||||
ConsumerModule string
|
||||
Local string
|
||||
Provider string
|
||||
ForProvider string
|
||||
}
|
||||
|
||||
// OwnSecretRow is one own secret held on a machine: Origin is `made` (the mesh generated it) or `accepted` (a person gave it),
|
||||
// SealedTo the sealing key it is sealed to, and Sealed its value sealed to that key, optional.
|
||||
type OwnSecretRow struct {
|
||||
Node string
|
||||
Module string
|
||||
Name string
|
||||
Origin string
|
||||
SealedTo string
|
||||
Sealed string
|
||||
}
|
||||
|
||||
// CoreBox is the vault's box for one core credential of one machine, as last kept (inv.CoreBox).
|
||||
type CoreBox struct {
|
||||
Node string
|
||||
Module string
|
||||
Name string
|
||||
Generation int
|
||||
SealedTo string
|
||||
Box json.RawMessage
|
||||
}
|
||||
|
||||
// Node is one node of the mesh and what the composition reads about it.
|
||||
@@ -99,6 +154,10 @@ type Node struct {
|
||||
// its node-engine said any at all, which is not the same as saying none.
|
||||
Networks []catalogue.AttachedNetwork
|
||||
NetworksSaid bool
|
||||
// ServingKey is the key the machine serves with, which a certificate is issued for (identity.ServingKeyOf); empty when it has
|
||||
// never reported one. Certificate is the certificate the mesh issued for its internal name, public and optional.
|
||||
ServingKey string
|
||||
Certificate string
|
||||
// Contract is the contract of its node-engine's newest statement (inv.HealthOf); Stated is whether it ever stated one.
|
||||
Contract int
|
||||
Stated bool
|
||||
|
||||
Reference in New Issue
Block a user