Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2.2 KiB
MODIFIED Requirements
Requirement: Unlock
The system SHALL let an admin with BO_LOGIN_SECURITY list the usernames of their own company that are locked now, with their failure count, last failure time and when the lock ends, and SHALL let that admin unlock one of them. A super admin SHALL see and unlock locked usernames of every company, including attempts that match no company. Unlocking SHALL save an UNLOCK_RESET record naming the admin who unlocked.
Scenario: Unlock a locked username
- GIVEN INS user
sales1is locked - WHEN an INS admin with
BO_LOGIN_SECURITYunlockssales1 - THEN
sales1no longer appears in the locked list - AND
sales1can sign in with the right password - AND an
UNLOCK_RESETrecord forsales1names the admin
Scenario: Another company's locked user
- GIVEN CV user
sales2is locked - WHEN an INS admin with
BO_LOGIN_SECURITYlists locked users or unlockssales2of CV - THEN
sales2is not listed and the unlock answers 404
Requirement: Lockout and password-rule settings
The system SHALL let an admin with BO_LOGIN_SECURITY read the lockout settings and the admin password rules, and SHALL let only a super admin change them, because they apply to every company. The system SHALL reject a maximum below 1 or above 1000, a period below 1 or above 10000, and a time unit other than S, M, H or D. Password rules SHALL only be edited, never added or removed. Every change SHALL write a log line naming the admin.
Scenario: Change the lockout settings
- WHEN a super admin sets the maximum to 3 and the period to 30 minutes
- THEN the next lock decision in every company uses 3 attempts in 30 minutes
Scenario: Invalid setting
- WHEN a super admin sets the maximum to 0
- THEN the change is refused with a validation error and the settings stay as they were
Scenario: Change a password rule
- WHEN a super admin sets the minimum length rule to 10
- THEN a new password of 9 characters is refused by every admin password check
Scenario: Company user changes settings
- WHEN an INS user with
BO_LOGIN_SECURITYchanges a lockout setting or a password rule - THEN the change is refused with 403 and the settings stay as they were