1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/webvirtcloud
catborise c2fea2aa39 feat(accounts): failed logins lock a user for the address they come from
Nothing limited failed logins: a password could be guessed at the speed
the server answers. django-axes (8.3.1, Django 5.2, Python 3.10-3.13)
now counts them.

- A user is locked for the address the failed logins come from
  (username and IP together), so an attacker cannot lock someone out
  from elsewhere and users behind one NAT address do not share a lock.
  A successful login resets the count. axes sits in front of every
  authentication: the login page with or without OTP, LDAP and the API.
- The number of failed logins (default 5) and the lock time in minutes
  (default 15) are on the Settings page (LOGIN_FAILURE_LIMIT,
  LOGIN_LOCKOUT_MINUTES, added by migration appsettings.0014) and apply
  at once; an invalid value falls back to the default. Unlock with
  "manage.py axes_reset_username <username>".
- Behind the bundled nginx every request comes from 127.0.0.1; the
  client address is read from X-Real-IP, which nginx sets, but only for
  requests from a loopback address or from LOGIN_TRUSTED_PROXIES, so a
  forged header does not escape a lock.

settings.py.template gets the app, middleware, backend and AXES_*
settings; README tells existing installations what to copy. Tests that
call client.login now pass a request, which the axes backend needs.
The new tests fail with axes disabled.
2026-10-06 11:05:03 +03:00
..
js_tests fix(instances): pages poll one request at a time, and not while hidden 2026-10-05 16:55:50 +03:00
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
asgi.py fix references to django 3 migration 2021-06-15 14:29:20 +03:00
common_tags.py fix: render the 404 page for logged-in users 2026-10-04 01:08:11 +03:00
middleware.py fix: connection errors on VM actions name the host only to administrators 2026-10-06 10:08:48 +03:00
serializers.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
settings-dev.py add white noise for static_root/staticfiles_dir problem for debug/non-debug running mode 2023-11-10 16:29:48 +03:00
settings.py.template feat(accounts): failed logins lock a user for the address they come from 2026-10-06 11:05:03 +03:00
test_api_schema.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
test_authorization_matrix.py fix(datasource): cloud-init endpoints work without login, keys need a unique name 2026-10-04 20:46:15 +03:00
test_child_processes.py fix: stop ignoring SIGCHLD process-wide 2026-10-04 13:40:53 +03:00
test_common_tags.py fix: render the 404 page for logged-in users 2026-10-04 01:08:11 +03:00
test_connection_errors.py fix: connection errors on VM actions name the host only to administrators 2026-10-06 10:08:48 +03:00
test_icon_cache.py fix: every icon of the templates comes from the local icon cache 2026-10-05 20:20:57 +03:00
test_poll_js.py fix(instances): pages poll one request at a time, and not while hidden 2026-10-05 16:55:50 +03:00
urls-api.py fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
urls.py feat(api): migrate API documentation from drf-yasg to drf-spectacular 2026-09-25 08:08:36 +03:00
wsgi.py fix: stop ignoring SIGCHLD process-wide 2026-10-04 13:40:53 +03:00
wsgi_custom.py fix references to django 3 migration 2021-06-15 14:29:20 +03:00