Documentation
¶
Overview ¶
Package cmek holds the seam GCP services use to validate a customer-managed encryption key against Cloud KMS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("crypto key not found") ErrDisabled = errors.New("crypto key has no enabled primary version") ErrPurpose = errors.New("crypto key purpose is not ENCRYPT_DECRYPT") ErrLocation = errors.New("crypto key location does not match") ErrState = errors.New("crypto key is not in a usable state") )
The Err* values are returned by a Checker; callers map them to their service's error.
Functions ¶
func Location ¶
Location returns the location segment of projects/*/locations/*/keyRings/*/cryptoKeys/*.
func VersionName ¶
VersionName returns the primary version of keyName when c can name it, else keyName itself.
Types ¶
type Checker ¶
Checker validates a Cloud KMS crypto key name; a non-empty location must equal the key's location.
type KeyChecker ¶
KeyChecker validates an AWS KMS key reference (key ID, ARN or alias); it returns ErrNotFound, ErrDisabled, ErrState or ErrPurpose when the key cannot encrypt.
type KeyResolver ¶
KeyResolver is implemented by KeyCheckers that can turn a key reference (ID, alias or ARN) into its ARN.