gszadovszky commented on a change in pull request #615:
URL: https://github.com/apache/parquet-mr/pull/615#discussion_r448244268



##########
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/crypto/keytools/KeyMaterial.java
##########
@@ -28,14 +28,35 @@
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.type.TypeReference;
 
+/**
+ * KeyMaterial class represents the "key material", keeping the information 
that allows readers to recover an encryption key (see 
+ * description of the KeyMetadata class). The keytools package (PARQUET-1373) 
implements the "envelope encryption" pattern, in a 
+ * "single wrapping" or "double wrapping" mode. In the single wrapping mode, 
the key material is generated by encrypting the 
+ * "data encryption key" (DEK) by a "master key". In the double wrapping mode, 
the key material is generated by encrypting the DEK 
+ * by a "key encryption key" (KEK), that in turn is encrypted by a "master 
key".
+ * 
+ * Key material is kept in a flat json object, with the following fields:
+ * 1. "keyMaterialType" - a String, with the type of  key material. In the 
current version, only one value is allowed - "PKMT1" (stands 
+ *     for "parquet key management tools, version 1"). For external key 
material storage, this field is written in both "key metadata" and 
+ *     "key material" jsons. For internal key material storage, this field is 
written only once in the common json.
+ * 2. "isFooterKey" - a boolean. If true, means that the material belongs to a 
file footer key, and keeps additional information (such as

Review comment:
       This (and the other _"boolean"_ members) are not `boolean` values in the 
as per the json spec. (You are writing `"true"` and `"false"` instead of `true` 
and `false`.)
   You may either mention it in the description or try to use a `Map<String, 
Object>` and put `String` or `Boolean` values. I think, `jackson` will write 
proper `boolean` values in this case. I would vote on the latter if it works.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to