Documentation ¶
Index ¶
- Constants
- func NewIBMKpSecretStorage(secretConfig map[string]interface{}) (secrets.Secrets, error)
- func RegisterDriver(name string, ctor DriverCtor) error
- type Driver
- type DriverCtor
- type IBM
- func (i *IBM) Config(config map[string]string, tokenSecretName, namespace string) (map[string]interface{}, error)
- func (*IBM) DeleteContext() map[string]string
- func (*IBM) GetContext() map[string]string
- func (i *IBM) Name() string
- func (i *IBM) Path() string
- func (*IBM) SetContext() map[string]string
- type K8S
- type KMS
- type SingleSecret
- type Vault
- func (*Vault) Config(config map[string]string, tokenSecretName, namespace string) (map[string]interface{}, error)
- func (v *Vault) DeleteContext() map[string]string
- func (v *Vault) GetContext() map[string]string
- func (v *Vault) Name() string
- func (v *Vault) Path() string
- func (v *Vault) SetContext() map[string]string
Constants ¶
const ( // IbmKpSecretStorageName is KMS backend name IbmKpSecretStorageName = "ibmkeyprotect" // IbmServiceAPIKey is the service ID API Key IbmServiceAPIKey = "IBM_KP_SERVICE_API_KEY" // IbmInstanceIDKey is the Key Protect Service's Instance ID IbmInstanceIDKey = "IBM_KP_SERVICE_INSTANCE_ID" // IbmBaseURLKey is the Key Protect Service's Base URL IbmBaseURLKey = "IBM_KP_BASE_URL" // IbmTokenURLKey is the Key Protect Service's Token URL IbmTokenURLKey = "IBM_KP_TOKEN_URL" )
const ( VaultAddr = "VAULT_ADDR" VaultCaCert = "VAULT_CACERT" VaultClientCert = "VAULT_CLIENT_CERT" VaultClientKey = "VAULT_CLIENT_KEY" VaultSkipVerify = "VAULT_SKIP_VERIFY" VaultToken = "VAULT_TOKEN" RootSecretPath = "NOOBAA_ROOT_SECRET_PATH" )
Vault authentication config options
const (
Provider = "KMS_PROVIDER" // backend type configuration key
)
////////////////////////////////////////////////////////////////////////// ///////// KMS provides uniform access to several backend types /////////// //////////////////////////////////////////////////////////////////////////
Variables ¶
This section is empty.
Functions ¶
func NewIBMKpSecretStorage ¶
NewIBMKpSecretStorage is a constructor, returns a new instance of ibmKpSecretStorage
func RegisterDriver ¶
func RegisterDriver(name string, ctor DriverCtor) error
RegisterDriver adds a new KMS driver
Types ¶
type Driver ¶
type Driver interface { Path() string Name() string Config(connectionDetails map[string]string, tokenSecretName, namespace string) (map[string]interface{}, error) GetContext() map[string]string SetContext() map[string]string DeleteContext() map[string]string }
Driver is a backend type specific driver interface for libopenstorage/secrets framework
func NewDriver ¶
NewDriver returns a new instance of KMS driver identified by the supplied driver type.
type DriverCtor ¶
DriverCtor is a Driver constructor function type
type IBM ¶
type IBM struct {
UID string // NooBaa system UID
}
IBM is a NooBaa root master key ibmKpSecretStorage driver
func (*IBM) Config ¶
func (i *IBM) Config(config map[string]string, tokenSecretName, namespace string) (map[string]interface{}, error)
Config returns ibmKpK8sSecret secret config
func (*IBM) DeleteContext ¶
DeleteContext returns context used for secret delete operation
func (*IBM) GetContext ¶
GetContext returns context used for secret get operation
func (*IBM) SetContext ¶
SetContext returns context used for secret set operation
type K8S ¶
type K8S struct {
// contains filtered or unexported fields
}
K8S is a Kubernetes driver
func (*K8S) DeleteContext ¶
DeleteContext returns context used for secret delete operation
func (*K8S) GetContext ¶
GetContext returns context used for secret get operation
func (*K8S) SetContext ¶
SetContext returns context used for secret set operation
type KMS ¶
type KMS struct { secrets.Secrets // secrets interface Type string // backend system type, k8s, vault & ibm are supported // contains filtered or unexported fields }
KMS implements SingleSecret interface using backend implementation of secrets.Secrets interface and using backend type specific driver
type SingleSecret ¶
type SingleSecret interface { // Get secret value from KMS Get() (string, error) // Set secret value in KMS Set(value string) error // Delete secret value from KMS Delete() error }
SingleSecret represents a single secret several backend types are implemented, more types could be added
type Vault ¶
type Vault struct {
UID string // NooBaa system UID
}
Vault is a vault driver
func (*Vault) Config ¶
func (*Vault) Config(config map[string]string, tokenSecretName, namespace string) (map[string]interface{}, error)
Config returns this driver secret config
func (*Vault) DeleteContext ¶
DeleteContext returns context used for secret delete operation
func (*Vault) GetContext ¶
GetContext returns context used for secret get operation
func (*Vault) SetContext ¶
SetContext returns context used for secret set operation