{"record":{"id":"7f2f4dc801c4502d","repo":"apache/hadoop","slug":"invalid-format-expected-name-name-signerclass-n","errorCode":null,"errorMessage":"Invalid format (Expected name, name:SignerClass, name:SignerClass:SignerInitializerClass) for CustomSigner: [{customSigner}]","messagePattern":"Invalid format \\(Expected name, name:SignerClass, name:SignerClass:SignerInitializerClass\\) for CustomSigner: \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerManager.java","lineNumber":79,"sourceCode":"   * Initialize custom signers and register them with the AWS SDK.\n   *\n   */\n  public void initCustomSigners() {\n    String[] customSigners = ownerConf.getTrimmedStrings(CUSTOM_SIGNERS);\n    if (customSigners == null || customSigners.length == 0) {\n      // No custom signers specified, nothing to do.\n      LOG.debug(\"No custom signers specified\");\n      return;\n    }\n\n    for (String customSigner : customSigners) {\n      String[] parts = customSigner.split(\":\");\n      if (!(parts.length == 1 || parts.length == 2 || parts.length == 3)) {\n        String message = \"Invalid format (Expected name, name:SignerClass,\"\n            + \" name:SignerClass:SignerInitializerClass)\"\n            + \" for CustomSigner: [\" + customSigner + \"]\";\n        LOG.error(message);\n        throw new IllegalArgumentException(message);\n      }\n      if (parts.length == 1) {\n        // Nothing to do. Trying to use a pre-defined Signer\n      } else {\n        // Register any custom Signer\n        maybeRegisterSigner(parts[0], parts[1], ownerConf);\n\n        // If an initializer is specified, take care of instantiating it and\n        // setting it up\n        if (parts.length == 3) {\n          Class<? extends AwsSignerInitializer> clazz = null;\n          try {\n            clazz = (Class<? extends AwsSignerInitializer>) ownerConf\n                .getClassByName(parts[2]);\n          } catch (ClassNotFoundException e) {\n            throw new RuntimeException(String.format(\n                \"SignerInitializer class\" + \" [%s] not found for signer [%s]\",\n                parts[2], parts[0]), e);","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerManager.java#L61-L97","documentation":"At filesystem initialization SignerManager parses fs.s3a.custom.signers, a comma-separated list where each entry must have 1-3 colon-separated parts: 'name' (predefined signer reference), 'name:SignerClass', or 'name:SignerClass:SignerInitializerClass'. Any other part count is a configuration-format error and the manager throws IllegalArgumentException immediately rather than guessing.","triggerScenarios":"An entry like 'MySigner:com.example.MySigner:com.example.MyInit:extra' (4 parts), or a mangled entry where multiple signers were joined with colons/semicolons instead of commas so getTrimmedStrings returns one long string with many colons.","commonSituations":"Hand-editing core-site.xml; assuming semicolon separators between signers (the property is comma-split); concatenating entries when merging configs; trailing separators creating empty segments.","solutions":["Fix each entry to exactly 1-3 colon-separated parts: MySigner, MySigner:com.example.MySigner, or MySigner:com.example.MySigner:com.example.MySignerInitializer","Separate multiple custom signers with commas: fs.s3a.custom.signers=One:com.foo.S1,Two:com.foo.S2","Remove empty entries (dangling commas) which produce blank strings"],"exampleFix":"<!-- before -->\n<property><name>fs.s3a.custom.signers</name>\n  <value>MySigner:com.example.MySigner;com.example.MyInit;Other</value></property>\n\n<!-- after -->\n<property><name>fs.s3a.custom.signers</name>\n  <value>MySigner:com.example.MySigner:com.example.MySignerInit,Other</value></property>","handlingStrategy":"validation","validationCode":"for (String entry : conf.getTrimmedStrings(\"fs.s3a.custom.signers\")) {\n  if (entry == null || entry.isEmpty()) continue;\n  int parts = entry.split(\":\").length;\n  if (parts < 1 || parts > 3) {\n    throw new IllegalArgumentException(\"Bad fs.s3a.custom.signers entry (need 1-3 colon parts): \" + entry);\n  }\n}","typeGuard":"static boolean isValidCustomSignerEntry(String entry) {\n  if (entry == null || entry.isEmpty()) return false;\n  int n = entry.split(\":\").length;\n  return n >= 1 && n <= 3;\n}","tryCatchPattern":null,"preventionTips":["Comma-separate signers in fs.s3a.custom.signers; colons only inside an entry","Validate the property with a config-lint step before deploying","Keep a reviewed template of custom-signer config in the repo"],"tags":["aws","s3a","signer","configuration","validation"],"backgroundTag":"invalid-configuration-format","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}