[MDEV-22129] MySQL Compatibility: Missing `ssl-mode` flag Created: 2020-04-03 Updated: 2020-07-11 Resolved: 2020-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.4.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Matthew McCullough | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
MacBook Pro (15-inch, 2017), MacOS Catalina |
||
| Issue Links: |
|
||||||||
| Description |
|
MySQL client has the option `ssl-mode`: From 5.6 Docs:
From 5.7 Docs:
The client that comes with MariaDB does not support this flag. Therefore software built to use MySQL, that employs this flag for some reason, can't support MariaDB. This specifically comes up in a Go library called SQLBoiler which does code generation based on database schema; unit tests for the generated code fail with MariaDB because the client doesn't understand this flag. Relevant issues: https://github.com/volatiletech/sqlboiler/issues/117 |
| Comments |
| Comment by Sergei Golubchik [ 2020-04-07 ] |
|
MariaDB clients don't support ssl-mode. As MySQL 5.7 manual above says, one is supposed to use --ssl instead of --ssl-mode=PREFERRED and --ssl --ssl-verify-server-cert instead of --ssl-mode=VERIFY_IDENTITY. We intentionally didn't implement the support for VERIFY_CA and REQUIRED modes, because requiring ssl without verifying the certificate is misleading — it creates a false sense of security while keeping connection vulnerable to MitM attacks. For MySQL compatibility we can add support for this option, but only for those values that the client actually implements. Looking at the sqlboiler issue you only need --ssl-mode=DISABLED anyway, so that should work. Why sqlboiler needs to disable ssl explicitly anyway? |
| Comment by Jakob Müller [ 2020-06-06 ] |
|
The MySQL 5.7 documentation actually says the exact opposite: https://dev.mysql.com/doc/refman/5.7/en/encrypted-connections.html So this should probably be adjusted in order to maintain compatibility. |