lifecycle

package
v0.0.0-...-17e6b21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyLifecyclePolicy

type KeyLifecyclePolicy struct {
	ID              string
	Name            string
	KeyPattern      string
	MaxAge          time.Duration
	RotationPeriod  time.Duration
	RetentionPeriod time.Duration
	Algorithm       string
	SecurityLevel   string
	AutoRetire      bool
	Metadata        map[string]string
	Transitions     []KeyTransition
}

type KeyState

type KeyState string
const (
	KeyStatePreActive   KeyState = "pre_active"
	KeyStateActive      KeyState = "active"
	KeyStateRotating    KeyState = "rotating"
	KeyStateSuspended   KeyState = "suspended"
	KeyStateDeactivated KeyState = "deactivated"
	KeyStateCompromised KeyState = "compromised"
	KeyStateDestroyed   KeyState = "destroyed"
)

type KeyTransition

type KeyTransition struct {
	FromState KeyState
	ToState   KeyState
	Condition TransitionCondition
	Action    TransitionAction
}

type LifecycleManager

type LifecycleManager struct {
	// contains filtered or unexported fields
}

func NewLifecycleManager

func NewLifecycleManager(
	keyStore *keystore.HSMKeyStore,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *LifecycleManager

func (*LifecycleManager) AddPolicy

func (lm *LifecycleManager) AddPolicy(ctx context.Context, policy *KeyLifecyclePolicy) error

func (*LifecycleManager) EnforcePolicy

func (lm *LifecycleManager) EnforcePolicy(ctx context.Context, keyID string) error

type TransitionAction

type TransitionAction func(context.Context, *keystore.KeyMetadata) error

type TransitionCondition

type TransitionCondition func(context.Context, *keystore.KeyMetadata) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL