Skip to content

Commit bedc303

Browse files
committed
Platform KMS (WIP)
1 parent 431e9e5 commit bedc303

File tree

7 files changed

+459
-115
lines changed

7 files changed

+459
-115
lines changed

kms/apiv1/options.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ type KeyManager interface {
1818
Close() error
1919
}
2020

21+
// KeyDeleter is an optional interface for KMS implementations that support
22+
// deleting keys.
23+
//
24+
// # Experimental
25+
//
26+
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
27+
// release.
28+
type KeyDeleter interface {
29+
DeleteKey(req *DeleteKeyRequest) error
30+
}
31+
2132
// SearchableKeyManager is an optional interface for KMS implementations
2233
// that support searching for keys based on certain attributes.
2334
//
@@ -54,6 +65,17 @@ type CertificateChainManager interface {
5465
StoreCertificateChain(req *StoreCertificateChainRequest) error
5566
}
5667

68+
// CertificateDeleter is an optional interface for KMS implementations that
69+
// support deleting certificates.
70+
//
71+
// # Experimental
72+
//
73+
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
74+
// release.
75+
type CertificateDeleter interface {
76+
DeleteCertificate(req *DeleteCertificateRequest) error
77+
}
78+
5779
// NameValidator is an interface that KeyManager can implement to validate a
5880
// given name or URI.
5981
type NameValidator interface {
@@ -151,6 +173,9 @@ const (
151173
TPMKMS Type = "tpmkms"
152174
// MacKMS is the KMS implementation using macOS Keychain and Secure Enclave.
153175
MacKMS Type = "mackms"
176+
// PlatformKMS is the KMS implementation that uses TPMKMS on Windows and
177+
// Linux and MacKMS on macOS..
178+
PlatformKMS Type = "kms"
154179
)
155180

156181
// TypeOf returns the type of of the given uri.

0 commit comments

Comments
 (0)