secrets

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoopSecretManager = Manager{
	Provider: NoopSymmetricProvider,
	OpenPGP:  nil,
}

NoopSecretManager is an empty secret manager

Functions

func NoopSymmetricProvider

func NoopSymmetricProvider(_ string) ([]byte, error)

NoopSymmetricProvider returns an empty provider

Types

type Manager

type Manager struct {
	Provider SymmetricProvider
	OpenPGP  *OpenPGPSecret
}

type OpenPGPSecret

type OpenPGPSecret struct {
	// A private (though not secret) identifier that points to a PGP keyring that this instance of hoard
	// will use to provide PGP grants
	PrivateID string
	File      string
	Data      []byte
}

func OpenPGPFromConfig

func OpenPGPFromConfig(conf *SecretsConfig) *OpenPGPSecret

OpenPGPFromConfig reads a given PGP keyring

type SecretsConfig

type SecretsConfig struct {
	Symmetric []SymmetricSecret
	OpenPGP   *OpenPGPSecret
}

SecretsConfig lists the configured secrets, Symmetric secrets are those local to the running daemon and OpenPGP identifies an entity in the given keyring

type SymmetricProvider

type SymmetricProvider func(secretID string) ([]byte, error)

func ProviderFromConfig

func ProviderFromConfig(conf *SecretsConfig) SymmetricProvider

ProviderFromConfig creates a secret reader from a set of symmetric secrets

type SymmetricSecret

type SymmetricSecret struct {
	// An identifier for this secret that will be stored in the clear with the grant
	PublicID   string
	Passphrase string
}

Jump to

Keyboard shortcuts

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