Skip to content

Commit bcb6196

Browse files
juergwcopybara-github
authored andcommitted
Deprecate some KMS client registration functions.
PiperOrigin-RevId: 560729256 Change-Id: I8f5bb983fafb46ec239a0dbab927cc4a801f3578
1 parent 6081eba commit bcb6196

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/google/crypto/tink/integration/awskms/AwsKmsClient.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,14 @@ public Aead getAead(String uri) throws GeneralSecurityException {
189189
*
190190
* <p>If {@code credentialPath} is present, load the credentials from that. Otherwise use the
191191
* default credentials.
192+
*
193+
* @deprecated It is preferable to not register KMS clients. Instead, create the AwsKmsClient
194+
* yourself and call {@link getAead} to get a remote {@code Aead}. Use this {@code Aead} to
195+
* encrypt a keyset for with {@code TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to
196+
* create an envelope {@code Aead} using {@code KmsEnvelopeAead.create}.
192197
*/
193-
public static void register(Optional<String> keyUri, Optional<String> credentialPath)
198+
@Deprecated
199+
/* OSS: public */ static void register(Optional<String> keyUri, Optional<String> credentialPath)
194200
throws GeneralSecurityException {
195201
registerWithAwsKms(keyUri, credentialPath, null);
196202
}

0 commit comments

Comments
 (0)