{"record":{"id":"dcd78ea8809d4f16","repo":"openzipkin/zipkin","slug":"empty-name-property-in-filename","errorCode":null,"errorMessage":"empty {name} property in {fileName}","messagePattern":"empty (.+?) property in (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java","lineNumber":62,"sourceCode":"\n  void updateCredentialsFromProperties() throws IOException {\n    Properties properties = new Properties();\n    try (FileInputStream is = new FileInputStream(credentialsFile)) {\n      properties.load(is);\n    }\n    String username = ensureNotEmptyOrNull(properties, credentialsFile, USERNAME);\n    String password = ensureNotEmptyOrNull(properties, credentialsFile, PASSWORD);\n    basicCredentials.updateCredentials(username, password);\n  }\n\n  @Nullable static String ensureNotEmptyOrNull(Properties properties, String fileName, String name) {\n    String value = properties.getProperty(name);\n    if (value == null) {\n      throw new IllegalStateException(\"no \" + name + \" property in \" + fileName);\n    }\n    value = value.trim();\n    if (value.isEmpty()) {\n      throw new IllegalStateException(\"empty \" + name + \" property in \" + fileName);\n    }\n    return value;\n  }\n}\n","sourceCodeStart":44,"sourceCodeEnd":67,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin-server/src/main/java/zipkin2/server/internal/elasticsearch/DynamicCredentialsFileLoader.java#L44-L67","documentation":"DynamicCredentialsFileLoader.ensureNotEmptyOrNull throws IllegalStateException ('empty {name} property in {fileName}') when the credentials properties file defines the username or password key but its value trims to the empty string. Because an empty credential would fail HTTP basic auth in a confusing way, the loader validates that values are non-blank before applying them to BasicCredentials.","triggerScenarios":"A credentials file containing 'username=' with no value, or a value made only of whitespace (e.g. 'username   '). Evaluated at startup and on each scheduled refresh of the credentials file.","commonSituations":"Templating systems render an empty value because the secret variable was unset; a human creates a placeholder file with empty values intending to fill it later; trailing-whitespace edits in the secret file.","solutions":["Set a real non-blank value for both username and password in the file","If credentials are injected by a secret manager, verify the referenced secret keys actually hold values","Remove placeholder empty entries until real values are available"],"exampleFix":"# before\nusername=\npassword=\n\n# after\nusername=es-user\npassword=correct-horse-battery-staple","handlingStrategy":"validation","validationCode":"String v = p.getProperty(\"username\");\nif (v == null || v.trim().isEmpty()) throw new IllegalStateException(\"username missing/blank\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never commit placeholder credentials files with empty values","Alert on secret-rendering pipelines that output blank fields"],"tags":["zipkin","elasticsearch","credentials","validation","configuration"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}