[MXS-1715] "MySQL server has gone away" when using PAM_Auth with pam_unix local users having different local passwords Created: 2018-03-12 Updated: 2018-03-18 Resolved: 2018-03-18 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Authenticator |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using PAM_Auth with maxscale and mariadb running on different hosts and both using pam_unix.so, but having different local passwords for a given unix user, connecting with the maxscale side password succeeds, but every SQL command ends with Here the user "pamuser" has password "geheim" on the server running maxscale, but "secret" on the server running mariadb:
The MaxScale log shows this right after connection:
Shouldn't maxscale simply report an "Access denied" error in this case as the MariaDB backend clearly reported that when MaxScale tried to connect? |
| Comments |
| Comment by markus makela [ 2018-03-13 ] | |
|
As MaxScale asynchronously authenticates the client before even connecting to the backend servers, this is currently expected behavior. We actually do send an error message to the client but it should only show up once the client performs another command. The exact error message the client should get is:
A quick look at the code reveals that when the client is attempting to write to a backend server, it doesn't appear to send the error. I think we should write it to the client even in this case. | |
| Comment by markus makela [ 2018-03-18 ] | |
|
The command line client doesn't appear to relay the error message to the user even if one is sent by MaxScale. This does make sense as the connection is closed right after the message is sent. |