liudezhi2098 commented on code in PR #15121:
URL: https://github.com/apache/pulsar/pull/15121#discussion_r861487853


##########
pulsar-broker-auth-sasl/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderSasl.java:
##########
@@ -98,8 +102,14 @@ public void initialize(ServiceConfiguration config) throws 
IOException {
                 throw new IOException(e);
             }
         }
-
-        this.signer = new SaslRoleTokenSigner(Long.toString(new 
Random().nextLong()).getBytes());
+        String saslJaasServerRoleTokenSignerSecretFile = 
config.getSaslJaasServerRoleTokenSignerSecret();
+        byte[] secret = null;
+        if (StringUtils.isNotBlank(saslJaasServerRoleTokenSignerSecretFile)) {
+            secret = 
readSecretFromUrl(saslJaasServerRoleTokenSignerSecretFile);
+        } else {
+            secret = 
SaslConstants.JAAS_DEFAULT_ROLE_TOKEN_SIGNER_SECRET.getBytes();

Review Comment:
   if we should maintain the current default (using a random Long),this will 
cause users to be unable to use under multiple brokers.



-- 
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]

Reply via email to