{"record":{"id":"ad6abcb64ff5d26c","repo":"apache/beam","slug":"invalid-secret-type-s-currently-supported-types-s","errorCode":null,"errorMessage":"Invalid secret type %s, currently supported types: %s","messagePattern":"Invalid secret type (.+?), currently supported types: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/Secret.java","lineNumber":228,"sourceCode":"      String[] parts = param.split(\":\", 2);\n      if (parts.length == 2) {\n        paramMap.put(parts[0], parts[1]);\n      }\n    }\n\n    if (!paramMap.containsKey(\"type\")) {\n      throw new IllegalArgumentException(\"Secret string must contain a valid type parameter\");\n    }\n\n    String rawType = paramMap.remove(\"type\");\n    if (rawType == null || rawType.isEmpty()) {\n      throw new IllegalArgumentException(\"Secret string must contain a valid type parameter\");\n    }\n\n    String secretType = rawType.toLowerCase();\n    SecretRegistrar.SecretFactory factory = SECRET_FACTORIES.get(secretType);\n    if (factory == null) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Invalid secret type %s, currently supported types: %s\", rawType, SUPPORTED_TYPES));\n    }\n\n    try {\n      return factory.createSecret(paramMap);\n    } catch (Exception e) {\n      if (e instanceof IllegalArgumentException) {\n        throw (IllegalArgumentException) e;\n      }\n      if (e instanceof NullPointerException) {\n        throw (NullPointerException) e;\n      }\n      throw new RuntimeException(\"Failed to parse secret option\", e);\n    }\n  }\n\n  /**","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/Secret.java#L210-L246","documentation":"parseSecretOption looks up the lowercased type string in the SECRET_FACTORIES registry. If no factory is registered for that type, the type is not a supported secret manager and IllegalArgumentException is thrown listing the currently supported types. This is thrown from parseSecretOption (the string-form API); the JSON form throws its own variant at line 276.","triggerScenarios":"Calling Secret.parseSecretOption with a type value not in the registry, e.g. 'type:AwsSecret' or 'type:vault' when only GcpSecret is registered.","commonSituations":"Misspelled secret manager names ('gcpsecret' vs registered casing after lowercase), using a secret provider from a different library, or running against a Beam version that does not register the type you specified.","solutions":["Use one of the supported types listed in the exception message (check SUPPORTED_TYPES), e.g. 'type:GcpSecret'.","Fix casing/spelling — lookup is on the lowercased type, so a type not registered at all will fail regardless of case.","If you need a custom provider, register its factory via SecretRegistrar before parsing, or upgrade Beam to a version that supports the desired secret manager."],"exampleFix":"// before\nSecret s = Secret.parseSecretOption(\"type:AwsSecretManager;name:my_secret\");\n// after\nSecret s = Secret.parseSecretOption(\"type:GcpSecret;version_name:my_secret/versions/latest\");","handlingStrategy":"validation","validationCode":"// check before parsing\nif (!java.util.Set.of(\"gcpsecret\").contains(secretType.toLowerCase())) { throw new IllegalArgumentException(\"unsupported secret type: \" + secretType); }","typeGuard":null,"tryCatchPattern":"try { Secret s = Secret.parseSecretOption(opt); } catch (IllegalArgumentException e) { LOG.error(\"unsupported secret type in {}: {}\", opt, e.getMessage()); throw e; }","preventionTips":["Use only types listed in Secret.SUPPORTED_TYPES.","Compare against the exception message's supported list when configuring.","Register custom factories before parsing if using a private secret manager."],"tags":["java","beam","secrets","configuration","unsupported"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}