Closed brogon closed 8 months ago
Hi @brogon . Thank you for the report. I confirm I can reproduce it with the details provided. I am looking into it.
Thanks for looking into it!
In my search of the issue, I've found three other places besides the central "MySQLConnection" class, which seem to create backend connections - the main()
function line 1802, lib/MySQL_Monitor.cpp MySQL_Monitor_State_Data::create_new_connection()
line 1529 and lib/MySQL_Session.cpp kill_query_thread()
line 230.
As I'm not sure in which context these are used, but you might want look into these, too, and decide if they also need the "ssl_params" logic. I'd think the "main" function is OK, as it only "bootstraps" a given database, but killing queries and monitoring might "benefit" from it...
@brogon , PR #4467 adds:
Thank you for the report
ProxySQL version: 2.6.0 OS version: n/a, Docker image "proxysql/proxysql:2.6.0"|
When using "mysql_servers_ssl_params" instead of the global variables, ProxySQL can't use the given files.
If only given "ssl_ca", the "file open" error is just ignored, resulting in certificate validation issues if using a custom CA. If you use "ssl_cert" and "ssl_key" for cert-based authentication, it fails with "TLS/SSL error: invalid directory".
I've created a docker-compose based demonstration environment; you can find it attached to this report. It contains the needed configuration (proxysql.cnf and certificate/key-files) to reproduce the issue.
proxysql_ssl_params_test.zip proxysql_ssl_params_test.tar.bz2.zip (zipped .tar.bz2 to re-create the correct permissions on Linux)
The complete log of a failure from the aforementioned environment: