Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrBrokerNotConfigured = errors.New("credential broker not configured") ErrEmptyRef = errors.New("credential ref is empty") )
Functions ¶
This section is empty.
Types ¶
type Broker ¶
Broker resolves opaque credential references into usable secret material. Implementations must never leak secret values through returned errors.
type Class ¶ added in v0.4.21
type Class string
Class is the normative BaseHarbor credential ownership class.
func ParseClass ¶ added in v0.4.21
ParseClass validates the public v1 credential taxonomy.
func (Class) IsMachineIdentity ¶ added in v0.4.21
IsMachineIdentity reports whether the class belongs to the isolated BaseHarbor-internal machine identity boundary.
type Data ¶
Data contains resolved secret material for a single operation. Payload and expiry metadata are deliberately excluded from JSON output.
type FilePreparedMaterialStore ¶ added in v0.4.21
type FilePreparedMaterialStore struct {
Dir string
}
func (FilePreparedMaterialStore) Clear ¶ added in v0.4.21
func (s FilePreparedMaterialStore) Clear(key string) error
type FileRotationJournal ¶ added in v0.4.21
type FileRotationJournal struct {
Path string
}
func (FileRotationJournal) Clear ¶ added in v0.4.21
func (j FileRotationJournal) Clear(key string) error
func (FileRotationJournal) Load ¶ added in v0.4.21
func (j FileRotationJournal) Load(key string) (RotationPhase, error)
func (FileRotationJournal) Save ¶ added in v0.4.21
func (j FileRotationJournal) Save(key string, phase RotationPhase) error
type NoopBroker ¶
type NoopBroker struct{}
NoopBroker is the safe default when no secret backend is configured.
type PreparedMaterialStore ¶ added in v0.4.21
type Rotation ¶ added in v0.4.21
type Rotation struct {
Prepare func(context.Context) error
Reconcile func(context.Context) error
Verify func(context.Context) error
Retire func(context.Context) error
Rollback func(context.Context) error
Journal RotationJournal
Prepared PreparedMaterialStore
Key string
}
Rotation performs one non-HA credential/material replacement.
Prepare must make new material usable without retiring the old path. Reconcile moves the managed consumer to the new material. Verify proves readiness/authentication with the new material. Retire runs only after successful verification.
type RotationJournal ¶ added in v0.4.21
type RotationJournal interface {
Load(key string) (RotationPhase, error)
Save(key string, phase RotationPhase) error
Clear(key string) error
}
type RotationPhase ¶ added in v0.4.21
type RotationPhase string
const ( RotationPrepared RotationPhase = "PREPARED" RotationReconciled RotationPhase = "RECONCILED" RotationVerified RotationPhase = "VERIFIED" RotationRetired RotationPhase = "RETIRED" )