-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate KMS Registration functions in Golang.
In almost all uses cases, it is easier and less error-prone to directly use the KMS AEAD, instead of registering the KMS client. PiperOrigin-RevId: 558052260 Change-Id: Icd21a905b7fb7adc5a03f9476becd7e20c202a0b
- Loading branch information
1 parent
a1888a7
commit 7e6a197
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,10 @@ func XChaCha20Poly1305KeyTemplate() *tinkpb.KeyTemplate { | |
// remote KEK. | ||
// | ||
// If either uri or dekTemplate contain invalid input, an error is returned. | ||
// | ||
// Deprecated: Instead, call kmsClient.GetAEAD to get a remote AEAD, create | ||
// an envelope AEAD using aead.NewKMSEnvelopeAEAD2. | ||
// There is no need to call registry.RegisterKMSClient anymore. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
juergw
Author
Contributor
|
||
func CreateKMSEnvelopeAEADKeyTemplate(uri string, dekTemplate *tinkpb.KeyTemplate) (*tinkpb.KeyTemplate, error) { | ||
if !isSupporedKMSEnvelopeDEK(dekTemplate.GetTypeUrl()) { | ||
return nil, fmt.Errorf("unsupported DEK key type %s. Only Tink AEAD key types are supported", dekTemplate.GetTypeUrl()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello. Was there a discussion of this change somewhere I can read? I see the benefit of not having the manager, but still appreciate having the remote key URI in the template itself, as it makes sense to me it would be closely tied to a single key. What is the thinking for how to map the KMS key URI to the specific key, now? TIA.