apache/pulsar · error · AuthenticationException
EMPTY_AUTH_DATA
EMPTY_AUTH_DATA
Error message
Authentication data source does not have data
What it means
Data-source guard in AuthenticationProviderBasic's AuthParams constructor: neither command data nor HTTP header data was available on the AuthenticationDataSource, so credentials cannot be read at all; indicates a transport-level issue where auth data was not carried with the request.
Source
Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java:190
if (StringUtils.isBlank(rawAuthToken) || !rawAuthToken.toUpperCase().startsWith("BASIC ")) {
incrementFailureMetric(ErrorCode.INVALID_HEADER);
throw new AuthenticationException("Authentication token has to be started with \"Basic \"");
}
String[] splitRawAuthToken = rawAuthToken.split(" ");
if (splitRawAuthToken.length != 2) {
incrementFailureMetric(ErrorCode.INVALID_HEADER);
throw new AuthenticationException("Base64 encoded token is not found");
}
try {
authParams = new String(Base64.getDecoder().decode(splitRawAuthToken[1]));
} catch (Exception e) {
incrementFailureMetric(ErrorCode.INVALID_HEADER);
throw new AuthenticationException("Base64 decoding is failure: " + e.getMessage());
}
} else {
incrementFailureMetric(ErrorCode.EMPTY_AUTH_DATA);
throw new AuthenticationException("Authentication data source does not have data");
}
String[] parsedAuthParams = authParams.split(":");
if (parsedAuthParams.length != 2) {
incrementFailureMetric(ErrorCode.INVALID_AUTH_DATA);
throw new AuthenticationException("Base64 decoded params are invalid");
}
userId = parsedAuthParams[0];
password = parsedAuthParams[1];
}
public String getUserId() {
return userId;
}
public String getPassword() {
return password;View on GitHub (pinned to 820761864e)
Solutions
- Attach credentials to the connection/HTTP request
- Verify the client is configured to send auth data over this transport
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java:190 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/cef9b6a12798c285.
Report an issue: GitHub.