{"record":{"id":"1aedc7eb3836357c","repo":"apache/seatunnel","slug":"transport-auth-type-must-be-token-when-set-non","errorCode":null,"errorMessage":"transport.auth-type must be \"token\" when set; \"none\" is not supported.","messagePattern":"transport\\.auth-type must be \"token\" when set; \"none\" is not supported\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/config/EdgeTransportConfig.java","lineNumber":110,"sourceCode":"            return max;\n        }\n        return Math.min(max, doubled);\n    }\n\n    public static void sleepQuiet(long millis) throws InterruptedException {\n        if (millis <= 0) {\n            return;\n        }\n        Thread.sleep(millis);\n    }\n\n    private static void validateAuthType(String authType) {\n        if (authType == null || authType.trim().isEmpty()) {\n            return;\n        }\n        String normalized = authType.trim().toLowerCase(Locale.ROOT);\n        if (!normalized.equals(\"token\")) {\n            throw new IllegalArgumentException(\n                    \"transport.auth-type must be \\\"token\\\" when set; \\\"none\\\" is not supported.\");\n        }\n    }\n}\n","sourceCodeStart":92,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/config/EdgeTransportConfig.java#L92-L115","documentation":"validateAuthType normalizes the optional transport.auth-type value and only accepts \"token\" (case-insensitive). Any other non-empty value, including \"none\", is rejected with IllegalArgumentException, because the transport no longer supports unauthenticated connections. Null/empty means 'use default' and passes.","triggerScenarios":"Setting transport.auth-type to any value other than \"token\" (e.g. \"none\", \"basic\", \"oauth\") in the transport config before EdgeTransportConfig is constructed.","commonSituations":"Migrating from an older agent version where \"none\" was allowed; copying config templates that used auth-type = \"none\"; typo'd values like \"Token \" handled fine but \"token2\" or \"bearer\" rejected; disabling auth to debug connectivity.","solutions":["Change transport.auth-type to \"token\" in the config.","If no auth is desired, remove the transport.auth-type entry entirely (null/empty is accepted).","Check the release notes for the version that dropped \"none\" support and migrate the peer/endpoint to token auth.","Verify no trailing/leading whitespace plus case mix produces an unexpected literal (though trim/lowercase handles this, the value itself must be 'token')."],"exampleFix":"// before\ntransport {\n  auth-type = \"none\"\n}\n\n// after\ntransport {\n  auth-type = \"token\"\n}","handlingStrategy":"validation","validationCode":"if (cfg.hasPath(\"transport.auth-type\")) {\n    String v = cfg.getString(\"transport.auth-type\").trim().toLowerCase(Locale.ROOT);\n    if (!v.isEmpty() && !v.equals(\"token\")) {\n        throw new IllegalStateException(\"transport.auth-type must be \\\"token\\\" when set (got: \" + v + \")\");\n    }\n}","typeGuard":"boolean isSupportedAuthType(String authType) {\n    return authType == null || authType.trim().isEmpty()\n        || \"token\".equals(authType.trim().toLowerCase(Locale.ROOT));\n}","tryCatchPattern":"try {\n    EdgeTransportConfig transportConfig = new EdgeTransportConfig(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"auth-type\")) {\n        LOG.error(\"Unsupported transport.auth-type; only 'token' (or unset) is allowed\", e);\n    }\n    throw e;\n}","preventionTips":["Use a curated config template that only contains supported auth-type values.","When migrating from versions that allowed \"none\", remove the key instead of keeping it.","Grep deployment configs for auth-type and whitelist values in your deployment tooling.","Document the single supported value in your team's config reference."],"tags":["config","authentication","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}