{"record":{"id":"7ff6b218cc295618","repo":"apache/pulsar","slug":"auth-required","errorCode":"AUTH_REQUIRED","errorMessage":"Authentication required","messagePattern":"Authentication required","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderList.java","lineNumber":84,"sourceCode":"        Exception authenticationException = null;\n        String errorCode = ErrorCode.UNKNOWN.name();\n        for (W ap : processors) {\n            try {\n                return authFunc.apply(ap);\n            } catch (Exception ae) {\n                log.debug().attr(\"authenticationProvider\", ap.getClass()).exception(ae)\n                        .log(\"Authentication failed for auth provider\");\n                authenticationException = ae;\n                if (ae instanceof AuthenticationException) {\n                    errorCode = ap.getClass().getSimpleName() + \"-INVALID-AUTH\";\n                }\n            }\n        }\n\n        if (null == authenticationException) {\n            metrics.recordFailure(AuthenticationProviderList.class.getSimpleName(),\n                    \"authentication-provider-list\", ErrorCode.AUTH_REQUIRED);\n            throw new AuthenticationException(\"Authentication required\");\n        } else {\n            metrics.recordFailure(AuthenticationProviderList.class.getSimpleName(),\n                    \"authentication-provider-list\", errorCode);\n            throw newAuthenticationException(\"Authentication failed\", authenticationException);\n        }\n    }\n\n    private static class AuthenticationListState implements AuthenticationState {\n\n        private final List<AuthenticationState> states;\n        private volatile AuthenticationState authState;\n        private final AuthenticationMetrics metrics;\n\n        AuthenticationListState(List<AuthenticationState> states, AuthenticationMetrics metrics) {\n            if (states == null || states.isEmpty()) {\n                throw new IllegalArgumentException(\"Authentication state requires at least one state\");\n            }\n            this.states = states;","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderList.java#L66-L102","documentation":"AuthenticationProviderList.applyAuthProcessor exhausted every configured provider without a successful authentication (or none were configured), so the request is rejected as requiring authentication.","triggerScenarios":"Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderList.java:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable/fix the matching authentication provider on the broker","Send valid credentials for one of the enabled providers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}