-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: caching_sha2_password over insecure connections #199
Comments
Good catch, looks like it. |
Actually I wonder if the incompatibility is mainly a difference in mysql2 defaulting to ssl enabled and trilogy defaulting to disabled. If I disable ssl for mysql2 I get a similar error (this error message one of the possible paths from the code I linked): Mysql2::Client.new(host: '127.0.0.1', username: 'caching_sha2', password: 'abc', ssl_mode: :disabled)
#=> Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. (Mysql2::Error) (I set up a caching_sha2 user called caching_sha2) |
AFIK this is by design by the trilogy authors, see #26 (comment) and #165
|
Yeah, I discussed this with GitHub folks. It wasn't implemented because it's a lot of work and tricky, and not the most used part. So it was deemed better to ship the I still think we should implement it at some point because if |
It would be nice to also be closer to a drop-in placement for the |
caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED
We'd gladly accept a PR, but per-the previous PR, it is quite complicated. |
I ran into something I don't quite understand the other day when making a gem compatible with
trilogy
: cainlevy/scenic-mysql_adapter#2 / https://github.com/cainlevy/scenic-mysql_adapter/actions/runs/10516090228/That gem CI uses the default mysql baked into GitHub Actions
ubuntu-latest
images:Nothing else changed in the test suite, just the same code using Active Record, one with
mysql2
the other withtrilogy
.The
mysql2
jobs went fine, but thetrilogy
ones failed to connect with:So I don't know what
mysql2
is doing, if it somehow accept to docaching_sha2
without TLS, or if somehow it fallbacks to another method, but I think we should do the same thing if we want to ease the transition frommysql2
totrilogy
.cc @adrianna-chang-shopify @eileencodes @jhawthorn @matthewd
The text was updated successfully, but these errors were encountered: