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


##########
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:
   I see. How have users been using this feature? It seems odd to me that this 
redirect problem would only just be discovered now, if we assume this feature 
has been in use. If the current default is really problematic, then I think we 
should default to `null` and then fail on startup if the value is `null` while 
authentication is enabled for SASL.



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