3bd38fd5dc
* OSS portion of wrapper-v2 * Prefetch barrier type to avoid encountering an error in the simple BarrierType() getter * Rename the OveriddenType to WrapperType and use it for the barrier type prefetch * Fix unit test
21 lines
549 B
Go
21 lines
549 B
Go
package keymanager
|
|
|
|
import (
|
|
"context"
|
|
|
|
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
|
|
)
|
|
|
|
const (
|
|
KeyID = "root"
|
|
)
|
|
|
|
type KeyManager interface {
|
|
// Returns a wrapping.Wrapper which can be used to perform key-related operations.
|
|
Wrapper() wrapping.Wrapper
|
|
// RetrievalToken is the material returned which can be used to source back the
|
|
// encryption key. Depending on the implementation, the token can be the
|
|
// encryption key itself or a token/identifier used to exchange the token.
|
|
RetrievalToken(ctx context.Context) ([]byte, error)
|
|
}
|