providers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchKey = errors.New("no such key")
)

Functions

This section is empty.

Types

type Native

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

func NewNative

func NewNative(path string) (n *Native, err error)

func (*Native) Close

func (km *Native) Close() (err error)

Close the key manager

func (*Native) Decrypt

func (n *Native) Decrypt(ctx context.Context, req *k8s.DecryptRequest) (resp *k8s.DecryptResponse, err error)

func (*Native) Encrypt

func (n *Native) Encrypt(ctx context.Context, req *k8s.EncryptRequest) (resp *k8s.EncryptResponse, err error)

func (*Native) Generate

func (km *Native) Generate(identity string, alg jose.Alg) (key gose.AuthenticatedEncryptionKey, err error)

Generate an AEK

func (*Native) GenerateDEK

func (n *Native) GenerateDEK(ctx context.Context, request *istio.GenerateDEKRequest) (*istio.GenerateDEKResponse, error)

func (*Native) GenerateSEK

func (n *Native) GenerateSEK(ctx context.Context, request *istio.GenerateSEKRequest) (*istio.GenerateSEKResponse, error)

func (*Native) Identity

func (km *Native) Identity() string

Identity returns the ID of thise KeyManager

func (*Native) Load

func (km *Native) Load(identity string) (key gose.AuthenticatedEncryptionKey, err error)

Load an AEK

func (*Native) LoadDEK

func (n *Native) LoadDEK(ctx context.Context, request *istio.LoadDEKRequest) (*istio.LoadDEKResponse, error)

func (*Native) UnaryInterceptor

func (n *Native) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func (*Native) Version

func (n *Native) Version(ctx context.Context, request *common.VersionRequest) (*common.VersionResponse, error)

type P11

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

func NewP11

func NewP11(keyId string, keyLabel string, config *crypto11.Config, createKey bool) (p *P11, err error)

func (*P11) Close

func (p *P11) Close() (err error)

Close the key manager

func (*P11) Decrypt

func (p *P11) Decrypt(ctx context.Context, req *k8s.DecryptRequest) (resp *k8s.DecryptResponse, err error)

func (*P11) Encrypt

func (p *P11) Encrypt(ctx context.Context, req *k8s.EncryptRequest) (resp *k8s.EncryptResponse, err error)

func (*P11) Generate

func (p *P11) Generate(identity []byte, alg jose.Alg) (key gose.AuthenticatedEncryptionKey, err error)

Generate an AEK

func (*P11) GenerateDEK

func (p *P11) GenerateDEK(ctx context.Context, request *istio.GenerateDEKRequest) (*istio.GenerateDEKResponse, error)

func (*P11) GenerateSEK

func (p *P11) GenerateSEK(ctx context.Context, request *istio.GenerateSEKRequest) (*istio.GenerateSEKResponse, error)

func (*P11) Identity

func (p *P11) Identity() string

Identity of the Key manager

func (*P11) Load

func (p *P11) Load(identity []byte) (key gose.AuthenticatedEncryptionKey, err error)

Load an AEK

func (*P11) LoadDEK

func (p *P11) LoadDEK(ctx context.Context, request *istio.LoadDEKRequest) (*istio.LoadDEKResponse, error)

func (*P11) UnaryInterceptor

func (s *P11) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func (*P11) Version

func (p *P11) Version(ctx context.Context, request *v1.VersionRequest) (*v1.VersionResponse, error)

type Provider

type Provider interface {
	k8s.KeyManagementServiceServer
	istio.KeyManagementServiceServer
	// Ad
	UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
}

Jump to

Keyboard shortcuts

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