Documentation ¶
Overview ¶
Package rotation implements periodic secret rotation.
Index ¶
- Variables
- type Controller
- func (c *Controller) HandleRotateSecrets() http.Handler
- func (c *Controller) HandleRotateTokenSigningKey() http.Handler
- func (c *Controller) HandleRotateVerificationKeys() http.Handler
- func (c *Controller) RotateSecrets(ctx context.Context) error
- func (c *Controller) RotateTokenSigningKey(ctx context.Context) error
- func (c *Controller) RotateVerificationKeys(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var RotationActor database.Auditable = new(rotationActor)
RotationActor is the actor in the database for rotation events.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *config.RotationConfig, db *database.Database, keyManager keys.SigningKeyManager, secretManager secrets.SecretVersionManager, h *render.Renderer) *Controller
func (*Controller) HandleRotateSecrets ¶ added in v0.27.0
func (c *Controller) HandleRotateSecrets() http.Handler
HandleRotateSecrets handles secrets rotation.
func (*Controller) HandleRotateTokenSigningKey ¶ added in v0.27.0
func (c *Controller) HandleRotateTokenSigningKey() http.Handler
HandleRotateTokenSigningKey handles key rotation.
func (*Controller) HandleRotateVerificationKeys ¶ added in v0.27.0
func (c *Controller) HandleRotateVerificationKeys() http.Handler
HandleRotateVerificationKeys handles verification certificate key rotation.
func (*Controller) RotateSecrets ¶ added in v0.27.0
func (c *Controller) RotateSecrets(ctx context.Context) error
RotateSecrets triggers a secret rotation. It does not take out a lock nor does it return an HTTP response. This is primarily used so other functions can perform initials ecrets bootstrapping.
func (*Controller) RotateTokenSigningKey ¶ added in v0.27.0
func (c *Controller) RotateTokenSigningKey(ctx context.Context) error
RotateTokenSigningKey rotates the signing key. It does not acquire a lock.
func (*Controller) RotateVerificationKeys ¶ added in v0.27.0
func (c *Controller) RotateVerificationKeys(ctx context.Context) error
RotateVerificationKeys rotates each realm's verification keys. It does not acquire a database lock.