-
-
Notifications
You must be signed in to change notification settings - Fork 139
Implement password encryption using an RSA public key #373
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 password encryption using an RSA public key #373
Conversation
69c0a22
to
e5be218
Compare
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.
Thank you very much for this effort! It's appreciated!
Other than the link to mysql I think it will be very hard to follow how auth works here in the driver.
And it looks like you pretty much revisited all auth methods here?
What do you think about adding an additional readme with impl details? So it will be more clear later, and easier to follow in the future.
db-async-common/src/main/java/com/github/jasync/sql/db/Configuration.kt
Outdated
Show resolved
Hide resolved
db-async-common/src/main/java/com/github/jasync/sql/db/Configuration.kt
Outdated
Show resolved
Hide resolved
mysql-async/src/main/java/com/github/jasync/sql/db/mysql/MySQLConnection.kt
Outdated
Show resolved
Hide resolved
db-async-common/src/main/java/com/github/jasync/sql/db/Configuration.kt
Outdated
Show resolved
Hide resolved
Will do! I agree it's difficult to follow, and I was thinking of extracting the authentication logic into a separate class to handle all of this in a later PR (and allow making some optimizations with reading the public key). For now I'll make README explaining how it all works, and later start work on a prototype to hopefully simplify the whole flow. |
f0f1ddf
to
a8c7d03
Compare
I've addressed the comments. Please take another look. |
@@ -0,0 +1,60 @@ | |||
# Authentication methods |
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.
Awesome!
Let me know if it's ready to merge or anything else you'd like to change before I merge. |
It's ready to merge, thanks! |
Thanks you for the PR! |
Description
This PR is a follow-up to #358, to implement password encryption over unsafe connection using an RSA public key. This is required for
priority #2
as described on this page.Detailed changes
rsaPublicKey
property toConfiguration
MySQLConnection
, and other configuration toHandshakeResponse
, so they can be available during authentication phasesSha256PasswordAuthentication