-
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
Implement caching_sha2_password for mysql 8+ #165
Conversation
Reproduction for #26
5417986
to
04d407b
Compare
96b52a4
to
adf593a
Compare
bb69dff
to
db62763
Compare
fb277a9
to
febaaa9
Compare
caching_sha2 username should only run against that 8.0, otherwise it fails in 5.7. Co-authored-by: John Hawthorn <john@hawthorn.email>
This PR implements caching_sha2_password for mysql 8. Note that we have chosen on purpose to only implement the path where TSL is used. We will not be implementing the non-TSL path. Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: Aaron Patterson (tenderlove) <tenderlove@ruby-lang.org>
d866285
to
e5af495
Compare
e5af495
to
8731936
Compare
run: | | ||
brew install mysql@${{ matrix.mysql }} | ||
(unset CI; brew postinstall mysql@${{ matrix.mysql }}) | ||
brew services start mysql@${{ matrix.mysql }} | ||
sleep 5 | ||
$(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot -e 'CREATE DATABASE test' | ||
[[ "$MYSQL_VERSION" == "8.0" ]] && $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < docker-entrypoint-initdb.d/caching_sha2_password_user.sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be any 8.x
version and later? Since we also have versions up to 8.3.0 today for MySQL and each quarter there's a new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the image name and we don't have a matrix for 5.7
, 8.0
, and 8.3
, just 5.7
and 8.0
. If we added 8.3 and then this wasn't updated, the build would fail. I'm not against doing a >=
but it's also not broken currently. 🤷🏼♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, this was more future proofing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thought about the "unsupported" error class, but otherwise makes sense to me.
We aren't supporting `caching_sha2_password` in Trilogy unless mysql is running with TLS or a unix socket, so raise an error if using `caching_sha2_password` in that case.
8731936
to
f95e12d
Compare
Add changelog entry for #165
This PR implements caching_sha2_password for mysql 8. Note that we have
chosen on purpose to only implement the path where TLS or a unix socket is used. We will
not be implementing the non-TLS/non-unix socket path.
Co-authored-by: John Hawthorn john@hawthorn.email
Co-authored-by: Aaron Patterson (tenderlove) tenderlove@ruby-lang.org
Fixes: #26
For testing:
Point trilogy at this branch in your Gemfile:
Update your mysql auth plugin / policy to use
caching_sha2_password
overmysql_native_password