hashicorp

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address        string `yaml:"address"`
	RoleID         string `yaml:"roleID"`
	SecretID       string `yaml:"secretID"`
	TLSCaCert      string `yaml:"tlsCaCert"`
	TLSClientCert  string `yaml:"tlsClientCert"`
	TLSClientKey   string `yaml:"tlsClientKey"`
	*TransitConfig `yaml:"transitConfig"`
}

Config contains Hashcorp Vault backend configuration

type SignOpts

type SignOpts struct {
	Preshashed bool
	Hash       string
}

type Transit

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

func (*Transit) GetKeyWithContext

func (t *Transit) GetKeyWithContext(ctx context.Context, keyID string) (string, error)

func (*Transit) ListKeys

func (t *Transit) ListKeys() ([]string, error)

func (*Transit) Sign

func (t *Transit) Sign(keyName string, input []byte, opts *SignOpts) ([]byte, error)

type TransitConfig

type TransitConfig struct {
	MountPoint string `yaml:"mountPoint"`
}

type Vault

type Vault struct {
	RoleID   string
	SecretID string
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, cfg *Config) (*Vault, error)

New creates new Hashicorp Vault backend

func (*Vault) GetPublicKey

func (v *Vault) GetPublicKey(ctx context.Context, keyID string) (vault.StoredKey, error)

func (*Vault) ListPublicKeys

func (v *Vault) ListPublicKeys(ctx context.Context) vault.StoredKeysIterator

ListPublicKeys returns a list of keys stored under the backend

func (*Vault) Name

func (v *Vault) Name() string

Name returns backend name

func (*Vault) SignMessage

func (v *Vault) SignMessage(ctx context.Context, message []byte, key vault.StoredKey) (crypt.Signature, error)

func (*Vault) Transit

func (v *Vault) Transit() *Transit

Jump to

Keyboard shortcuts

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