{"record":{"id":"e9c77a486c0e1625","repo":"risingwavelabs/risingwave","slug":"invalid-auth-method-allowed-password-key-p","errorCode":null,"errorMessage":"invalid auth.method: {} (allowed: password | key_pair_file | key_pair_object)","messagePattern":"invalid auth\\.method: (.+?) \\(allowed: password \\| key_pair_file \\| key_pair_object\\)","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":326,"sourceCode":"                    )));\n                }\n                AUTH_METHOD_KEY_PAIR_FILE.to_owned()\n            }\n            Some(method) if method == AUTH_METHOD_KEY_PAIR_OBJECT => {\n                if !has_pem {\n                    return Err(SinkError::Config(anyhow!(\n                        \"auth.method=key_pair_object requires `private_key_pem`\"\n                    )));\n                }\n                if has_password {\n                    return Err(SinkError::Config(anyhow!(\n                        \"auth.method=key_pair_object must not set `password`\"\n                    )));\n                }\n                AUTH_METHOD_KEY_PAIR_OBJECT.to_owned()\n            }\n            Some(other) => {\n                return Err(SinkError::Config(anyhow!(\n                    \"invalid auth.method: {} (allowed: password | key_pair_file | key_pair_object)\",\n                    other\n                )));\n            }\n            None => {\n                // Infer auth method from supplied fields\n                match (has_password, has_file, has_pem) {\n                    (true, false, false) => AUTH_METHOD_PASSWORD.to_owned(),\n                    (false, true, false) => AUTH_METHOD_KEY_PAIR_FILE.to_owned(),\n                    (false, false, true) => AUTH_METHOD_KEY_PAIR_OBJECT.to_owned(),\n                    (true, true, _) | (true, _, true) | (false, true, true) => {\n                        return Err(SinkError::Config(anyhow!(\n                            \"ambiguous auth: multiple auth options provided; remove one or set `auth.method`\"\n                        )));\n                    }\n                    _ => {\n                        return Err(SinkError::Config(anyhow!(\n                            \"no authentication configured: set either `password`, or `private_key_file`, or `private_key_pem` (or provide `auth.method`)\"","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L308-L344","documentation":"The Snowflake sink's `auth.method` option only accepts three values: `password`, `key_pair_file`, or `key_pair_object`. Any other string reaches the fall-through arm of the match in `from_btreemap` and is rejected, with the offending value and the allowed set included in the message.","triggerScenarios":"Setting `auth.method` to a misspelled or unsupported value such as `keypair`, `key_pair`, `oauth`, or `Key_Pair_File` when creating a Snowflake sink.","commonSituations":"Typos in DDL, using names remembered from other tools' connectors, or following outdated documentation that used a different method name.","solutions":["Use exactly one of: `password`, `key_pair_file`, or `key_pair_object` for `auth.method`.","Fix the spelling/case to match the allowed values shown in the error message.","If unsure, omit `auth.method` entirely and let the connector infer the method from the supplied credentials."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  auth.method = 'keypair_file',\n  private_key_file = '/path/key.p8'\n)\n// after\nWITH (\n  connector = 'snowflake',\n  auth.method = 'key_pair_file',\n  private_key_file = '/path/key.p8'\n)","handlingStrategy":"validation","validationCode":"const ALLOWED = ['password', 'key_pair_file', 'key_pair_object'];\nif (opts['auth.method'] && !ALLOWED.includes(opts['auth.method'])) {\n  throw new Error(`auth.method must be one of ${ALLOWED.join('|')}`);\n}","typeGuard":"const isAuthMethod = (v) => ['password','key_pair_file','key_pair_object'].includes(v);","tryCatchPattern":null,"preventionTips":["Copy method names from the official connector docs, not memory.","Validate option values with a lint/schema check before running CREATE SINK.","Omit `auth.method` to let the connector infer it when only one credential is supplied."],"tags":["snowflake","sink","authentication","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}