cutoff

package
v0.0.43 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cutoffs

type Cutoffs interface {
	// ShouldRotate Return true if the key created at the given timestamp should be rotated
	ShouldRotate(createdAt time.Time) bool
	// ShouldDisable Return true if the key rotated at the given timestamp should be disabled
	ShouldDisable(rotatedAt time.Time) bool
	// SafeToDisable Return true if the key rotated at the given timestamp is safe to disable
	SafeToDisable(lastAuthTime time.Time) bool
	// ShouldDelete Return true if the key disabled at the given timestamp should be deleted
	ShouldDelete(disabledAt time.Time) bool
	// RotateAfterDays Number of days to wait to rotate a key after issuing it (the basis for ShouldRotate)
	RotateAfterDays() int
	// DisableAfterDays Number of days to wait to disable a key before rotating it (the basis for ShouldDisable)
	DisableAfterDays() int
	// DeleteAfterDays Number of days to wait to delete a key before rotating it (the basis for ShouldDelete)
	DeleteAfterDays() int
}

Cutoffs is responsible for determining when a service account key should be rotated, disabled, or deleted

func New

func New[Y apiv1b1.YaleCRD](yaleCRDs []Y) Cutoffs

func NewWithDefaults added in v0.0.28

func NewWithDefaults() Cutoffs

Jump to

Keyboard shortcuts

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