secretsencrypt

package
v1.32.0-rc1.0...-68fbd1a Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptionStart             string  = "start"
	EncryptionPrepare           string  = "prepare"
	EncryptionRotate            string  = "rotate"
	EncryptionRotateKeys        string  = "rotate_keys"
	EncryptionReencryptRequest  string  = "reencrypt_request"
	EncryptionReencryptActive   string  = "reencrypt_active"
	EncryptionReencryptFinished string  = "reencrypt_finished"
	SecretListPageSize          int64   = 20
	SecretQPS                   float32 = 200
	SecretBurst                 int     = 200
	SecretsUpdateErrorEvent     string  = "SecretsUpdateError"
	SecretsProgressEvent        string  = "SecretsProgress"
	SecretsUpdateCompleteEvent  string  = "SecretsUpdateComplete"
)

Variables

View Source
var EncryptionHashAnnotation = version.Program + ".io/encryption-config-hash"

Functions

func BootstrapEncryptionHashAnnotation

func BootstrapEncryptionHashAnnotation(node *corev1.Node, runtime *config.ControlRuntime) error

func GenEncryptionConfigHash

func GenEncryptionConfigHash(runtime *config.ControlRuntime) (string, error)

func GenReencryptHash

func GenReencryptHash(runtime *config.ControlRuntime, keyName string) (string, error)

GenReencryptHash generates a sha256 hash from the existing secrets keys and any identity providers plus a new key based on the input arguments.

func GetEncryptionConfigMetrics

func GetEncryptionConfigMetrics(runtime *config.ControlRuntime, initialMetrics bool) (int64, int64, error)

GetEncryptionConfigMetrics fetches the metrics API and returns the last time the encryption config was reloaded and the number of times it has been reloaded.

func GetEncryptionKeys

func GetEncryptionKeys(runtime *config.ControlRuntime, includeIdentity bool) ([]apiserverconfigv1.Key, error)

GetEncryptionKeys returns a list of encryption keys from the current encryption configuration. If includeIdentity is true, it will also include a fake key representing the identity provider, which is used to determine if encryption is enabled/disabled.

func WaitForEncryptionConfigReload

func WaitForEncryptionConfigReload(runtime *config.ControlRuntime, reloadSuccesses, reloadTime int64) error

WaitForEncryptionConfigReload watches the metrics API, polling the latest time the encryption config was reloaded.

func WriteEncryptionConfig

func WriteEncryptionConfig(runtime *config.ControlRuntime, keys []apiserverconfigv1.Key, enable bool) error

func WriteEncryptionHashAnnotation

func WriteEncryptionHashAnnotation(runtime *config.ControlRuntime, node *corev1.Node, skipFile bool, stage string) error

WriteEncryptionHashAnnotation writes the encryption hash to the node annotation and optionally to a file. The file is used to track the last stage of the reencryption process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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