{"record":{"id":"05dd580f072ab902","repo":"risingwavelabs/risingwave","slug":"no-authentication-configured-set-either-password","errorCode":null,"errorMessage":"no authentication configured: set either `password`, or `private_key_file`, or `private_key_pem` (or provide `auth.method`)","messagePattern":"no authentication configured: set either `password`, or `private_key_file`, or `private_key_pem` \\(or provide `auth\\.method`\\)","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":343,"sourceCode":"            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`)\"\n                        )));\n                    }\n                }\n            }\n        };\n        config.auth_method = Some(normalized_auth_method);\n        Ok(config)\n    }\n\n    pub fn build_snowflake_task_ctx_jdbc_client(\n        &self,\n        is_append_only: bool,\n        schema: &Schema,\n        pk_indices: &Vec<usize>,\n    ) -> Result<Option<(SnowflakeTaskContext, JdbcJniClient)>> {\n        if !self.auto_schema_change\n            && is_append_only","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L325-L361","documentation":"With no explicit `auth.method`, the Snowflake sink infers authentication from credential fields. If none of `password`, `private_key_file`, or `private_key_pem` is present, no authentication can be configured and the connector fails fast during sink construction.","triggerScenarios":"CREATE SINK for a Snowflake sink that supplies connection details (account, user, database, etc.) but no credential option and no `auth.method`.","commonSituations":"Forgetting the password/key option, or credentials expected via templated variables that resolved to empty, or copying a minimal example that omitted auth.","solutions":["Add one credential option: `password`, `private_key_file`, or `private_key_pem`.","Or set `auth.method` together with its required credential fields.","Check that any secret/variable interpolation actually produced a non-empty value."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  snowflake.account = 'xy12345',\n  user = 'myuser'\n)\n// after\nWITH (\n  connector = 'snowflake',\n  snowflake.account = 'xy12345',\n  user = 'myuser',\n  password = 'secret'\n)","handlingStrategy":"validation","validationCode":"const creds = ['password', 'private_key_file', 'private_key_pem'].filter(k => opts[k]);\nif (creds.length === 0 && !opts['auth.method']) {\n  throw new Error('No Snowflake credentials configured');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always configure credentials through secrets so they resolve non-empty.","Log/inspect the effective option map (without secret values) before creating the sink.","Check that secret interpolation did not yield empty strings."],"tags":["snowflake","sink","authentication","missing-credentials"],"backgroundTag":"missing-credentials","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"}