I am attempting to connect to a Azure Database for MySQL which requires a secure connection. Looking at the Diesel documentation, an SSL mode and cert can be specified in the connection string. However, given my configuration, I am unable to connect (details below).
I am not sure if I have misinterpreted the requirements of the connection string (their documentation has an asterisk * showing after SSL_MODE?), if the *.crt.pem file is in the right format for this use, or if this is a supported feature.
After struggling with this as well, I dug a bit in the docs and issues of the diesel library. At first, I thought it would be this bug, not correctly passing on the parameters:
But the newer versions of Vaultwarden include this fix, and it still didn’t work for me with 1.32.0.
I believe there is still something odd about the database connection: Using the same database URL as above, but disabling SSL support at the database (including require_secure_transport = off) and also setting REQUIRE NONE for the user, connects just fine. ssl_mode=VERIFY_IDENTITY left me under the impression, that a valid and matching certificate must be presented.