ibm

package
v0.0.0-...-99cf8bb Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

To run UTs

  1. Create a Key Protect Service in the US South region.
  2. Create a Root Key
  3. Get the Service API Key and the Instance ID using the steps describe under pkg/ibm/README.md
$ IBM_SERVICE_API_KEY=<api_key> IBM_INSTANCE_ID=<instance_id> IBM_CUSTOMER_ROOT_KEY=<crk> go test -v .

Documentation

Index

Constants

View Source
const (
	// Name of the secret store
	Name = secrets.TypeIBM
	// IbmServiceApiKey is the service ID API Key
	IbmServiceApiKey = "IBM_SERVICE_API_KEY"
	// IbmInstanceIdKey is the Key Protect Service's Instance ID
	IbmInstanceIdKey = "IBM_INSTANCE_ID"
	// IbmBaseUrlKey is the Key Protect Service's Base URL
	IbmBaseUrlKey = "IBM_BASE_URL"
	// IbmTokenUrlKey is the Key Protect Service's Token URL
	IbmTokenUrlKey = "IBM_TOKEN_URL"
	// IbmCustomerRootKey is the Customer Root Key used for obtaining DEKs
	IbmCustomerRootKey = "IBM_CUSTOMER_ROOT_KEY"
	// IbmKvdbKey is used to setup IBM Key Protect Secret Store with kvdb for persistence.
	IbmKvdbKey = "IBM_KVDB"
)

Variables

View Source
var (
	// ErrIbmServiceApiKeyNotSet is returned when IBM_SERVICE_API_KEY is not set
	ErrIbmServiceApiKeyNotSet = errors.New("IBM_SERVICE_API_KEY not set.")
	// ErrIbmInstanceIdKeyNotSet is returned when IBM_INSTANCE_ID is not set
	ErrIbmInstanceIdKeyNotSet = errors.New("IBM_INSTANCE_ID not set.")
	// ErrCRKNotProvided is returned when Customer Root Key is not provided.
	ErrCRKNotProvided = errors.New("IBM Customer Root Key not provided. Cannot perform Key Protect operations.")
	// ErrInvalidKvdbProvided is returned when an incorrect KVDB implementation is provided for persistence store.
	ErrInvalidKvdbProvided = errors.New("Invalid kvdb provided. IBM Key Protect secret store works in conjuction with a kvdb")
)

Functions

func New

func New(
	secretConfig map[string]interface{},
) (secrets.Secrets, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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