[jira] [Commented] (PARQUET-2148) Enable uniform decryption with plaintext footer

2022-05-18 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538925#comment-17538925
 ] 

ASF GitHub Bot commented on PARQUET-2148:
-

shangxinli merged PR #969:
URL: https://github.com/apache/parquet-mr/pull/969




> Enable uniform decryption with plaintext footer
> ---
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
>  Issue Type: Bug
>  Components: parquet-mr
>Reporter: Gidon Gershinsky
>Assignee: Gidon Gershinsky
>Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode - 
> for no good reason. Column metadata is available, we just need to decrypt and 
> use it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (PARQUET-2148) Enable uniform decryption with plaintext footer

2022-05-18 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538906#comment-17538906
 ] 

ASF GitHub Bot commented on PARQUET-2148:
-

ggershinsky commented on code in PR #969:
URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876028764


##
parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java:
##
@@ -1556,25 +1558,32 @@ public ParquetMetadata fromParquetMetadata(FileMetaData 
parquetMetadata,
   } else {  // Encrypted column
 boolean encryptedWithFooterKey = 
cryptoMetaData.isSetENCRYPTION_WITH_FOOTER_KEY();
 if (encryptedWithFooterKey) { // Column encrypted with footer key
-  if (!encryptedFooter) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key in file with plaintext footer");
+  if (null == fileDecryptor) {
+throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
   }
   if (null == metaData) {
 throw new ParquetCryptoRuntimeException("ColumnMetaData not 
set in Encryption with Footer key");
   }
-  if (null == fileDecryptor) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
-  }
   columnPath = getPath(metaData);
+  if (!encryptedFooter) { // Unencrypted footer. Decrypt full 
column metadata, using footer key

Review Comment:
   this already works ok with encrypted footers; now fixing for plaintext 
footers.





> Enable uniform decryption with plaintext footer
> ---
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
>  Issue Type: Bug
>  Components: parquet-mr
>Reporter: Gidon Gershinsky
>Assignee: Gidon Gershinsky
>Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode - 
> for no good reason. Column metadata is available, we just need to decrypt and 
> use it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (PARQUET-2148) Enable uniform decryption with plaintext footer

2022-05-18 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538900#comment-17538900
 ] 

ASF GitHub Bot commented on PARQUET-2148:
-

ggershinsky commented on code in PR #969:
URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876022965


##
parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java:
##
@@ -1556,25 +1558,32 @@ public ParquetMetadata fromParquetMetadata(FileMetaData 
parquetMetadata,
   } else {  // Encrypted column
 boolean encryptedWithFooterKey = 
cryptoMetaData.isSetENCRYPTION_WITH_FOOTER_KEY();
 if (encryptedWithFooterKey) { // Column encrypted with footer key
-  if (!encryptedFooter) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key in file with plaintext footer");
+  if (null == fileDecryptor) {
+throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
   }
   if (null == metaData) {
 throw new ParquetCryptoRuntimeException("ColumnMetaData not 
set in Encryption with Footer key");
   }
-  if (null == fileDecryptor) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
-  }
   columnPath = getPath(metaData);
+  if (!encryptedFooter) { // Unencrypted footer. Decrypt full 
column metadata, using footer key

Review Comment:
   with uniform encryption, we leverage the "encrypt_with_footer_key" mode in 
parquet-format





> Enable uniform decryption with plaintext footer
> ---
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
>  Issue Type: Bug
>  Components: parquet-mr
>Reporter: Gidon Gershinsky
>Assignee: Gidon Gershinsky
>Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode - 
> for no good reason. Column metadata is available, we just need to decrypt and 
> use it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (PARQUET-2148) Enable uniform decryption with plaintext footer

2022-05-18 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538893#comment-17538893
 ] 

ASF GitHub Bot commented on PARQUET-2148:
-

shangxinli commented on code in PR #969:
URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876012014


##
parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java:
##
@@ -1556,25 +1558,32 @@ public ParquetMetadata fromParquetMetadata(FileMetaData 
parquetMetadata,
   } else {  // Encrypted column
 boolean encryptedWithFooterKey = 
cryptoMetaData.isSetENCRYPTION_WITH_FOOTER_KEY();
 if (encryptedWithFooterKey) { // Column encrypted with footer key
-  if (!encryptedFooter) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key in file with plaintext footer");
+  if (null == fileDecryptor) {
+throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
   }
   if (null == metaData) {
 throw new ParquetCryptoRuntimeException("ColumnMetaData not 
set in Encryption with Footer key");
   }
-  if (null == fileDecryptor) {
-throw new ParquetCryptoRuntimeException("Column encrypted with 
footer key: No keys available");
-  }
   columnPath = getPath(metaData);
+  if (!encryptedFooter) { // Unencrypted footer. Decrypt full 
column metadata, using footer key

Review Comment:
   I am not following why we use the footer key to decrypt? Wasn't the column 
key used before? 





> Enable uniform decryption with plaintext footer
> ---
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
>  Issue Type: Bug
>  Components: parquet-mr
>Reporter: Gidon Gershinsky
>Assignee: Gidon Gershinsky
>Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode - 
> for no good reason. Column metadata is available, we just need to decrypt and 
> use it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (PARQUET-2148) Enable uniform decryption with plaintext footer

2022-05-18 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538757#comment-17538757
 ] 

ASF GitHub Bot commented on PARQUET-2148:
-

ggershinsky opened a new pull request, #969:
URL: https://github.com/apache/parquet-mr/pull/969

   Currently, uniform decryption is not enabled in the plaintext footer mode - 
for no good reason. Column metadata is available, we just need to decrypt and 
use it.




> Enable uniform decryption with plaintext footer
> ---
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
>  Issue Type: Bug
>  Components: parquet-mr
>Reporter: Gidon Gershinsky
>Assignee: Gidon Gershinsky
>Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode - 
> for no good reason. Column metadata is available, we just need to decrypt and 
> use it.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)