kms

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 20 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 {
	StorageProvider           storage.Provider
	CacheProvider             storage.Provider
	KeyManagerStorageProvider storage.Provider

	LocalKMS      kms.KeyManager
	CryptoService crypto.Crypto
	HeaderSigner  edv.HeaderSigner

	PrimaryKeyStorageProvider storage.Provider
	PrimaryKeyLock            secretlock.Service
	CreateSecretLockFunc      func(keyURI string, provider lock.Provider) (secretlock.Service, error)

	EDVServerURL    string
	HubAuthURL      string
	HubAuthAPIToken string

	HTTPClient support.HTTPClient
	TLSConfig  *tls.Config
}

Config defines configuration for the KMS service.

type KeystoreData

type KeystoreData struct {
	ID             string          `json:"id"`
	Controller     string          `json:"controller"`
	RecipientKeyID string          `json:"recipientKeyID,omitempty"`
	MACKeyID       string          `json:"macKeyID,omitempty"`
	VaultID        string          `json:"vaultID,omitempty"`
	EDVCapability  json.RawMessage `json:"edvCapability,omitempty"`
	CreatedAt      *time.Time      `json:"createdAt"`
}

KeystoreData represents metadata for Keystore.

type Service

type Service interface {
	CreateKeystore(controller, vaultID string) (*KeystoreData, error)
	ResolveKeystore(req *http.Request) (keystore.Keystore, error)
	GetKeystoreData(keystoreID string) (*KeystoreData, error)
	SaveKeystoreData(data *KeystoreData) error
	crypto.Crypto
}

Service manages key stores data and provides support for crypto operations.

func NewService

func NewService(c *Config) (Service, error)

NewService returns a new Service instance.

Jump to

Keyboard shortcuts

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