pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] wolfstudy commented on a change in pull request #8432: [Issue 8382][Pulsar Function] Enable e2e encryption for Pulsar Function
Date Tue, 03 Nov 2020 14:08:10 GMT

wolfstudy commented on a change in pull request #8432:
URL: https://github.com/apache/pulsar/pull/8432#discussion_r516382652



##########
File path: pulsar-functions/proto/src/main/proto/Function.proto
##########
@@ -100,12 +100,38 @@ message ConsumerSpec {
     ReceiverQueueSize receiverQueueSize = 4;
     map<string, string> schemaProperties = 5;
     map<string, string> consumerProperties = 6;
+    CryptoSpec cryptoSpec = 7;
 }
 
 message ProducerSpec {
     int32 maxPendingMessages = 1;
     int32 maxPendingMessagesAcrossPartitions = 2;
     bool useThreadLocalProducers = 3;
+    CryptoSpec cryptoSpec = 4;
+}
+
+message CryptoSpec {
+    enum FailureAction {
+        FAIL = 0;
+
+        DISCARD = 1;
+        CONSUME = 2;
+
+        SEND = 10;

Review comment:
       Why the `SEND` command value is `10`, Is there any special meaning here? We still reserve
the middle value?

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/functions/CryptoConfig.java
##########
@@ -0,0 +1,30 @@
+package org.apache.pulsar.common.functions;

Review comment:
       Please add license header for new file.

##########
File path: pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/CryptoUtils.java
##########
@@ -0,0 +1,135 @@
+package org.apache.pulsar.functions.utils;

Review comment:
       Please add license header fr new file.

##########
File path: pulsar-functions/java-examples/src/main/java/org/apache/pulsar/functions/api/examples/RawFileKeyReader.java
##########
@@ -0,0 +1,51 @@
+package org.apache.pulsar.functions.api.examples;
+
+import lombok.Data;
+import org.apache.pulsar.client.api.CryptoKeyReader;
+import org.apache.pulsar.client.api.EncryptionKeyInfo;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Map;
+
+@Data

Review comment:
       Maybe we need to add comments to the newly created class, otherwise the check of ci
may fail.

##########
File path: pulsar-functions/java-examples/src/main/java/org/apache/pulsar/functions/api/examples/RawFileKeyReader.java
##########
@@ -0,0 +1,51 @@
+package org.apache.pulsar.functions.api.examples;

Review comment:
       Please add the license header for new file.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message