Documentation ¶
Overview ¶
Package keystores contains logic for loading encryption keys from a keystores
Index ¶
Constants ¶
View Source
const LocalKeyStore = "local"
LocalKeyStore is the config value for an on-disk key store
Variables ¶
View Source
var ErrUnknownKeyID = errors.New("unknown key id")
ErrUnknownKeyID is returned when the Key ID cannot be found by the keystore.
Functions ¶
This section is empty.
Types ¶
type KeyStore ¶
type KeyStore interface { // GetKey retrieves the key for the specified algorithm by key ID. GetKey(id string) ([]byte, error) }
KeyStore represents a struct which stores or can fetch encryption keys.
func NewKeyStoreFromConfig ¶
func NewKeyStoreFromConfig(config serverconfig.CryptoConfig) (KeyStore, error)
NewKeyStoreFromConfig creates an instance of a KeyStore based on the AuthConfig in Minder. Since our only implementation is based on reading from the local disk, do all key loading during construction of the struct.
func NewKeyStoreFromMap ¶
NewKeyStoreFromMap constructs a keystore from a map of key ID to key bytes. This is mostly useful for testing.
Click to show internal directories.
Click to hide internal directories.