sleungtoast opened a new issue #5396: anonymousUserRole is not consistently applied on http endpoint URL: https://github.com/apache/pulsar/issues/5396 **Describe the bug** When an `anonymousUserRole` is defined, that role name is used on the broker pulsar endpoint, but it's inconsistent on the http endpoint, sometimes using `<none>` instead **To Reproduce** Steps to reproduce the behavior: 1. Enable authentication on broker config 2. Add an anonymousUserRole to broker config 3. Add that same role name as a super-user 4. Try using admin http endpoints, you will be authenticated as `<none>` and be denied 5. Try adding `<none>` as a super-user 6. Try using admin http endpoints, you will be authenticated as `<none>` 7. Add an authentication provider to broker config list 8. Try using admin http endpoints, you will be authenticated as your anonymousUserRole **Expected behavior** After setting `anonymousUserRole`, I should always be authenticated as that role **Screenshots** Relevant code: ``` // No authentication provided if (!providers.isEmpty()) { if (StringUtils.isNotBlank(anonymousUserRole)) { return anonymousUserRole; } // If at least a provider was configured, then the authentication needs to be provider throw new AuthenticationException("Authentication required"); } else { // No authentication required return "<none>"; } ``` **Desktop (please complete the following information):** - MacOS **Additional context** We are only using this field in the development environment to avoid having developers deal with authentication locally.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
