mirror of https://github.com/sysown/proxysql
The six new Phase-1 pass-through auth TAP tests registered under the
mysql84-g4 (and mysql90-g4 / mysql95-g4) groups were failing in CI with
errno != 0 on every "success" path (first connect, cache hit, re-probe,
post-invalidation reconnect, etc.).
Root cause
----------
The pass-through backend probe lives in:
MySQL_Session::handler_again___status_AUTHENTICATING_BACKEND_FOR_CLIENT
Right before the actual probe it does:
MySrvC *mysrvc = myhgc->get_random_MySrvC(...);
...
if (mysrvc->use_ssl && mysrvc->port) {
probe_ssl_params = MyHGM->get_Server_SSL_Params(...);
MySQL_Connection::set_ssl_params(probe, probe_ssl_params);
...
}
MYSQL *result = mysql_real_connect(probe, mysrvc->address, ...);
If MySrvC->use_ssl is false, the probe is a plaintext TCP connection.
The dbdeployer-based mysql84+ (and mysql90+/mysql95+) infras used by the
mysql84-g* groups (via TAP_MYSQL8_BACKEND_HG, defaulting to WHG=2900 etc.
from test/infra/infra-dbdeployer-mysql84/.env) seed mysql_servers rows
without use_ssl=1:
test/infra/infra-dbdeployer-mysql84/bin/docker-proxy-post.bash
test/infra/infra-dbdeployer-mysql84/conf/proxysql/infra-config.sql
As a result, every passthrough probe was plaintext. MySQL 8.4+ backends
(and the caching_sha2_password full-auth exchange the probe depends on)
typically reject or fail such connections, so all "success" scenarios in
the tests saw errno != 0 (commonly 1045) instead of 0.
This only affected the mysql84-g* groups (the ones actually running the
new passthrough tests). All other TAP groups, builds, unit tests, etc.
were green.
Fix
---
Right after each test's "pass-through configured" block (variables +
LOAD MYSQL VARIABLES TO RUNTIME) and before the first probe, we now do:
UPDATE mysql_servers
SET use_ssl=1
WHERE hostgroup_id = <MYSQL8_HG>;
LOAD MYSQL SERVERS TO RUNTIME;
This is applied in all six affected tests:
test_passthrough_auth_e2e-t.cpp
test_passthrough_auth_ratelimit-t.cpp
test_passthrough_auth_security-t.cpp
test_passthrough_auth_unknown_user-t.cpp
test_passthrough_auth_invalidation-t.cpp
test_passthrough_auth_metrics-t.cpp
The change only affects the probe->backend leg. The frontend TLS
requirement (spec §7.1) continues to be enforced by CLIENT_SSL +
mysql_ssl_set() in the tests' try_connect() helpers.
Documentation
-------------
- Each site has a detailed inline comment explaining:
* the probe code path and the MySrvC->use_ssl gate
* where the infra seeds the servers (WHG, docker-proxy-post.bash, etc.)
* why plaintext probes fail on mysql84+ backends
* why this has to be done before the first probe in that test
* that it only affects the backend leg (frontend TLS is separate)
- This commit message is intentionally long and self-contained so that
future readers (and the agents that will be asked to "explain why
mysql84-g4 was red") do not have to reconstruct the context from
partial logs and cross-PR archaeology.
No changes to core logic, only test fixtures to match documented
behavior and the reality of the test infrastructure.
This makes the mysql84-g* passthrough tests (and therefore the
mysql84-g4 CI job) pass again.
docs/passthrough-auth-spec
parent
dc74d241c6
commit
ac3c68aa21
Loading…
Reference in new issue