Documentation ¶
Index ¶
- type APIKey
- type KeyStore
- func (s *KeyStore) Authenticate(ctx context.Context) error
- func (s *KeyStore) Create(ctx context.Context, name string, key key.Key) error
- func (s *KeyStore) Delete(ctx context.Context, name string) error
- func (s *KeyStore) Get(ctx context.Context, name string) (key.Key, error)
- func (s *KeyStore) List(ctx context.Context) (key.Iterator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey string
APIKey is a Fortanix API key for authenticating to a Fortanix SDKMS instance.
type KeyStore ¶
type KeyStore struct { // Endpoint is the Fortanix SDKMS instance endpoint. Endpoint string // GroupID is ID of the Fortanix SDKMS group newly created // keys will belong to. // // Fortanix SDKMS uses groups as collection of (security) objects. // Typically, applications can access some/all objects within groups // the application is assigned to. GroupID string // APIKey is the application's Fortanix SDKMS API key used to authenticate // operations. It is sent on each request as part of the request headers. APIKey APIKey // ErrorLog specifies an optional logger for operational errors. // // If nil, logging is done via the log package's standard logger. ErrorLog *log.Logger // CAPath is an optional path to a CA certificate or directory // containing CA certificates. // // If not empty, the KeyStore will use the specified CAs to // verify the Fortanix SDKMS server certificate. CAPath string // contains filtered or unexported fields }
KeyStore is a key store that persists and fetches cryptographic keys from a Fortanix SDKMS.
func (*KeyStore) Authenticate ¶
Authenticate tries to establish a connection to the Fortanix SDKMS instance and authenticate using the KeyStore's credentials.
func (*KeyStore) Create ¶
Create stors the given key at the Fortanix SDKMS if and only if no entry with the given name exists.
If no such entry exists, Create returns kes.ErrKeyExists.
func (*KeyStore) Delete ¶
Delete deletes the key associated with the given name from the Fortanix SDKMS. It may not return an error if no entry for the given name exists.
func (*KeyStore) Get ¶
Get returns the key associated with the given name.
If there is no such entry, Get returns kes.ErrKeyNotFound.