In order to reduce the chance for brute forcing the local device PIN, system should lock temporary the login option after 3 wrong attempts.
Acceptance criteria
when user enter more than 3 times wrong device PIN, then the system lock down the login option for 5 minutes
when login option is locked, then the system shows in login popup message with reverse counter showing how much time is left until the user is able make the next login attempt.
Message : "3 incorrect attempts. Try again in xx:xx"
when user enter more that 9 time wrong PIN, then system revoke the account for the device
Implemented countdown timer mechanism to viamapi-iframe.js but it has a down-side: If user closes active browser (where timer is running), the timer will pause forever.
Below: First failed attempt (nothing different from old design)
Below: After 3 failed attempts (warning message is changed)
After 9 failed attempts, it is requiered to revoke the account for the device. @gospodin.bodurov should I use destroyIdentityFromLocalStorage() or another method for this operation?
@gospodin.bodurov If you close the current tab and open a new one, the blockage is still valid. Because I set blockFinishTime (which is getTime() + 5 minutes) in localStorage. If block starts at 13:00, I set 13:05 in localStorage and till that time, the same browser can’t be used. There might be a drawback though, if the user changes OS time outside the browser, it might lift the blockage. For this, we can think of a ajax call to a server to get time more accurately. Or we can leave it as is.
Implemented clearIdentities() after 9 failed attempts
Committed changes to branch 14-system-should-block-the-login-option-for-defined-period-of-time-when-user-enter-wrong-local-device-pin-more-than-3-attempts
- 9 wrong attempts show error error only once upon blocking:
"Can not load entity:9 failed attempts. Identity is revoked!"
Please remove the Can not load entity: part
- After the 9 attempts if you try for 10th the error shown is just : Can not load identity
Please change to Please restore or authorize your account via another device.
- On the issue its mentioned the error should be 3 incorrect attempts. Try again in xx:xx , but its: Can not load identity: 3 incorrect attempts. Try again in xx:xx .
Please remove the Can not load identity: part.
- When the pin code entering is blocked for 5 mins the error shown is : Can not load entity:Your identity has been locked. Try again in 4 minutes and 55 seconds.
Please remove the Can not load entity: part
NOTE: You can check for other conditions where identity can not be loaded to see if error messages are still OK or not.
- 9 wrong attempts show error error only once upon blocking:
"Can not load entity:9 failed attempts. Identity is revoked!"
Please remove the Can not load entity: part
- After the 9 attempts if you try for 10th the error shown is just : Can not load identity
Please change to Please restore or authorize your account via another device.
- On the issue its mentioned the error should be 3 incorrect attempts. Try again in xx:xx , but its: Can not load identity: 3 incorrect attempts. Try again in xx:xx .
Please remove the Can not load identity: part.
- When the pin code entering is blocked for 5 mins the error shown is : Can not load entity:Your identity has been locked. Try again in 4 minutes and 55 seconds.
Please remove the Can not load entity: part