• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 28034696683
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 23 Jun 2026 02:54PM UTC
Jobs 10
Files 887
Run time 3min
Badge
Embed β–Ύ
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Jun 2026 02:49PM UTC coverage: 81.612% (+0.003%) from 81.609%
28034696683

push

github

web-flow
feat(auth): add failed login attempts DEV-2276 (#7166)

### πŸ“£ Summary
Added application-level logging for failed login attempts and exposed
them in the access logs UI and API

### πŸ“– Description
Failed authentications are tracker similar to how successful logins are
recorded, using audit logs. It also tracks failed logins for
non-existent accounts to help identify automated attacks (e.g. repeated
attempts across random usernames from a single IP).

* For this it hooks into Django's user_login_failed signal to create
AccessLog entries with a new AUTH_FAILED action. Safely handles
instances without an attached HTTP request or user object
* Updated AccessLogSerializer to expose the new action attribute. For
non-existent accounts where the user relationship is null, it falls back
to exposing the attempted_username stored in the metadata
* Updated OpenAPI outputs and TypeScript models to include action. Added
a "Status" column to the AccessLogsSection component table to clearly
distinguish between Success and Failed logins.

### πŸ‘€ Preview steps
1. Log into your account and navigate to Account Settings -> Security
2. Open an incognito window and attempt to log in with your valid
username but an incorrect password
3. Attempt to log in again using a non-existent username
4. Refresh the Security page on your active session. In the Recent
account activity table, you should see your failed attempt marked as
"Failed" under the new Status column.
5. Query the /api/v2/access-logs/ endpoint and verify that the failed
login for the non-existent account was also successfully logged and
tracked.

---------

Signed-off-by: Guillermo <lgar89@gmail.com>
Co-authored-by: Olivier LΓ©ger <olivierleger@gmail.com>

9074 of 12315 branches covered (73.68%)

35 of 50 new or added lines in 5 files covered. (70.0%)

1 existing line in 1 file now uncovered.

29812 of 36529 relevant lines covered (81.61%)

5.56 hits per line

Uncovered Changes

Lines Coverage βˆ† File
10
74.0
-17.67% kobo/apps/audit_log/serializers.py
5
54.17
0.79% kobo/apps/audit_log/models.py

Coverage Regressions

Lines Coverage βˆ† File
1
54.17
0.79% kobo/apps/audit_log/models.py
Jobs
ID Job ID Ran Files Coverage
1 28034696683.1 23 Jun 2026 02:54PM UTC 883
44.92
2 28034696683.2 23 Jun 2026 02:54PM UTC 883
50.18
3 28034696683.3 23 Jun 2026 02:54PM UTC 883
53.52
4 28034696683.4 23 Jun 2026 02:55PM UTC 885
51.53
5 28034696683.5 23 Jun 2026 02:56PM UTC 885
46.31
6 28034696683.6 23 Jun 2026 02:56PM UTC 885
54.8
7 28034696683.7 23 Jun 2026 02:57PM UTC 883
59.55
8 28034696683.8 23 Jun 2026 02:58PM UTC 885
66.5
9 28034696683.9 23 Jun 2026 02:58PM UTC 885
60.73
10 28034696683.10 23 Jun 2026 02:59PM UTC 887
68.84
Source Files on build 28034696683
  • Tree
  • List 887
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage βˆ† File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2ec0c76f on github
  • Prev Build on release/2.026.25 (#27698100389)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc