mattisonchao commented on code in PR #21237:
URL: https://github.com/apache/pulsar/pull/21237#discussion_r1334905423


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1050,9 +1050,13 @@ protected void handleConnect(CommandConnect connect) {
                         .getAuthenticationProvider(originalAuthMethod);
 
                 if (originalAuthenticationProvider == null) {
-                    throw new AuthenticationException(
-                            String.format("Can't find AuthenticationProvider 
for original role"
-                                    + " using auth method [%s] is not 
available", originalAuthMethod));
+                    authRole = 
getBrokerService().getAuthenticationService().getAnonymousUserRole()

Review Comment:
   Please add a comment to clarify the condition that has 
`connect.hasOriginalPrincipal()` but no `originalAuthMethod` means the proxy 
wants the broker to use anonymousUserRole. :) 



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