imbajin commented on code in PR #2568:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2568#discussion_r1676818754


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/AuthOptions.java:
##########
@@ -126,4 +129,11 @@ public static synchronized AuthOptions instance() {
                     rangeInt(0L, Long.MAX_VALUE),
                     (3600 * 24L)
             );
+
+    private static String generateRandomBase64Key() {
+        SecureRandom random = new SecureRandom();
+        byte[] bytes = new byte[32]; // 32 bytes for HMAC-SHA256

Review Comment:
   ```suggestion
           // 32 bytes for HMAC-SHA256
           byte[] bytes = new byte[32];
   ```



##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java:
##########
@@ -107,6 +107,7 @@ public StandardAuthManager(HugeGraphParams graph) {
                                                 HugeAccess::fromEdge);
 
         this.tokenGenerator = new TokenGenerator(config);
+        LOG.info("Key of default JWT token is generated randomly now");

Review Comment:
   ```suggestion
           LOG.info("Randomly generate a JWT secret key now");
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to