Documentation ¶
Index ¶
- Constants
- func AddEncryptedStateStore(storeName string, keys ComponentEncryptionKeys) bool
- func EncryptedStateStore(storeName string) bool
- func TryDecryptValue(storeName string, value []byte) ([]byte, error)
- func TryEncryptValue(storeName string, value []byte) ([]byte, error)
- type Algorithm
- type ComponentEncryptionKeys
- type Key
Constants ¶
const (
AES256Algorithm = "AES256"
)
Variables ¶
This section is empty.
Functions ¶
func AddEncryptedStateStore ¶
func AddEncryptedStateStore(storeName string, keys ComponentEncryptionKeys) bool
AddEncryptedStateStore adds an encrypted state store and an associated encryption key to a list.
func EncryptedStateStore ¶
EncryptedStateStore returns a bool that indicates if a state stores supports encryption.
func TryDecryptValue ¶
TryDecryptValue will try to decrypt a byte array if the state store has associated encryption keys. If no encryption keys exist, the function will return the bytes unmodified.
func TryEncryptValue ¶
TryEncryptValue will try to encrypt a byte array if the state store has associated encryption keys. The function will append the name of the key to the value for later extraction. If no encryption keys exist, the function will return the bytes unmodified.
Types ¶
type ComponentEncryptionKeys ¶
ComponentEncryptionKeys holds the encryption keys set for a component.
func ComponentEncryptionKey ¶
func ComponentEncryptionKey(component v1alpha1.Component, secretStore secretstores.SecretStore) (ComponentEncryptionKeys, error)
ComponentEncryptionKey checks if a component definition contains an encryption key and extracts it using the supplied secret store.