Bring your own CA and client certificates for MySQL sources
MySQL and MariaDB source connectors accept a CA certificate for servers signed by a private root, and a client certificate and key for servers that require mutual TLS.
Read more: Bring your own CA and client certificates for MySQL sources
Artie verified a MySQL server's certificate against the system's trusted roots, which is fine for a public CA and useless for a private one. Google Cloud SQL is the common case: every instance has its own CA, and its server certificate is named after the project and instance rather than the host, so verification could never pass. Servers that require a client certificate had no way to get one from Artie at all.
The MySQL source form, which MariaDB uses too, now has three optional PEM fields once TLS mode is set to required: a CA certificate, a client certificate, and a client key. With a CA certificate, Artie verifies the server's certificate chain against it, the way MySQL's VERIFY_CA does, and skips the host name check, so use a CA dedicated to that server. Without one, host verification against the system roots runs as before. A client certificate and key go in together, and the key is encrypted at rest and masked in the API and the activity history.
A related fix for anyone connecting through an SSH tunnel: Reader reaches the database as localhost through the tunnel, so TLS host verification compared the certificate against the wrong name and failed even though the connection test passed. The Dashboard now hands Reader the real endpoint host to verify against. IPv6 database hosts are also built correctly now, as [2001:db8::1]:3306 rather than an unparseable string.
This is for MySQL and MariaDB teams whose servers use a private certificate authority or require client certificates.
Why this matters
- Connect to Cloud SQL and other servers with a per-instance or private CA without turning verification off
- Meet a mutual TLS requirement from the connector form, with the key stored encrypted
- TLS verification through an SSH tunnel checks the real host, not the tunnel's localhost