-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
UserAdd issue / question #11425
Comments
By the way, |
Thanks for the digging! You are correct. This is a bug. There is already a PR (which does exactly what you proposed) to fix this:) We will get it merged in master branch and then backport to 3.4. |
Right, Thanks. |
Fixed by #11418. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Just starting to use etcd, I'm facing an issue when adding user.
I end up unable to log-in.
I think I found the issue, but I'd like to check that I'm not wrong somewhere.
here is the context:
I'm running etcd v3.4.3 (docker gcr.io/etcd-development/etcd:v3.4.3)
For some reason still not clear to me, I haven't managed to get the client from v3.4 using go modules so clientv3 I'm using if from v3.3.
In this version, there is no
UserAddWithOptions
, onlyUserAdd
Because of this, etcd ends up adding a user without options.
Looking at the code involved, I think something is wrong, and if I understand it correctly, this would explain my problem.
Code is
The top part, when there is no options (old default) does not go through bcrypt and as such don't save the hashed password.
However the bottom part considers that no option means
NoPassword: false
As such, request to add user using the old
UsedAdd
call leads to an existing user with an emty hash.I think that either the top if should be:
or the options should be earlier unmarshaled with default value.
Does this make sense or am I wrong somewhere ?
Thanks,
Pascal
The text was updated successfully, but these errors were encountered: