Documentation ¶
Index ¶
- Constants
- type EjsonDecryptor
- func (d *EjsonDecryptor) AddKey(key string) error
- func (d *EjsonDecryptor) Decrypt(data []byte) (content map[string]interface{}, err error)
- func (d *EjsonDecryptor) IsEncrypted(data []byte) (bool, error)
- func (d *EjsonDecryptor) KeysFromSecret(secretName string, namespace string, client *kubernetes.Clientset, ...) (err error)
Constants ¶
View Source
const ( // PublicKeyField is the field name of the public key in the ejson PublicKeyField = "_public_key" // DecryptionEjsonExt is the extension of the file containing an ejson prviate key // file DecryptionEjsonExt = ".key" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EjsonDecryptor ¶
type EjsonDecryptor struct { // Interface decryptor config Config decryptors.DecryptorConfig // contains filtered or unexported fields }
func NewEJSONDecryptor ¶
func NewEJSONDecryptor(config decryptors.DecryptorConfig, keyDirectory string, keys ...string) (*EjsonDecryptor, error)
Initialize a new EJSON Decryptor
func (*EjsonDecryptor) AddKey ¶
func (d *EjsonDecryptor) AddKey(key string) error
func (*EjsonDecryptor) Decrypt ¶
func (d *EjsonDecryptor) Decrypt(data []byte) (content map[string]interface{}, err error)
Read an ejson file Skip decryption still removes the publicKeyField
func (*EjsonDecryptor) IsEncrypted ¶
func (d *EjsonDecryptor) IsEncrypted(data []byte) (bool, error)
func (*EjsonDecryptor) KeysFromSecret ¶
func (d *EjsonDecryptor) KeysFromSecret(secretName string, namespace string, client *kubernetes.Clientset, ctx context.Context) (err error)
Load Keys from Kubernetes Secret Only keys within the secret with the extension .key will be loaded as ejson private keys
Click to show internal directories.
Click to hide internal directories.