fakekms

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package fakekms provides a fake implementation of registry.KMSClient.

Normally, a 'keyURI' identifies a key that is stored remotely by the KMS, and every operation is executed remotely using a RPC call to the KMS, since the key should not be sent to the client. In this fake implementation we want to avoid these RPC calls. We achieve this by encoding the key in the 'keyURI'. So the client simply needs to decode the key and generate an AEAD out of it. This is of course insecure and should only be used in testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(uriPrefix string) (registry.KMSClient, error)

NewClient returns a fake KMS client which will handle keys with uriPrefix prefix. keyURI must have the following format: 'fake-kms://<base64 encoded aead keyset>'.

func NewKeyURI

func NewKeyURI() (string, error)

NewKeyURI returns a new, random fake KMS key URI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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