backend

package
v2.0.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginBackend

type LoginBackend interface {
}

LoginBackend Interface that will be implemented for various login backends

type Secret

type Secret struct {
	Name   string                 `json:"name"`
	Values map[string]interface{} `json:"values"`
}

Secret is the struct that defines the structure of a secret It consists of a name and map containing key value pairs

type SecretBackend

type SecretBackend interface {
	Init() error
	GetStatus() (bool, error)
	Unseal(shard string) error
	RegisterQuorum(pgpkey string) (string, error)

	GetSecret(dom string, sec string) (Secret, error)
	ListSecret(dom string) ([]string, error)

	CreateSecretDomain(name string) (SecretDomain, error)
	CreateSecret(dom string, sec Secret) error

	DeleteSecretDomain(name string) error
	DeleteSecret(dom string, name string) error
}

SecretBackend interface that will be implemented for various secret backends

func InitSecretBackend

func InitSecretBackend() (SecretBackend, error)

InitSecretBackend returns an interface implementation

type SecretDomain

type SecretDomain struct {
	UUID string `json:"uuid"`
	Name string `json:"name"`
}

SecretDomain is where Secrets are stored. A single domain can have any number of secrets

type Vault

type Vault struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Vault is the main Struct used in Backend to initialize the struct

func (*Vault) CreateSecret

func (v *Vault) CreateSecret(dom string, sec Secret) error

CreateSecret creates a secret mounted on a particular domain name The secret itself is mounted on a path specified by name

func (*Vault) CreateSecretDomain

func (v *Vault) CreateSecretDomain(name string) (SecretDomain, error)

CreateSecretDomain mounts the kv backend on a path with the given name

func (*Vault) DeleteSecret

func (v *Vault) DeleteSecret(dom string, name string) error

DeleteSecret deletes a secret mounted on the path provided

func (*Vault) DeleteSecretDomain

func (v *Vault) DeleteSecretDomain(name string) error

DeleteSecretDomain deletes a secret domain which translates to an unmount operation on the given path in Vault

func (*Vault) GetSecret

func (v *Vault) GetSecret(dom string, name string) (Secret, error)

GetSecret returns a secret mounted on a particular domain name The secret itself is referenced via its name which translates to a mount path in vault

func (*Vault) GetStatus

func (v *Vault) GetStatus() (bool, error)

GetStatus returns the current seal status of vault

func (*Vault) Init

func (v *Vault) Init() error

Init will initialize the vault connection It will also initialize vault if it is not already initialized. The initial policy will also be created

func (*Vault) ListSecret

func (v *Vault) ListSecret(dom string) ([]string, error)

ListSecret returns a list of secret names on a particular domain The values of the secret are not returned

func (*Vault) RegisterQuorum

func (v *Vault) RegisterQuorum(pgpkey string) (string, error)

RegisterQuorum registers the PGP public key for a quorum client We will return a shard to the client that is registering

func (*Vault) Unseal

func (v *Vault) Unseal(shard string) error

Unseal is a passthrough API that allows any unseal or initialization processes for the backend

Jump to

Keyboard shortcuts

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