You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "zhujt20 (via GitHub)" <gi...@apache.org> on 2025/06/12 10:11:43 UTC

[PR] use environment variable and PBKDF to generate main encrypt key [iotdb]

zhujt20 opened a new pull request, #15711:
URL: https://github.com/apache/iotdb/pull/15711

   use environment variable and PBKDF(hmac-sha256) to generate main encrypt key


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] use environment variable and PBKDF to generate main encrypt key [iotdb]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #15711:
URL: https://github.com/apache/iotdb/pull/15711


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] use environment variable and PBKDF to generate main encrypt key [iotdb]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 commented on code in PR #15711:
URL: https://github.com/apache/iotdb/pull/15711#discussion_r2142288097


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java:
##########
@@ -306,11 +307,19 @@ public void serializeClusterID(String clusterId) throws IOException {
   }
 
   public void serializeEncryptMagicString() throws IOException {
+    if (!Objects.equals(TSFileDescriptor.getInstance().getConfig().getEncryptType(), "UNENCRYPTED")
+        && !Objects.equals(
+            TSFileDescriptor.getInstance().getConfig().getEncryptType(),
+            "org.apache.tsfile.encrypt.UNENCRYPTED")) {
+      String token = System.getenv("user_encrypt_token");
+      if (token == null || token.trim().isEmpty()) {
+        throw new EncryptException(
+            "encryptType is not UNENCRYPTED, but user_encrypt_token is not set.");

Review Comment:
   The user may mistake it for a configuration item in iotdb-system.properties, state it more clearly like:
   "encryptType is not UNENCRYPTED, but user_encrypt_token is not set. Please set it in the environment variable."



-- 
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: reviews-unsubscribe@iotdb.apache.org

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