You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/01/17 20:07:54 UTC
[GitHub] mccheah commented on a change in pull request #80: Introduce
metadata for encrypting table data files
mccheah commented on a change in pull request #80: Introduce metadata for encrypting table data files
URL: https://github.com/apache/incubator-iceberg/pull/80#discussion_r248822654
##########
File path: api/src/main/java/com/netflix/iceberg/encryption/FileEncryptionMetadata.java
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.netflix.iceberg.encryption;
+
+import com.netflix.iceberg.Schema;
+import com.netflix.iceberg.types.Types;
+
+/**
+ * Information about how a table data file is decrypted.
+ */
+public interface FileEncryptionMetadata {
+
+ Schema SCHEMA = new Schema(
+ Types.NestedField.required(10000, "key_metadata", Types.BinaryType.get()),
+ Types.NestedField.required(10001, "cipher_algorithm", Types.StringType.get()));
Review comment:
One matter to note is that the cipher algorithm isn't tied to the key itself, but rather the combination of the key material and the cipher algorithm is used to [create cryptographic streams](https://github.com/palantir/hadoop-crypto/blob/6d9e05a1e667f150f7d98435e93a0dd6f3ea5c08/crypto-core/src/main/java/com/palantir/crypto2/io/CryptoStreamFactory.java#L72). So it makes sense to store the cipher algorithm separate from the key metadata in the data file metadata.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org