Put detailed error message for auth command#6773
Put detailed error message for auth command#6773hwware wants to merge 2 commits intoredis:unstablefrom
Conversation
|
Does this potentially reduced the difficulty to guess username out? |
|
Hi @laixintao, thanks for your comment, In my opinion I don’t think so, since it only indicates the user doesn’t exist, while did not give any clue about the user name pattern. In the old way for the above three scenario, it only indicates wrong username password pair, which doesn’t give end user any clue why cannot authenticate with this user, that’s the purpose of this PR |
|
That's not technically true, it allows you to brute force what the usernames are. Although I agree they are less secretive than the passwords, I don't think we should be giving detailed error messages. Unless someone else finds a compelling reason for this, I don't think this should be accepted. |
|
i agree this is undesirable. @hwware i'm closing this one, but please keep up the good work. |
|
Common sense says don't provide additional information, i.e. if the user does not exist, is disabled, or just wrong password. This can be logged though. |
|
Hi @oranagra , I forgot which exactly I saw before, but I think there is not only one cases, such as: https://openvpn.net/vpn-server-resources/troubleshooting-authentication-related-problems/. I think what @yossigo suggested also make sense, but if we change the error message accordingly to "user/pass combination is not correct, or user is suspended"make this better,how do you think? @oranagra @yossigo |
Put detailed error message for auth command for the following three error scenarios:
Disabled User:
acl setuser foo
OK
127.0.0.1:6379> auth foo 11
(error) DISABLEDUSER The user name specified was disabled
Wrong Password:
127.0.0.1:6379> ACL SETUSER alice on >p1pp0 ~cached:* +get
OK
127.0.0.1:6379> auth alice 333
(error) WRONGPASS The password specified for auth is not correct
Wrong User:
127.0.0.1:6379> auth ee 555
(error) WRONGUSER The user name specified for auth does not exist
passed make test:
189 seconds - integration/replication
223 seconds - integration/replication-psync
\o/ All tests passed without errors!
Cleanup: may take some time... OK