Skip to content

Commit b0a7aa5

Browse files
emmaling27Convex, Inc.
authored andcommitted
Verify certificates when connecting to MySQL (#34467)
Now `--do-not-require-ssl` will be required to run against local mysql and certificates will be validated when ssl is used. GitOrigin-RevId: 690a424b87eac004e4fc7978438d24bc5e4622d3
1 parent 675c192 commit b0a7aa5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/clusters/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ pub fn persistence_args_from_cluster_url(
5757
DbDriverTag::MySql(_) => {
5858
// NOTE: We do not set any database so we can reuse connections between
5959
// database. The persistence layer will select the correct database.
60-
cluster_url
61-
.query_pairs_mut()
62-
.append_pair("require_ssl", "true")
63-
.append_pair("verify_ca", "false");
60+
if require_ssl {
61+
cluster_url
62+
.query_pairs_mut()
63+
.append_pair("require_ssl", "true")
64+
.append_pair("verify_ca", "true");
65+
}
6466
},
6567
DbDriverTag::MySqlAwsIam(_) => {
6668
// NOTE: We do not set any database so we can reuse connections between

0 commit comments

Comments
 (0)