{"record":{"id":"cef9b6a12798c285","repo":"apache/pulsar","slug":"empty-auth-data","errorCode":"EMPTY_AUTH_DATA","errorMessage":"Authentication data source does not have data","messagePattern":"Authentication data source does not have data","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java","lineNumber":190,"sourceCode":"                if (StringUtils.isBlank(rawAuthToken) || !rawAuthToken.toUpperCase().startsWith(\"BASIC \")) {\n                    incrementFailureMetric(ErrorCode.INVALID_HEADER);\n                    throw new AuthenticationException(\"Authentication token has to be started with \\\"Basic \\\"\");\n                }\n                String[] splitRawAuthToken = rawAuthToken.split(\" \");\n                if (splitRawAuthToken.length != 2) {\n                    incrementFailureMetric(ErrorCode.INVALID_HEADER);\n                    throw new AuthenticationException(\"Base64 encoded token is not found\");\n                }\n\n                try {\n                    authParams = new String(Base64.getDecoder().decode(splitRawAuthToken[1]));\n                } catch (Exception e) {\n                    incrementFailureMetric(ErrorCode.INVALID_HEADER);\n                    throw new AuthenticationException(\"Base64 decoding is failure: \" + e.getMessage());\n                }\n            } else {\n                incrementFailureMetric(ErrorCode.EMPTY_AUTH_DATA);\n                throw new AuthenticationException(\"Authentication data source does not have data\");\n            }\n\n            String[] parsedAuthParams = authParams.split(\":\");\n            if (parsedAuthParams.length != 2) {\n                incrementFailureMetric(ErrorCode.INVALID_AUTH_DATA);\n                throw new AuthenticationException(\"Base64 decoded params are invalid\");\n            }\n\n            userId = parsedAuthParams[0];\n            password = parsedAuthParams[1];\n        }\n\n        public String getUserId() {\n            return userId;\n        }\n\n        public String getPassword() {\n            return password;","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java#L172-L208","documentation":"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.","triggerScenarios":"Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java:190 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Attach credentials to the connection/HTTP request","Verify the client is configured to send auth data over this transport"],"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"}