apache/pulsar · error · AuthenticationException

AUTH_REQUIRED

AUTH_REQUIRED

Error message

Authentication required

What it means

AuthenticationProviderList.applyAuthProcessor exhausted every configured provider without a successful authentication (or none were configured), so the request is rejected as requiring authentication.

Source

Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderList.java:84

        Exception authenticationException = null;
        String errorCode = ErrorCode.UNKNOWN.name();
        for (W ap : processors) {
            try {
                return authFunc.apply(ap);
            } catch (Exception ae) {
                log.debug().attr("authenticationProvider", ap.getClass()).exception(ae)
                        .log("Authentication failed for auth provider");
                authenticationException = ae;
                if (ae instanceof AuthenticationException) {
                    errorCode = ap.getClass().getSimpleName() + "-INVALID-AUTH";
                }
            }
        }

        if (null == authenticationException) {
            metrics.recordFailure(AuthenticationProviderList.class.getSimpleName(),
                    "authentication-provider-list", ErrorCode.AUTH_REQUIRED);
            throw new AuthenticationException("Authentication required");
        } else {
            metrics.recordFailure(AuthenticationProviderList.class.getSimpleName(),
                    "authentication-provider-list", errorCode);
            throw newAuthenticationException("Authentication failed", authenticationException);
        }
    }

    private static class AuthenticationListState implements AuthenticationState {

        private final List<AuthenticationState> states;
        private volatile AuthenticationState authState;
        private final AuthenticationMetrics metrics;

        AuthenticationListState(List<AuthenticationState> states, AuthenticationMetrics metrics) {
            if (states == null || states.isEmpty()) {
                throw new IllegalArgumentException("Authentication state requires at least one state");
            }
            this.states = states;

View on GitHub (pinned to 820761864e)

Solutions

  1. Enable/fix the matching authentication provider on the broker
  2. Send valid credentials for one of the enabled providers
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderList.java:84 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/7ff6b218cc295618. Report an issue: GitHub.