secretmgr

package
v0.0.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KindLocal for using a local Secret in Kubernetes
	KindLocal = "local"

	// KindGoogleSecretManager for using Google Secret Manager
	KindGoogleSecretManager = "gsm"

	// KindFake for a fake secret manager
	KindFake = "fake"

	// LocalSecret the name of the Kubernetes Secret used to load/store the
	// secrets
	/* #nosec */
	LocalSecret = "jx-boot-secrets"

	// LocalSecretKey the key in the local Secret to store the YAML secrets
	LocalSecretKey = "secrets.yaml"

	// DefaultSecretsYaml the default YAML
	DefaultSecretsYaml = `secrets:
  adminUser:
    username: 
    password: 
  hmacToken: 
  pipelineUser:
    username: 
    token: 
    email:
`
)

Variables

View Source
var (
	// KindValues the kind of secret managers we support
	KindValues = []string{KindGoogleSecretManager, KindLocal}
)

Functions

This section is empty.

Types

type SecretCallback

type SecretCallback func(secretYaml string) (string, error)

type SecretManager

type SecretManager interface {

	// UpsertSecrets inserts or updates the secrets using some kind of storage
	// with the callback taking the current or default secrets, invoking the callback to modify them
	// then storing them in a cloud secret manager, local kubernetes Secret or vault etc.
	UpsertSecrets(callback SecretCallback, defaultYaml string) error

	// Kind returns the kind of the Secret Manager
	Kind() string

	// String returns the string description of the secrets manager
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL