apache/seatunnel · error · IllegalArgumentException

Unsupported authentication type

Error message

Unsupported authentication type: ${authenticationType}

What it means

AzureQueueClientFactory.builder throws IllegalArgumentException when the configured authentication type has no corresponding queue-service client builder branch. The switch only handles CONNECTION_STRING, STORAGE_SHARED_KEY and SAS_TOKEN; any other value (including an unexpected new enum member or a mis-decoded value) reaches the default branch.

Solutions

  1. Use one of the supported values: CONNECTION_STRING, STORAGE_SHARED_KEY, or SAS_TOKEN in authentication_type
  2. Ensure connector jar version matches the SeaTunnel version (no mixed jars)
  3. Run the AzureQueueConfigValidator earlier so invalid values are rejected with a clearer message

Example fix

// before
authentication_type = KEYVAULT (unsupported)
// after
authentication_type = SAS_TOKEN (with sas_token set)
Defensive patterns

Strategy: validation

Validate before calling

EnumSet<AuthType> supported = EnumSet.of(AuthType.CONNECTION_STRING, AuthType.STORAGE_SHARED_KEY, AuthType.SAS_TOKEN);
if (authType == null || !supported.contains(authType)) {
  throw new IllegalArgumentException("authentication_type must be one of " + supported);
}

Try / catch

try { client = AzureQueueClientFactory.builder(config); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported authentication type")) { log.error("Fix authentication_type: {}", e.getMessage()); } throw e; }

Prevention

When it happens

Trigger: builder(...) called with an authenticationType outside the supported switch cases; typically a corrupted/unknown enum value not caught by earlier validation.

Common situations: Plugin/connector version mismatch where the enum contains a value this factory doesn't know; custom or typo-derived enum state bypassing validator; upgrading SeaTunnel with old connector jar on classpath.

Understand the failure class

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/d1f221162b26ea7a. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/client/AzureQueueClientFactory.java:52

        QueueClientBuilder builder =
                new QueueClientBuilder()
                        .queueName(config.getQueueName())
                        .messageEncoding(toAzureEncoding(config.getMessageEncoding()));

        AuthenticationType authenticationType = config.getAuthenticationType();
        switch (authenticationType) {
            case CONNECTION_STRING:
                return builder.connectionString(config.getConnectionString());
            case SHARED_KEY:
                return builder.endpoint(config.getEndpoint())
                        .credential(
                                new StorageSharedKeyCredential(
                                        config.getAccountName(), config.getAccountKey()));
            case SAS_TOKEN:
                return builder.endpoint(config.getEndpoint())
                        .sasToken(normalizeSasToken(config.getSasToken()));
            default:
                throw new IllegalArgumentException(
                        "Unsupported authentication type: " + authenticationType);
        }
    }

    private static QueueMessageEncoding toAzureEncoding(MessageEncoding messageEncoding) {
        return messageEncoding == MessageEncoding.BASE64
                ? QueueMessageEncoding.BASE64
                : QueueMessageEncoding.NONE;
    }

    private static String normalizeSasToken(String sasToken) {
        return sasToken.startsWith("?") ? sasToken.substring(1) : sasToken;
    }
}

View on GitHub (pinned to cf67b549a7)