smaheshwar-pltr commented on code in PR #17984:
URL: https://github.com/apache/iceberg/pull/17984#discussion_r4025273789
##########
core/src/main/java/org/apache/iceberg/encryption/StandardEncryptionManager.java:
##########
@@ -184,11 +184,29 @@ ByteBuffer encryptedByKey(String manifestListKeyID) {
return unwrappedKeyCache().get(encryptedKeyMetadata.encryptedById());
}
+ /**
+ * Encrypts and registers manifest-list key metadata.
+ *
+ * @return the ID of the encrypted metadata
+ * @deprecated since 1.12.0, will be removed in 1.13.0; use {@link
+ * #registerManifestListKeyMetadata(NativeEncryptionKeyMetadata)}
instead.
+ */
+ @Deprecated
public String addManifestListKeyMetadata(NativeEncryptionKeyMetadata
keyMetadata) {
+ return
registerManifestListKeyMetadata(keyMetadata).manifestListKey().keyId();
+ }
+
+ /**
+ * Encrypts and registers manifest-list key metadata.
+ *
+ * @return the encrypted metadata and its wrapping key
+ */
+ public ManifestListEncryptionKeys registerManifestListKeyMetadata(
Review Comment:
I've taken a closer look now at https://github.com/apache/iceberg/pull/17545
and think we can introduce APIs here that @gaborkaszab's implementation can
then use. It also simplifies the future implementations there by having this
method return both encrypted metadata and wrapping keys which'll be useful
beyond manifest lists.
I'm a bit conflicted about making this prematurely but I've gone ahead with
making the renames that should then be used in
https://github.com/apache/iceberg/pull/17545 to avoid the deprecation (+ also
ensure we are still respecting this PR's change when that one merges), LMKWYT!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]