Look into a locked account
When a user is locked out, read the failed sign-ins and the lockout behind it, with why each attempt failed and when, to tell mistyping from someone else trying.
API
maya calls the help desk: she can’t sign in. Before anything is reset, you want to know whether she mistyped her
password a few times or someone else has been trying it. Her trail holds every failed sign-in against her account,
with why each one failed and when, and the lockout records show when the account was locked.
Before you start: you hold READ on the realm (RealmViewer is enough), and are signed in with your session in
$CVYUH_SESSION (Call the API shows how).
What the user sees
Section titled “What the user sees”After repeated wrong passwords or codes, maya’s sign-in is refused even with the right password, until the lock
ends. If your realm warns users, she was told how many attempts were left before it locked. See
Lockout.
Read the attempts
Section titled “Read the attempts”-
Look up her
id:Terminal window curl https://foobar.cvyuh.com/api/v0/am/objects/v1/user/maya \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" -
Read her trail, newest first:
Terminal window curl "https://foobar.cvyuh.com/api/v0/am/audit/v1/trail?person=<maya's id>&pageSize=100" \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" -
In
events.data, find theLOGIN_FAILEDrecords. Each has itseventTime, the name as it was typed incontext.name, and why it failed incontext.code:context.codeMeans AUTH_INVALID_PASSWORD,AUTH_INVALID_PASSWORD_WARNEDA wrong password or code AUTH_MAX_ATTEMPTSThe attempt that locked the account AUTH_USER_LOCKEDAn attempt while it was locked -
Read the lockout records. They are kept under the name she signs in with, in lower case, rather than her id:
Terminal window curl "https://foobar.cvyuh.com/api/v0/am/audit/v1/trail?person=maya&pageSize=100" \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"AUTH_FAILURE_RECORDEDis each failure counted,ACCOUNT_LOCKEDthe moment the account locked, andLOCKOUT_CLEAREDthe count cleared by a successful sign-in. -
Compare the times. A few failures close together, then a successful
LOGIN, read as mistyping. Many failures spread over hours, attempts that keep coming while the account is locked (AUTH_USER_LOCKED), or the name typed in forms she doesn’t use, read as someone else trying her password.
Check it worked
Section titled “Check it worked”Once she signs in again, a LOGIN record with "result": "SUCCESSFUL" is on her trail, and a LOCKOUT_CLEARED
record on the name read. A lock that simply runs out writes no record of its own.
Undo it
Section titled “Undo it”Nothing to undo: reading the trail changes nothing. If someone else has been trying her password, have her change it once she is back in, and consider a second sign-in step for her.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
No LOGIN_FAILED records under her id | The name typed didn’t match her account | Read by the name typed, in lower case, as in step 4 |
No ACCOUNT_LOCKED on her trail | Lockout records are kept under the name, not her id | Step 4 |
The step 4 read shows attempts for Maya and MAYA together | Names are counted in lower case | Expected: they are one account’s attempts |
403 | You don’t hold READ on the realm | Ask for RealmViewer |
Related
Section titled “Related”- Lockout: what locks an account, and the settings.
- Record fields and examples: a failed sign-in’s record, field by field.
- Read a user’s or agent’s trail: paging and who may read.