{"record":{"id":"9e8cd23b004b5393","repo":"risingwavelabs/risingwave","slug":"missing-password-in-cdc-properties","errorCode":null,"errorMessage":"missing `password` in CDC properties","messagePattern":"missing `password` in CDC properties","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/enumerator/mod.rs","lineNumber":294,"sourceCode":"    async fn query_sql_server_lsns(&self) -> ConnectorResult<Option<(String, String)>> {\n        let hostname = self\n            .properties\n            .get(\"hostname\")\n            .ok_or_else(|| anyhow!(\"missing `hostname` in CDC properties\"))?;\n        let port = self\n            .properties\n            .get(\"port\")\n            .ok_or_else(|| anyhow!(\"missing `port` in CDC properties\"))?\n            .parse::<u16>()\n            .context(\"failed to parse `port` as a u16\")?;\n        let username = self\n            .properties\n            .get(\"username\")\n            .ok_or_else(|| anyhow!(\"missing `username` in CDC properties\"))?;\n        let password = self\n            .properties\n            .get(\"password\")\n            .ok_or_else(|| anyhow!(\"missing `password` in CDC properties\"))?;\n        let database = self\n            .properties\n            .get(\"database.name\")\n            .ok_or_else(|| anyhow!(\"missing `database.name` in CDC properties\"))?;\n\n        let mut config = Config::new();\n        config.host(hostname);\n        config.port(port);\n        config.database(database);\n        config.authentication(tiberius::AuthMethod::sql_server(username, password));\n        config.trust_cert();\n\n        let mut client = SqlServerClient::new_with_config(config).await?;\n        let row = client\n            .inner_client\n            .simple_query(\n                \"SELECT \\\n                    sys.fn_cdc_get_max_lsn() AS max_lsn, \\","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/enumerator/mod.rs#L276-L312","documentation":"Raised by `query_sql_server_lsns` when `password` is missing from the CDC properties. Along with `username`, the password is required to build `tiberius::AuthMethod::sql_server` for the LSN monitoring connection.","triggerScenarios":"Calling `monitor_sql_server_lsns` on a SqlServerEnumerator whose `properties` map lacks a `password` entry.","commonSituations":"Password stored in a secret that failed to resolve; user quotes an empty password; config migration drops the password field; typo like `passsword` in the with clause.","solutions":["Add `password` to the CDC source properties","Check secret resolution/injection logs to confirm the password was populated","Recreate the table with both username and password set","Verify there is no key-name typo (must be exactly `password`)"],"exampleFix":"// before\nWITH (connector = 'cdc', username = 'cdc_user')\n// after\nWITH (connector = 'cdc', username = 'cdc_user', password = '***')","handlingStrategy":"validation","validationCode":"match properties.get(\"password\") {\n    Some(p) if !p.is_empty() => Ok(()),\n    Some(_) => Err(\"`password` must not be empty\".into()),\n    None => Err(\"CDC source is missing required property: password\".into()),\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm secret resolution succeeded before launching the CDC source","Use exact key names; avoid typos by defining a schema for CDC options"],"tags":["cdc","sql-server","config","credentials"],"backgroundTag":"missing-required-config-field","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"}