Documentation
¶
Overview ¶
Package keys owns the encrypted master copies of gateway signing keys. Deployments reuse Current; Rotate starts an overlap, and Retire ends it only after the operator has confirmed the replacement is in use.
Index ¶
- Variables
- type Info
- type KeyInfo
- type SigningKey
- type Store
- func (s *Store) Current(ctx context.Context, caller string) (SigningKey, error)
- func (s *Store) Ensure(ctx context.Context, caller string) (SigningKey, error)
- func (s *Store) EnsureAll(ctx context.Context) ([]SigningKey, error)
- func (s *Store) ExternalVerification(ctx context.Context) ([]VerificationKey, error)
- func (s *Store) GoString() string
- func (s *Store) Info(ctx context.Context, caller string) (Info, error)
- func (s *Store) InternalVerification(ctx context.Context, callers []string) ([]VerificationKey, error)
- func (s *Store) Retire(ctx context.Context, caller, keyID string) error
- func (s *Store) Rotate(ctx context.Context, caller string) (SigningKey, error)
- func (*Store) String() string
- type VerificationKey
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidCaller = errors.New("unregistered gateway caller") ErrKeyNotFound = errors.New("gateway key is not provisioned") ErrInvalidKeyring = errors.New("invalid encrypted gateway keyring") ErrRotationPending = errors.New("previous gateway key must be retired before another rotation") ErrActiveKey = errors.New("cannot retire the current signing key") )
Functions ¶
This section is empty.
Types ¶
type SigningKey ¶
type SigningKey struct {
Caller string `json:"caller"`
KeyID string `json:"key_id"`
// contains filtered or unexported fields
}
SigningKey deliberately omits the secret from formatting and JSON. Exporters must explicitly request Credentials and write its Secret to a private file.
func (SigningKey) Credentials ¶
func (k SigningKey) Credentials() gatewayauth.Credentials
func (SigningKey) GoString ¶
func (k SigningKey) GoString() string
func (SigningKey) String ¶
func (k SigningKey) String() string
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) EnsureAll ¶
func (s *Store) EnsureAll(ctx context.Context) ([]SigningKey, error)
EnsureAll provisions the catalog's callers and all registered host gateway identities in one transaction. Existing material is never regenerated.
func (*Store) ExternalVerification ¶
func (s *Store) ExternalVerification(ctx context.Context) ([]VerificationKey, error)
func (*Store) InternalVerification ¶
func (s *Store) InternalVerification(ctx context.Context, callers []string) ([]VerificationKey, error)
InternalVerification never accepts external principals. The caller list must come from the target host's compiled ACL, not all callers in the fleet.
type VerificationKey ¶
type VerificationKey struct {
Caller string `json:"caller"`
KeyID string `json:"key_id"`
Secret []byte `json:"-"`
}
VerificationKey carries material only to snapshot/Access exporters. Both current and retiring keys remain valid until explicit retirement.
func (VerificationKey) GoString ¶
func (k VerificationKey) GoString() string
func (VerificationKey) String ¶
func (k VerificationKey) String() string