Documentation ¶
Index ¶
- type AliasMgr
- type CertKeyPair
- func (kp *CertKeyPair) EnsureSecretManager(ctx context.Context, sm secretsmanager.SecretManager, ...) error
- func (kp *CertKeyPair) Generate() error
- func (kp *CertKeyPair) InSecret(secObject *corev1.Secret) bool
- func (kp *CertKeyPair) IsEmpty() bool
- func (kp *CertKeyPair) LoadFromData(data map[string][]byte)
- func (kp *CertKeyPair) LoadReferenceData(data map[string][]byte) error
- func (kp *CertKeyPair) LoadSecretFromManager(ctx context.Context, sm secretsmanager.SecretManager, ...) error
- func (kp *CertKeyPair) References() ([]string, []string)
- func (kp *CertKeyPair) ToKubernetes(secObject *corev1.Secret)
- type Certificate
- type GenConfig
- type KeyMgr
- type KeyTool
- func (kt *KeyTool) EnsureSecretManager(ctx context.Context, sm secretsmanager.SecretManager, ...) error
- func (kt *KeyTool) Generate() error
- func (kt *KeyTool) InSecret(secObject *corev1.Secret) bool
- func (kt *KeyTool) IsEmpty() bool
- func (kt *KeyTool) LoadFromData(secData map[string][]byte)
- func (kt *KeyTool) LoadReferenceData(data map[string][]byte) error
- func (kt *KeyTool) LoadSecretFromManager(ctx context.Context, sm secretsmanager.SecretManager, ...) error
- func (kt *KeyTool) References() ([]string, []string)
- func (kt *KeyTool) ToKubernetes(secObject *corev1.Secret)
- type KeyToolGenKeyPair
- type KeyToolGenSecKey
- type KeyToolImportCert
- type KeyToolImportKeystore
- type KeyToolImportPassword
- type Literal
- func (literal *Literal) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (literal *Literal) Generate() error
- func (literal *Literal) InSecret(secObject *corev1.Secret) bool
- func (literal *Literal) IsEmpty() bool
- func (literal *Literal) LoadFromData(secData map[string][]byte)
- func (literal *Literal) LoadReferenceData(data map[string][]byte) error
- func (literal *Literal) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (literal *Literal) References() ([]string, []string)
- func (literal *Literal) ToKubernetes(secret *corev1.Secret)
- type Password
- func (pwd *Password) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (pwd *Password) Generate() error
- func (pwd *Password) InSecret(secObject *corev1.Secret) bool
- func (pwd *Password) IsEmpty() bool
- func (pwd *Password) LoadFromData(secData map[string][]byte)
- func (pwd *Password) LoadReferenceData(data map[string][]byte) error
- func (pwd *Password) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (pwd *Password) References() ([]string, []string)
- func (pwd *Password) ToKubernetes(secret *corev1.Secret)
- type SSH
- func (ssh *SSH) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (ssh *SSH) Generate() error
- func (ssh *SSH) InSecret(secObject *corev1.Secret) bool
- func (ssh *SSH) IsEmpty() bool
- func (ssh *SSH) LoadFromData(secData map[string][]byte)
- func (ssh *SSH) LoadReferenceData(data map[string][]byte) error
- func (ssh *SSH) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (ssh *SSH) References() ([]string, []string)
- func (ssh *SSH) ToKubernetes(secret *corev1.Secret)
- type TrustStore
- func (ts *TrustStore) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (ts *TrustStore) Generate() error
- func (ts *TrustStore) InSecret(secObject *corev1.Secret) bool
- func (ts *TrustStore) IsEmpty() bool
- func (ts *TrustStore) LoadFromData(secData map[string][]byte)
- func (ts *TrustStore) LoadReferenceData(data map[string][]byte) error
- func (ts *TrustStore) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, ...) error
- func (ts *TrustStore) References() ([]string, []string)
- func (ts *TrustStore) ToKubernetes(secObject *corev1.Secret)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasMgr ¶
type AliasMgr interface { References() ([]string, []string) LoadReferenceData(data map[string][]byte) error Generate(baseDir string, baseCmd cmdRunner) error }
AliasMgr an interface for managing keytool aliases
type CertKeyPair ¶
type CertKeyPair struct { Name string RootCA *CertKeyPair Cert *Certificate V1Spec *v1alpha1.KeySpec // contains filtered or unexported fields }
CertKeyPair Private/Public certificates which optionally can be signed by a RootCA
func NewCertKeyPair ¶
func NewCertKeyPair(keyConfig *v1alpha1.KeyConfig) (*CertKeyPair, error)
NewCertKeyPair creates new CertKeyPair type for reconciliation
func NewRootCA ¶
func NewRootCA(keyConfig *v1alpha1.KeyConfig) *CertKeyPair
NewRootCA create a cert that is a root signing CA
func (*CertKeyPair) EnsureSecretManager ¶
func (kp *CertKeyPair) EnsureSecretManager(ctx context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager populates secrete manager from RootCA data
func (*CertKeyPair) InSecret ¶
func (kp *CertKeyPair) InSecret(secObject *corev1.Secret) bool
InSecret return true if the key is one found in the secret
func (*CertKeyPair) IsEmpty ¶
func (kp *CertKeyPair) IsEmpty() bool
IsEmpty checks if CertKeyPair has any useable
func (*CertKeyPair) LoadFromData ¶
func (kp *CertKeyPair) LoadFromData(data map[string][]byte)
LoadFromData load data from kubernetes secret
func (*CertKeyPair) LoadReferenceData ¶
func (kp *CertKeyPair) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads references from data
func (*CertKeyPair) LoadSecretFromManager ¶
func (kp *CertKeyPair) LoadSecretFromManager(ctx context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager populates RootCA data from secret manager
func (*CertKeyPair) References ¶
func (kp *CertKeyPair) References() ([]string, []string)
References return names of secrets that should be looked up
func (*CertKeyPair) ToKubernetes ¶
func (kp *CertKeyPair) ToKubernetes(secObject *corev1.Secret)
ToKubernetes serializes CertKeyPair to kubernetes object
type Certificate ¶
type Certificate struct { Cert *x509.Certificate CertPEM []byte PrivateKeyEC *ecdsa.PrivateKey PrivateKeyRSA *rsa.PrivateKey PrivateKeyPEM []byte }
Certificate represents a certificate and its private key
type GenConfig ¶ added in v1.0.1
type GenConfig struct { SecObject *corev1.Secret Log logr.Logger Namespace string AppConfig *v1alpha1.AppConfig KeysToGen []*v1alpha1.KeyConfig Client client.Client SecretManager secretsmanager.SecretManager }
GenConfig container for runtime secret object generation
type KeyMgr ¶
type KeyMgr interface { References() ([]string, []string) LoadReferenceData(data map[string][]byte) error LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error Generate() error LoadFromData(secData map[string][]byte) IsEmpty() bool ToKubernetes(secObject *corev1.Secret) InSecret(secObject *corev1.Secret) bool }
KeyMgr an interface for managing secret data
type KeyTool ¶
type KeyTool struct { Name string V1Spec *v1alpha1.KeySpec // contains filtered or unexported fields }
KeyTool an object for managing keytool aliases.
func NewKeyTool ¶
NewKeyTool creates new keytool instance
func (*KeyTool) EnsureSecretManager ¶
func (kt *KeyTool) EnsureSecretManager(ctx context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager adds keytool to secret manager
func (*KeyTool) LoadFromData ¶
LoadFromData keystore from from bytes
func (*KeyTool) LoadReferenceData ¶
LoadReferenceData load all alias reference data
func (*KeyTool) LoadSecretFromManager ¶
func (kt *KeyTool) LoadSecretFromManager(ctx context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager populates keytool data from secret manager
func (*KeyTool) References ¶
References all names the ids of references required for generation
func (*KeyTool) ToKubernetes ¶
ToKubernetes serializes data to kubernetes secret
type KeyToolGenKeyPair ¶
type KeyToolGenKeyPair struct {
// contains filtered or unexported fields
}
KeyToolGenKeyPair alias password manager
func NewKeyToolGenKeyPair ¶
func NewKeyToolGenKeyPair(alias *v1alpha1.KeytoolAliasConfig) *KeyToolGenKeyPair
NewKeyToolGenKeyPair create a new password alias manager
func (*KeyToolGenKeyPair) Generate ¶
func (kp *KeyToolGenKeyPair) Generate(baseDir string, baseCmd cmdRunner) error
Generate creates keytool password alias entry
func (*KeyToolGenKeyPair) LoadReferenceData ¶
func (kp *KeyToolGenKeyPair) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads data from references
func (*KeyToolGenKeyPair) References ¶
func (kp *KeyToolGenKeyPair) References() ([]string, []string)
References get list of refences needed for generated a alias
type KeyToolGenSecKey ¶
type KeyToolGenSecKey struct {
// contains filtered or unexported fields
}
KeyToolGenSecKey alias password manager
func NewKeyToolGenSecKey ¶
func NewKeyToolGenSecKey(alias *v1alpha1.KeytoolAliasConfig) *KeyToolGenSecKey
NewKeyToolGenSecKey create a new password alias manager
func (*KeyToolGenSecKey) Generate ¶
func (kp *KeyToolGenSecKey) Generate(baseDir string, baseCmd cmdRunner) error
Generate creates keytool password alias entry
func (*KeyToolGenSecKey) LoadReferenceData ¶
func (kp *KeyToolGenSecKey) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads data from references
func (*KeyToolGenSecKey) References ¶
func (kp *KeyToolGenSecKey) References() ([]string, []string)
References get list of refences needed for generated a alias
type KeyToolImportCert ¶
type KeyToolImportCert struct {
// contains filtered or unexported fields
}
KeyToolImportCert alias manager
func NewKeyToolImportCert ¶
func NewKeyToolImportCert(alias *v1alpha1.KeytoolAliasConfig) *KeyToolImportCert
NewKeyToolImportCert created new
func (*KeyToolImportCert) Generate ¶
func (k *KeyToolImportCert) Generate(baseDir string, baseCmd cmdRunner) error
Generate creates keytool certificate with its CA alias entry
func (*KeyToolImportCert) LoadReferenceData ¶
func (k *KeyToolImportCert) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads data from references
func (*KeyToolImportCert) References ¶
func (k *KeyToolImportCert) References() ([]string, []string)
References get list of refences needed for generated a alias
type KeyToolImportKeystore ¶
type KeyToolImportKeystore struct {
// contains filtered or unexported fields
}
KeyToolImportKeystore alias manager
func NewKeyToolImportKeystore ¶
func NewKeyToolImportKeystore(alias *v1alpha1.KeytoolAliasConfig) *KeyToolImportKeystore
NewKeyToolImportKeystore created new
func (*KeyToolImportKeystore) Generate ¶
func (k *KeyToolImportKeystore) Generate(baseDir string, baseCmd cmdRunner) error
Generate creates keytool password alias entry
func (*KeyToolImportKeystore) LoadReferenceData ¶
func (k *KeyToolImportKeystore) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads data from references
func (*KeyToolImportKeystore) References ¶
func (k *KeyToolImportKeystore) References() ([]string, []string)
References get list of refences needed for generated a alias
type KeyToolImportPassword ¶
type KeyToolImportPassword struct {
// contains filtered or unexported fields
}
KeyToolImportPassword alias password manager
func NewKeyToolImportPassword ¶
func NewKeyToolImportPassword(alias *v1alpha1.KeytoolAliasConfig) *KeyToolImportPassword
NewKeyToolImportPassword create a new password alias manager
func (*KeyToolImportPassword) Generate ¶
func (kp *KeyToolImportPassword) Generate(baseDir string, baseCmd cmdRunner) error
Generate creates keytool password alias entry
func (*KeyToolImportPassword) LoadReferenceData ¶
func (kp *KeyToolImportPassword) LoadReferenceData(data map[string][]byte) error
LoadReferenceData loads data from references
func (*KeyToolImportPassword) References ¶
func (kp *KeyToolImportPassword) References() ([]string, []string)
References get list of refences needed for generated a alias
type Literal ¶
Literal randomly generated of specified length
func NewLiteral ¶
NewLiteral creates new Literal type for reconciliation
func (*Literal) EnsureSecretManager ¶
func (literal *Literal) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager populates secrets manager from Literal data
func (*Literal) LoadFromData ¶
LoadFromData loads data from kubernetes secret
func (*Literal) LoadReferenceData ¶
LoadReferenceData loads references from data
func (*Literal) LoadSecretFromManager ¶
func (literal *Literal) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager populates Literal data from secret manager
func (*Literal) References ¶
References return names of secrets that should be looked up
func (*Literal) ToKubernetes ¶
ToKubernetes "marshals" object to kubernetes object
type Password ¶
Password randomly generated of specified length
func NewPassword ¶
NewPassword creates new Password type for reconciliation
func (*Password) EnsureSecretManager ¶
func (pwd *Password) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager populates secrets manager from Password data
func (*Password) LoadFromData ¶
LoadFromData loads data from kubernetes secret
func (*Password) LoadReferenceData ¶
LoadReferenceData loads references from data
func (*Password) LoadSecretFromManager ¶
func (pwd *Password) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager populates Password data from secret manager
func (*Password) References ¶
References return names of secrets that should be looked up
func (*Password) ToKubernetes ¶
ToKubernetes "marshals" object to kubernetes object
type SSH ¶
type SSH struct { Name string PrivateKeyRSA *rsa.PrivateKey PrivateKeyPEM []byte PublicKeyPEM []byte }
SSH randomly generated of specified length
func (*SSH) EnsureSecretManager ¶
func (ssh *SSH) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager populates secrets manager from SSH data
func (*SSH) LoadFromData ¶
LoadFromData loads data from kubernetes secret
func (*SSH) LoadReferenceData ¶
LoadReferenceData loads references from data
func (*SSH) LoadSecretFromManager ¶
func (ssh *SSH) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager populates SSH data from secret manager
func (*SSH) References ¶
References return names of secrets that should be looked up
func (*SSH) ToKubernetes ¶
ToKubernetes "marshals" object to kubernetes object
type TrustStore ¶
type TrustStore struct { Name string V1Spec *v1alpha1.KeySpec Value []byte // contains filtered or unexported fields }
TrustStore a KeyMgr for managing truststores
func NewTrustStore ¶
func NewTrustStore(key *v1alpha1.KeyConfig) *TrustStore
NewTrustStore create an new trust store object
func (*TrustStore) EnsureSecretManager ¶
func (ts *TrustStore) EnsureSecretManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
EnsureSecretManager adds to secret manager
func (*TrustStore) Generate ¶
func (ts *TrustStore) Generate() error
Generate and all of its aliases
func (*TrustStore) InSecret ¶
func (ts *TrustStore) InSecret(secObject *corev1.Secret) bool
InSecret return true if the key is one found in the secret
func (*TrustStore) LoadFromData ¶
func (ts *TrustStore) LoadFromData(secData map[string][]byte)
LoadFromData from from bytes
func (*TrustStore) LoadReferenceData ¶
func (ts *TrustStore) LoadReferenceData(data map[string][]byte) error
LoadReferenceData load all alias reference data
func (*TrustStore) LoadSecretFromManager ¶
func (ts *TrustStore) LoadSecretFromManager(context context.Context, sm secretsmanager.SecretManager, secretManagerKeyNamespace string) error
LoadSecretFromManager load from secret manager
func (*TrustStore) References ¶
func (ts *TrustStore) References() ([]string, []string)
References all names the ids of references required for generation
func (*TrustStore) ToKubernetes ¶
func (ts *TrustStore) ToKubernetes(secObject *corev1.Secret)
ToKubernetes serializes data to kubernetes secret