Skip to content

Commit

Permalink
Remove deprecation annotation for KMS client registration.
Browse files Browse the repository at this point in the history
There are some valid use-cases for which we currently don't have a replacement. So it is better to wait with deprecation until we have a replacement.

Also, update the documentation for these functions.

PiperOrigin-RevId: 616759308
Change-Id: I7fa5b59e29bae39aa9310c5170a9f25bec3df6f2
  • Loading branch information
juergw authored and copybara-github committed Mar 18, 2024
1 parent e97ea04 commit de464b6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ public Aead getAead(String uri) throws GeneralSecurityException {
* <p>If {@code credentialPath} is present, load the credentials from that. Otherwise use the
* default credentials.
*
* @deprecated It is preferable to not register KMS clients. Instead, create the AwsKmsClient
* yourself and call {@link getAead} to get a remote {@code Aead}. Use this {@code Aead} to
* encrypt a keyset for with {@code TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to
* create an envelope {@code Aead} using {@code KmsEnvelopeAead.create}.
* <p>In many cases, it is not necessary to register the client. For example, you can create the
* AwsKmsClient yourself and call {@link AwsKmsClient#getAead} to get a remote {@code Aead}. Use
* this {@code Aead} to encrypt a keyset for with {@code
* TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to create an envelope {@code Aead} using
* {@code KmsEnvelopeAead.create}.
*/
@Deprecated
public static void register(Optional<String> keyUri, Optional<String> credentialPath)
throws GeneralSecurityException {
registerWithAwsKms(keyUri, credentialPath, null);
Expand Down

0 comments on commit de464b6

Please sign in to comment.