smaheshwar-pltr commented on code in PR #17404:
URL: https://github.com/apache/iceberg/pull/17404#discussion_r3670110840


##########
core/src/main/java/org/apache/iceberg/encryption/StandardEncryptionManager.java:
##########
@@ -209,20 +191,39 @@ ByteBuffer encryptedByKey(String manifestListKeyID) {
     return unwrappedKeyCache().get(encryptedKeyMetadata.encryptedById());
   }
 
-  public String addManifestListKeyMetadata(NativeEncryptionKeyMetadata 
keyMetadata) {
-    String manifestListKeyID = generateKeyId();
-    String keyEncryptionKeyID = keyEncryptionKeyID();
-    String keyEncryptionKeyTimestamp =
-        encryptionKeys.get(keyEncryptionKeyID).properties().get(KEY_TIMESTAMP);
+  /**
+   * Mints a manifest-list key for the given key metadata without storing it. 
The returned {@link
+   * MintedKeys} must be persisted into table metadata by the caller to stay 
decryptable.
+   */
+  public MintedKeys mintManifestListKey(NativeEncryptionKeyMetadata 
keyMetadata) {

Review Comment:
   does this have to be on this class? feels a bit weird and confusing to me to 
have this method here. is there a better design?



-- 
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]

Reply via email to