unseal

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BarrierKeysPath = "core/hsm/barrier-unseal-keys"
)

Variables

View Source
var (
	ErrSealed = errors.New("operation not permitted, service is still sealed", errors.CodePkgCryptoUnsealSealed)
)

Functions

This section is empty.

Types

type Status

type Status struct {
	TotalShares int
	Threshold   int
	Process     int
	Unsealed    bool
}

func (Status) String

func (s Status) String() string

type Unseal

type Unseal struct {
	Threshold   int
	TotalShares int

	SecurityBarrier vault.SecurityBarrier
	Backend         physical.Backend
	// contains filtered or unexported fields
}

func Get

func Get() *Unseal

func (*Unseal) CheckEngine

func (u *Unseal) CheckEngine(path string) (bool, error)

func (*Unseal) DevMode

func (u *Unseal) DevMode(ctx context.Context) error

func (*Unseal) GetKeyRing

func (u *Unseal) GetKeyRing() *vault.Keyring

func (*Unseal) Init

func (u *Unseal) Init(t int)

func (*Unseal) Keyring

func (u *Unseal) Keyring(ctx context.Context) error

Keyring is getting keyring from database and decrypt it with the master key

func (*Unseal) Mount

func (u *Unseal) Mount(ctx context.Context) (map[string]string, error)

Mount is mounting transit, getting the MountTable from database and decrypt it

func (*Unseal) PostProcess

func (u *Unseal) PostProcess(ctx context.Context, barrierPaths map[string]string) error

func (*Unseal) SetBackend

func (u *Unseal) SetBackend(b physical.Backend)

func (*Unseal) SetDefaultEnginePath

func (u *Unseal) SetDefaultEnginePath(path string)

func (*Unseal) SetMasterKey

func (u *Unseal) SetMasterKey(key []byte)

SetMasterKey is only for testing purpose

func (*Unseal) SetSecurityBarrier

func (u *Unseal) SetSecurityBarrier(b vault.SecurityBarrier)

func (*Unseal) Status

func (u *Unseal) Status() Status

func (*Unseal) Storage

func (u *Unseal) Storage(path string) logical.Storage

func (*Unseal) Unseal

func (u *Unseal) Unseal(ctx context.Context, key string) (bool, error)

First step to start the server

Jump to

Keyboard shortcuts

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