apache/seatunnel · error · ElasticsearchConnectorException
UNSUPPORTED_AUTH_TYPE
UNSUPPORTED_AUTH_TYPE
Error message
Unsupported authentication type: %s. Supported types: %s
What it means
AuthenticationProviderFactory.createProvider throws this when the configured auth_type does not map to any registered authentication provider. The registry only contains basic, api_key, and api_key_encoded; anything else (or an unregistered enum) triggers UNSUPPORTED_AUTH_TYPE with the list of supported types.
Source
Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/auth/AuthenticationProviderFactory.java:66
* Create an authentication provider based on the configuration.
*
* <p>This method examines the auth_type configuration parameter and creates the appropriate
* authentication provider. If no auth_type is specified, it defaults to basic authentication
* for backward compatibility.
*
* @param config the readonly configuration containing authentication settings
* @return the appropriate authentication provider
* @throws ElasticsearchConnectorException if the auth_type is not supported
*/
public static AuthenticationProvider createProvider(ReadonlyConfig config) {
AuthTypeEnum authType =
config.getOptional(ElasticsearchBaseOptions.AUTH_TYPE).orElse(DEFAULT_AUTH_TYPE);
log.debug("Creating authentication provider for type: {}", authType);
Class<? extends AuthenticationProvider> providerClass = PROVIDER_REGISTRY.get(authType);
if (providerClass == null) {
throw new ElasticsearchConnectorException(
UNSUPPORTED_AUTH_TYPE,
String.format(
"Unsupported authentication type: %s. Supported types: %s",
authType, PROVIDER_REGISTRY.keySet()));
}
try {
AuthenticationProvider provider = providerClass.getDeclaredConstructor().newInstance();
provider.validate(config);
log.info("Successfully created authentication provider: {}", authType);
return provider;
} catch (Exception e) {
throw new ElasticsearchConnectorException(
UNSUPPORTED_AUTH_TYPE,
String.format(
"Failed to create authentication provider for type: %s", authType),
e);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Use one of the supported types printed in the message: basic, api_key, or api_key_encoded
- Fix the auth_type value in the job config to exactly one of the supported strings
- Upgrade SeaTunnel if you need an auth mechanism newer than your current version
Example fix
// before "auth_type": "oauth" // after "auth_type": "api_key"
Defensive patterns
Strategy: validation
Validate before calling
// Validate auth_type before submitting the job:
Set<String> supported = Set.of("basic", "api_key", "api_key_encoded");
String authType = config.getOptional("auth_type").orElse("basic");
if (!supported.contains(authType)) throw new IllegalArgumentException("Unsupported auth_type: " + authType); Try / catch
try {
AuthenticationProvider p = AuthenticationProviderFactory.createProvider(config);
} catch (ElasticsearchConnectorException e) {
// message lists supported types; surface it to the user
throw new IllegalArgumentException("Fix auth_type in config: " + e.getMessage(), e);
} Prevention
- Only use auth_type values from the connector docs for your SeaTunnel version
- Keep values lowercase with no whitespace
- Check the release notes before copying auth config from newer examples
When it happens
Trigger: Setting auth_type in the Elasticsearch connector config to a value that parses to an AuthTypeEnum but has no registered provider class in PROVIDER_REGISTRY (e.g., a newly added enum constant without a provider, or a null/unknown mapping).
Common situations: Using a SeaTunnel version where the desired auth mechanism is not yet supported; typo variants that still resolve to an enum but lack a provider; copying config examples from newer releases into older clusters.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Unsupported auth type:
- prepare method is not supported
- Unknown MetalakeClient type:
- Failed to configure TLS settings
- Unknown AI provider '{name}'. Available: {available}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/55c13b7ea78da48d.
Report an issue: GitHub.