vault

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SSHEngineDefaultName Default engine name.
	SSHEngineDefaultName = "ssh-test"
	// SSHEngineDefaultRoleName Default role name.
	SSHEngineDefaultRoleName = "general"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config *api.Config
	Client *api.Client
}

API is main struct of Vault.

func NewAPI

func NewAPI() (API, error)

NewAPI creates AI struct for Vault.

func (API) CreateCACertificate

func (a API) CreateCACertificate(engineName string) error

CreateCACertificate creates CA certificate in ssh engine.

func (API) CreateRole

func (a API) CreateRole(engineName, roleName string) error

CreateRole creates a role in ssh engine.

func (API) EnableSSHEngine

func (a API) EnableSSHEngine(engineName string) error

EnableSSHEngine enables SSH engine with a path.

func (API) GetCACertificate

func (a API) GetCACertificate(engineName string) (string, error)

GetCACertificate gets CA certificate from ssh engine.

func (API) SealStatus

func (a API) SealStatus() (api.SealStatusResponse, error)

SealStatus returns status of seal.

func (API) Sign

func (a API) Sign(engineName, roleName, publicKey string) (string, error)

Sign signs given public key with SSH engine and role.

func (API) Unseal

func (a API) Unseal(shard string) (api.SealStatusResponse, error)

Unseal starts to unseal with given shard.

Jump to

Keyboard shortcuts

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