secrets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Public Key constant for Attestation Secrets.
	PrivateKey = "private"
	// Private Key constant for Attestation Secrets.
	PublicKey = "public"
	// Passphrase constant for Attestation Secrets.
	Passphrase = "passphrase"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher func(namespace string, name string) (*PGPSigningSecret, error)

Fetcher is the function used to fetch kubernetes secret.

type PGPSigningSecret

type PGPSigningSecret struct {
	PgpKey     *PgpKey
	SecretName string
}

PGPSigningSecret represents gpg private/public key pair secret in your kubernetes cluster, where private key was decrypted with the passphrase. The secret expects private and public key to be stored in "private" and "public" keys, and private key to be decrypted with the "passphrase" key e.g. kubectl create secret generic my-secret --from-file=public=pub.gpg \ --from-file=private=priv.key --from-literal=passphrase=<value>

func Fetch

func Fetch(namespace string, name string) (*PGPSigningSecret, error)

Fetch fetches kubernetes secret

type PgpKey

type PgpKey struct {
	// contains filtered or unexported fields
}

PgpKey struct converts the base64 encoded PEM keys into openpgp private and public keys

func NewPgpKey

func NewPgpKey(privateKeyStr string, passphrase string, publicKeyStr string) (*PgpKey, error)

func (*PgpKey) Fingerprint

func (key *PgpKey) Fingerprint() string

func (*PgpKey) PrivateKey

func (key *PgpKey) PrivateKey() *packet.PrivateKey

func (*PgpKey) PublicKey

func (key *PgpKey) PublicKey() *packet.PublicKey

Jump to

Keyboard shortcuts

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