-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Mark AllowNativePassword
in DSN param string be true by default.
#644
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
Conversation
AllowNativePassword
in DNS param string be true by default.AllowNativePassword
in DSN param string be true by default.
Hey @elemount , setting allowNativePasswords to false by default was basically following similar syntax as allowOldPasswords and allowClearTextPasswords. However, native authentication is the default auth method and safer than old password or clear text; it should be set to true by default. Besides your code changes made in this PR, I think we should by default allow authentication switch with native password authentication in this code: Line 165 in 5926162
@julienschmidt , Hi Julien, what do you think? Thanks, |
@julienschmidt @methane Could you please have a review? |
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.
Generally, this change makes sense to me.
If no one else of the team has any objections, I think it can and should be allowed by default.
README.md
Outdated
``` | ||
`allowNativePasswords=true` allows the usage of the mysql native password method. | ||
`allowNativePasswords=true` allows the usage of the mysql native password method, and to be `false` to disallow the usage of mysql native password method during auth switch process. |
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.
Only the effect of allowNativePasswords=false
has to be documented, as true
is the default value and setting it manually wouldn't make sense as it doesn't change anything.
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.
Sure.
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.
LGTM
README.md
Outdated
``` | ||
`allowNativePasswords=true` allows the usage of the mysql native password method. | ||
`allowNativePasswords=false` disallows the usage of mysql native password method during auth switch process. |
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.
Might be nit-picking, but "during auth switch process" is an internal detail. The average driver user has no idea what is meant by this. Just remove it.
And if you push a change, please also change "mysql" to "MySQL" to keep it consistent within the README
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.
Hi @julienschmidt , I've updated it.
Thanks for your first contribution! |
I just updated to 1.4 and started getting native password errors:
When I checked the DSN I noticed that
I had to add |
@wayneashleyberry are you creating a new |
Ah, that's exactly what I'm doing @julienschmidt. Didn't know about |
When the DSN is formatted there is no difference between the zero value for What is new in v1.4.0 is that these settings are checked correctly. Before there were situations where |
Yeah, makes sense @julienschmidt — just didn't expect the change in behaviour. I have learnt something new though, using |
Description
This is the change about issue #642 (Is it possible to set the default value of "allowNativePasswords" to "true"?)
I see this AllowNativePassword param is introduced by @twocode in #494 , hi @twocode why you create this parameter and set the default value is true? Any security reason or others?
I think set the we should not have the allowNativePasswords param, so could we set it true?
Checklist