{"record":{"id":"898379089ec6bfc5","repo":"apache/seatunnel","slug":"option-authentication-type-is-required","errorCode":null,"errorMessage":"Option 'authentication_type' is required","messagePattern":"Option 'authentication_type' is required","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueConfigValidator.java","lineNumber":39,"sourceCode":"\nfinal class AzureQueueConfigValidator {\n\n    private static final Pattern QUEUE_NAME_PATTERN =\n            Pattern.compile(\"[a-z0-9](?:[a-z0-9-]{1,61}[a-z0-9])?\");\n\n    private AzureQueueConfigValidator() {}\n\n    static void validateClient(AzureQueueClientConfig config) {\n        requireNonBlank(config.getQueueName(), \"queue_name\");\n        if (config.getQueueName().length() < 3\n                || config.getQueueName().length() > 63\n                || !QUEUE_NAME_PATTERN.matcher(config.getQueueName()).matches()\n                || config.getQueueName().contains(\"--\")) {\n            throw new IllegalArgumentException(\n                    \"Option 'queue_name' must contain 3-63 lowercase letters, numbers or single hyphens\");\n        }\n        if (config.getAuthenticationType() == null) {\n            throw new IllegalArgumentException(\"Option 'authentication_type' is required\");\n        }\n\n        switch (config.getAuthenticationType()) {\n            case CONNECTION_STRING:\n                requireNonBlank(config.getConnectionString(), \"connection_string\");\n                rejectPresent(\n                        config.getEndpoint(),\n                        \"endpoint\",\n                        config.getAccountName(),\n                        \"account_name\",\n                        config.getAccountKey(),\n                        \"account_key\",\n                        config.getSasToken(),\n                        \"sas_token\");\n                break;\n            case SHARED_KEY:\n                requireNonBlank(config.getEndpoint(), \"endpoint\");\n                requireNonBlank(config.getAccountName(), \"account_name\");","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueConfigValidator.java#L21-L57","documentation":"AzureQueueConfigValidator.validateClient requires authentication_type to be set. It is the switch key that selects between CONNECTION_STRING, STORAGE_SHARED_KEY and SAS_TOKEN credential handling; a null value cannot be dispatched, so the validator fails fast with a clear message instead of an NPE inside the client factory.","triggerScenarios":"Sink config omits the authentication_type option (or it's misspelled/blank) so AzureQueueClientConfig.getAuthenticationType() returns null during validateClient.","commonSituations":"Forgot to add authentication_type in the Hocon/JSON config; typo like authetication_type; option defined but with empty string that failed to map to the enum.","solutions":["Add authentication_type to the sink config with one of: CONNECTION_STRING, STORAGE_SHARED_KEY, SAS_TOKEN","Check the option key spelling and that the value matches an enum name exactly (uppercase)","Supply the credential fields required by the chosen type (connection_string, account_name+account_key, or sas_token)"],"exampleFix":"// before\nsink {\n  AzureQueueStorage {\n    queue_name = \"my-queue\"\n  }\n}\n// after\nsink {\n  AzureQueueStorage {\n    queue_name = \"my-queue\"\n    authentication_type = CONNECTION_STRING\n    connection_string = \"...\"\n  }\n}","handlingStrategy":"validation","validationCode":"if (config.getString(\"authentication_type\") == null || config.getString(\"authentication_type\").trim().isEmpty()) {\n  throw new IllegalArgumentException(\"authentication_type is required: CONNECTION_STRING | STORAGE_SHARED_KEY | SAS_TOKEN\");\n}","typeGuard":null,"tryCatchPattern":"try { sink.open(ctx); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"authentication_type\")) { log.error(\"Add authentication_type to sink config\"); } throw e; }","preventionTips":["Use a config template/checklist that includes authentication_type and its matching credential fields","Validate configs with the connector's Option rules before submitting the job","Watch for typos — the option name is exactly authentication_type"],"tags":["azure-queue-storage","missing-config","authentication"],"backgroundTag":"missing-required-config-field","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"}