Documentation
¶
Overview ¶
Package keyring seals secret bytes before they are persisted — per-session holder private keys, per-principal root signing keys, and vendor credentials — so raw secrets never land in the database. It is the port through which the broker turns an in-memory ed25519 key into opaque bytes for the Store and back again. The default implementation is AES-256-GCM under a master key; the same Sealer interface is satisfied by a KMS-backed implementation later, with zero call-site changes.
The master key is loaded from DELEGENT_MASTER_KEY (base64 of 32 bytes). For local development, an unset key falls back to a fixed dev key with a loud warning — never rely on that in production, where the master key belongs in KMS or a secret manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDev ¶
IsDev reports whether key is the built-in dev fallback. The gateway refuses to run with it while agent-key auth is on — a public master key would let anyone unseal every stored credential and session key.
Types ¶
type Sealer ¶
type Sealer interface {
Seal(plaintext []byte) ([]byte, error)
Unseal(sealed []byte) ([]byte, error)
}
Sealer seals and unseals secret bytes. Seal output is opaque and self-describing (it carries its own nonce); Unseal fails closed on any tampering.
func NewAESSealer ¶
NewAESSealer builds a Sealer from a 32-byte key.