localkms

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 13 Imported by: 54

Documentation

Index

Constants

View Source
const (
	// Namespace is the keystore's DB storage namespace
	Namespace = "kmsdb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalKMS

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

LocalKMS implements kms.KeyManager to provide key management capabilities using a local db. It uses an underlying secret lock service (default local secretLock) to wrap (encrypt) keys prior to storing them.

func New

func New(masterKeyURI string, p kms.Provider) (*LocalKMS, error)

New will create a new (local) KMS service

func (*LocalKMS) Create

func (l *LocalKMS) Create(kt string) (string, interface{}, error)

Create a new key/keyset for key type kt, store it and return its stored ID and key handle

func (*LocalKMS) Get

func (l *LocalKMS) Get(keyID string) (interface{}, error)

Get key handle for the given keyID

func (*LocalKMS) Rotate

func (l *LocalKMS) Rotate(kt, keyID string) (string, interface{}, error)

Rotate a key referenced by keyID and return its updated handle

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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