|
Post by AMI_SzuJin on Nov 14, 2022 5:47:53 GMT
Hi, Based on "AccountLockoutThreshold" value the user gets locked for a specific period of time(till it reached the value specified in AccountLockoutDuration) on passing wrong password.
For example:
"AccountLockoutCounterResetAfter": 30,
"AccountLockoutCounterResetEnabled": true,
"AccountLockoutDuration": 30,
"AccountLockoutThreshold": 5,
That means Redfish tries to protect the user accounts existent by imposing a 30 second account lockout when the password supplied is incorrect for a given user account 5 or more times.
e.g.,
Case 1. For 4 login failure attempts, redfish will respond 401 - Unauthorized having message in error response like "Message": "While attempting to establish a connection to /redfish/v1/AccountService, the service was denied access.",
Case 2. On the 5th login failure attempt, redfish will respond 401 -Unauthorized having message in error response like "Message": "Login for user Administrator was a failure because the number of unsuccessful login attempts has exceeded the set threshold. Administrator has been locked out for 30 seconds.",
We know when create a session with incorrect password in request body will return status code 401 Unauthorized. Which error response will return if try to create session for 5 times (with incorrect password in request body) when "AccountLockoutThreshold" is set to 5? Will return Case 1 or Case 2 error response? and will the account be locked? Which situation the same as login Redfish URI with incorrect credentials.
POST Session request body: {
"UserName":"Administrator",
"Password":"12345678" <- wrong password }
Thanks
|
|
|
Post by mraineri on Nov 15, 2022 14:12:38 GMT
Since authentication failed, 401 is the correct response. In terms of messages, I strongly recommend avoiding specific messages like that in 401 responses; detailed messages beyond simply saying "invalid credentials" goes against security best practices. Showing any specific reasons can leak information to an attacker. Very similar issue came up in this thread: redfishforum.com/thread/761/account-lock-behavior-existing-user
|
|
|
Post by AMI_SzuJin on Nov 16, 2022 3:45:12 GMT
Hi, One more question. Will the existing account be locked when the number of session creation failures reached the number of "AcountLockoutThreshold"?
Thanks
|
|
|
Post by mraineri on Nov 16, 2022 14:11:05 GMT
It would also need to factor in other authentication methods (like HTTP Basic auth), but if a user fails to create a session 5 times in your example, then it will be locked.
|
|
|
Post by AMI_RythonCai on Dec 17, 2022 15:20:23 GMT
Hi,
Assuming a user provides basic authentication to create a session, should we verify the basic authentication and what is the expected result in the following scenario?
Case 1 :
Basic authentication => username = Administrator, "Password":"87654321" => correct password
POST Session request body: {
"UserName":"Administrator",
"Password":"12345678" <- wrong password }
If the user login failure exceeds the value of AccountLockoutThreshold, will the user Administrator be locked or it will not be locked due to basic authentication success login and reset the count ?
Case 2:
Basic authentication => username = Administrator, "Password":"87654321" => correct password
POST Session request body: {
"UserName":"TestUser",
"Password":"12345678" <- wrong password }
If the user login failure exceeds the value of AccountLockoutThreshold, TestUser user will be locked?
Case 3:
Basic authentication => username = Administrator, "Password":"12345678" => wrong password
POST Session request body: {
"UserName":"TestUser",
"Password":"12345678" <- wrong password }
If the user login failure exceeds the value of AccountLockoutThreshold, which user will be locked?
Thanks, Rython
|
|
|
Post by AMI_RythonCai on Dec 28, 2022 5:23:25 GMT
Hi,
Is any update? thanks
|
|
|
Post by jautor on Dec 30, 2022 21:32:45 GMT
I'm afraid the answer here is that it will depend on your implementation. Since the session creation POST is not expected to have, or use, an authentication header, that header should be ignored and the results based on the payload contents. But your web server may process that and reject a bad password (from Basic Auth) before the Redfish Session handler gets the opportunity to even examine the payload.
Jeff
|
|