{"record":{"id":"1ca6e08d381f6bb6","repo":"apache/pulsar","slug":"the-format-of-the-password-auth-conf-file-is-inval","errorCode":null,"errorMessage":"The format of the password auth conf file is invalid","messagePattern":"The format of the password auth conf file is invalid","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java","lineNumber":109,"sourceCode":"            data = System.getProperty(CONF_SYSTEM_PROPERTY_KEY);\n        }\n        if (StringUtils.isEmpty(data)) {\n            throw new IOException(\"No basic authentication config provided\");\n        }\n\n        @Cleanup BufferedReader reader = null;\n        try {\n            byte[] bytes = readData(data);\n            reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes)));\n        } catch (Exception e) {\n            throw new IllegalArgumentException(e);\n        }\n\n        users = new HashMap<>();\n        for (String line : reader.lines().toArray(s -> new String[s])) {\n            List<String> splitLine = Arrays.asList(line.split(\":\"));\n            if (splitLine.size() != 2) {\n                throw new IOException(\"The format of the password auth conf file is invalid\");\n            }\n            users.put(splitLine.get(0), splitLine.get(1));\n        }\n    }\n\n    @Override\n    public String getAuthMethodName() {\n        return \"basic\";\n    }\n\n    @Override\n    public void incrementFailureMetric(Enum<?> errorCode) {\n        authenticationMetrics.recordFailure(errorCode);\n    }\n\n    @Override\n    public String authenticate(AuthenticationDataSource authData) throws AuthenticationException {\n        AuthParams authParams = new AuthParams(authData);","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java#L91-L127","documentation":"AuthenticationProviderBasic.initialize failed to parse the basic-auth config: the supplied user/password data could not be read as a usable reader (bad file contents or unsupported format), so no users can be loaded.","triggerScenarios":"Thrown at pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderBasic.java:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the basic auth conf file format (user:password or user:hash lines)","Point superUser / basic auth conf settings at the correct file"],"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-14T05:17:10.506Z"}