Commit graph

195 commits

Author SHA1 Message Date
Hasan Ramezani
b60fecc373 Remove remaining items from Django 2.2 2022-01-19 10:58:54 +02:00
Tobias Bengfort
b81c298561 warn about limited django rest framework integration
ref #814
2022-01-18 21:52:46 +02:00
Hasan Ramezani
2c2fdbe0d9 Drop Django < 3.2 support. 2021-12-14 21:29:34 +02:00
Gilad Even-Tov
ae64946a46 Fix small typo 2021-12-07 13:03:14 +01:00
phil-bell
e36665eecf Adding documentation on new http response code setting 2021-08-19 16:02:32 +03:00
Michael O'Connor
170dacc112 Integrate AXS_SENSITIVE_PARAMETERS functionality with AXES_PASSWORD_FORM_FIELD 2021-05-03 17:10:45 +03:00
Michael O'Connor
f54c4f095b Add option to cleanse sensitive GET and POST params in database handler 2021-05-03 17:10:45 +03:00
Aleksi Häkli
5790b09188
Fix docs build settings loading 2021-04-06 22:19:00 +03:00
Aleksi Häkli
50a6baae2a
Add example on custom lockout responses
Fixes #715
2021-03-02 18:52:56 +02:00
Stenkar
ac41aa9135 Fix docs AXES_HANDLER default handler 2021-02-19 10:59:01 +02:00
Aleksi Häkli
b6b26e492f Optimize imports as part of cleanup round 2021-01-07 18:23:33 +02:00
Aleksi Häkli
a5045f62fe Move tests outside project source folder 2021-01-07 18:23:33 +02:00
Aleksi Häkli
de167e43a2
Adjust docs 2021-01-06 15:41:24 +02:00
Aleksi Häkli
9cf239f495
Update 4_configuration.rst 2021-01-05 15:22:04 +02:00
Aleksi Häkli
419478b954
Update DRF documentation
Update old version information and clean up summary table
2021-01-05 10:44:06 +02:00
Daniel Quinn
3baf384060 Add a missing word 2021-01-03 21:57:56 +02:00
Aleksi Häkli
59bcbd8816 Move DRF integration into signals
Add documentation on how to enable the integration
and remove the logic from global middleware.

Fixes #673
2020-12-18 19:42:43 +02:00
Jannis Leidel
9c88dfde54
Remove Travis cruft. 2020-11-26 11:31:02 +01:00
Andrew Arderne
2efdcdd575 Update 3_usage.rst
typo
2020-10-16 00:33:04 +03:00
Daniel Brown
ef39b3da2d Add username to docs of lockout template 2020-10-05 12:42:49 +03:00
Daniel Brown
55c5ce5eae Add cooloff_timedelta to docs of lockout template 2020-10-05 12:42:49 +03:00
Aleksi Häkli
b569cdb991 Deprecate settings.AXES_LOGGER configuration flag
Fixes #634

The Django import system seems to produce errors
in certain configurations and especially when
MIGRATION_MODULES configuration is set globally.

This is most probably caused by misbehaving or cyclic
Python module imports in the Django application
instrumentatation chain that come up when the
MIGRATION_MODULES configuration is altered.

This patch migrates to the standard Python logging system
use and has less overhead and complexity for users as well.

Having a configurable logging prefix does not produce
a lot of benefits and is less flexible than having
all individual module logging configurations accessible
through the module __name__ parameter in Axes.

For example axes.handlers.* or axes.backends.*
are separately configurable in the new scheme
whereas they would have been both bundled under
the AXES_LOGGER log configuration.
2020-09-26 21:44:56 +03:00
David Smith
bf1f4eb360 Changed url() to path()
url() is deprecated in Django 3.1
2020-09-10 21:21:32 +03:00
Aleksi Häkli
f97bf3c592
Improve notes on atomic requests 2020-09-06 00:02:41 +03:00
Timmy O'Mahony
ef1e1b4422 Added note about atomic request related to issue #628 2020-09-05 23:46:14 +03:00
Petr Dlouhý
128d01158c add LOCK_OUT_BY_USER_OR_IP option
store all AccessAttempt records
2020-08-21 17:17:57 +03:00
Petr Dlouhý
c3c2786d57 add reset_request helper function to internalize reset logic into django-axis 2020-08-21 17:17:57 +03:00
Petr Dlouhý
35d6df2502 Update captcha example, add imports and get_ip... 2020-07-03 18:08:04 +03:00
Igor Shevchenko
d6c551cc44 Update docs for AXES_ONLY_ADMIN_SITE 2020-05-22 13:44:07 +03:00
Mark Mishyn
06e00d08f1 Reversion update: handle case when view doesn't have name 2020-01-09 09:31:54 +02:00
Aleksi Häkli
c1d508288d
django-reversion compatibility documentation
Fixes #440
2020-01-08 21:32:17 +02:00
Aleksi Häkli
d3da797020 Add configurable lockout callable
Fixes #511
2020-01-08 21:28:14 +02:00
Paul Brown
de3bf47ee6 Fix typos in 4_configuration.rst 2020-01-06 21:32:16 +02:00
Aleksi Häkli
30556a4d73
Adjust documentation indendation 2019-12-30 00:08:27 +02:00
Aleksi Häkli
34d3b5a1f5
Pluggable user account whitelisting (#549)
Fixes #536
2019-12-29 23:43:55 +02:00
Aleksi Häkli
9d18bfc892 Clarify reverse proxy client IP header use 2019-11-29 00:09:34 +02:00
Eric Carmichael
131b31a0b3 Add special Heroku instructions 2019-11-29 00:09:34 +02:00
Aleksi Häkli
8e972f5d6e
Remove redundant profile check in docs example 2019-11-13 21:49:35 +02:00
Aleksi Häkli
5f56335dcb
Update OAuth2 validator example in docs
Inspired by jazzband/django-oauth-toolkit/issues/712
and solution by @hcNick for more functional authentication
2019-11-13 21:38:12 +02:00
Aleksi Häkli
cd0ac3cb4f
PEP8 formatting 2019-10-15 23:04:29 +03:00
Sakari Kapanen
0a97603cce Add AXES_ENABLE_ADMIN flag to configure showing Axes in admin (#499) 2019-10-09 19:02:45 +03:00
Aleksi Häkli
f40212d818
Update docs headers (#487)
* Update docs headers

* Use django-axes in the GitHub repository README header
2019-08-30 17:40:21 +03:00
Aleksi Häkli
c30b2366cf
Migrate to setuptools_scm 2019-08-28 13:28:57 +03:00
Aleksi Häkli
99a5405b1a Support callables for AXES_COOLOFF_TIME
Fixes #475
2019-08-05 22:02:49 +03:00
Aleksi Häkli
eedf528767
Update docs
Add new management commands and reorder sections logically.
2019-07-09 15:07:27 +02:00
Hasan Ramezani
6f2048f7ca Added AXES_ONLY_ADMIN_SITE flag. 2019-07-09 08:12:33 +02:00
Aleksi Häkli
9c7c5c175a
Add documentation for updated AXES_FAILURE_LIMIT 2019-06-14 17:21:24 +03:00
Aleksi Häkli
dfcc63b2cd
Improve documentation
Improve language for easier readability
Add missing Axes.W004 check code to docs
Update flow image with better diagram language
2019-06-02 13:23:52 +03:00
Aleksi Häkli
9caaf48b81
Update Django Allauth example
Use example from jazzband/django-oauth-toolkit#712
for reference with props to @hcNick for debugging
2019-05-30 17:44:08 +03:00
Aleksi Häkli
17e2d34b68
Update docs for Python 3 syntax 2019-05-30 17:29:45 +03:00
Aleksi Häkli
291ccdf233
Further update login flow diagram 2019-05-28 16:53:56 +03:00
Aleksi Häkli
77bac90c91
Update login flow diagram 2019-05-28 16:45:54 +03:00
Aleksi Häkli
1e796caa31
Improve architecture documentation 2019-05-26 21:30:08 +03:00
Aleksi Häkli
5f08037f78
Tune documentation titles 2019-05-26 17:42:52 +03:00
Aleksi Häkli
572addc84a
Add authentication flow diagram 2019-05-26 17:41:27 +03:00
Aleksi Häkli
67098c4669
Fix configuration list 2019-05-26 17:34:12 +03:00
Aleksi Häkli
5ab820db6a
Update architecture docs for exception handling
Version 5.0.5 migrated from exceptions to request flagging
which alters the internal behaviour slightly.
2019-05-25 21:12:50 +03:00
Aleksi Häkli
4b7650d37d
Improve middleware documentation 2019-05-25 21:04:47 +03:00
Aleksi Häkli
47ae68b0c0 Deprecate AXES_DISABLE_SUCCESS_ACCESS_LOG flag
Fixes #446
2019-05-25 20:45:21 +03:00
Aleksi Häkli
f028c7d2be Clean up docs on configuration flags
Use separate line for default value for readability
2019-05-25 20:45:21 +03:00
Aleksi Häkli
bfccbf0587
Fix typo in docs 2019-05-19 21:23:24 +03:00
Aleksi Häkli
8c2ae49f9a Add compatibility table 2019-05-19 18:32:40 +03:00
Aleksi Häkli
079263e181 Add Django OAuth Toolkit integration example 2019-05-19 18:32:40 +03:00
Aleksi Häkli
25e7d5cfd3 Fix note block syntax in docs 2019-05-19 18:32:40 +03:00
Aleksi Häkli
2e984f9fdd Fix DRF integration links 2019-05-19 18:32:40 +03:00
Aleksi Häkli
1fa76eb526 Improve usage documentation readability 2019-05-19 18:32:40 +03:00
Aleksi Häkli
465fe4529d Include documentation notes 2019-05-19 18:32:40 +03:00
Aleksi Häkli
f9e850fcbd Add instructions on silencing warnings from checks
Fixes #430
2019-05-19 18:32:40 +03:00
Aleksi Häkli
05fe0e306b Improve docs for attempt tracking, resets, and customization
Fixes #433
2019-05-19 18:32:40 +03:00
Aleksi Häkli
3152b4d7e9 Improve lockout and request handling
The old architecture used exceptions in the signal handler
which prevented transactions from running smoothly
and signal handlers from running after Axes handlers.

The new architecture changes the request approach to request flagging
and moves the exception handling into the middleware call method.

This allows users to more flexibly run their own signal handlers
and optionally use the Axes middleware if they want to do so.

Fixes #440
Fixes #442
2019-05-19 18:32:40 +03:00
Aleksi Häkli
816676f68d Add settings flag for disabling Axes
AXES_ENABLED = False can be used to toggle
the plugin off in tests which use the built-in
Django test client login, force_login and logout
methods which do not supply a request views.

Fixes #433
2019-05-07 23:37:48 +03:00
Aleksi Häkli
16f96de8fd
Add changelog to documentation 2019-05-03 21:20:45 +03:00
Aleksi Häkli
7d979e2bdc
Update Python version support information in the docs 2019-05-01 18:38:59 +03:00
Aleksi Häkli
0a90a7d075
Improve documentation 2019-05-01 18:28:29 +03:00
Aleksi Häkli
29d7d769e6 Revert name change for cooloff_time template argument 2019-05-01 14:30:21 +03:00
Aleksi Häkli
d4dc3ba246 Improve documentation
Fixes #410
2019-04-27 18:51:02 +03:00
Aleksi Häkli
0a2620095a Fix typo in docs 2019-04-27 18:51:02 +03:00
Aleksi Häkli
1b3bd0f99e Improve command documentation format 2019-04-27 18:51:02 +03:00
Aleksi Häkli
430946a9d1 Rename AxesBaseHandler to AxesHandler 2019-04-27 18:51:02 +03:00
Aleksi Häkli
43cf2b94aa Add upgrade note for Python language support 2019-04-27 18:51:02 +03:00
Aleksi Häkli
41307e6c55 Add API reference into docs 2019-04-27 18:51:02 +03:00
Aleksi Häkli
3dc69a4f56 Clean up documentation line feeds 2019-04-27 18:51:02 +03:00
Aleksi Häkli
9b895941c8 Add section numbering to documentation 2019-04-27 18:51:02 +03:00
Aleksi Häkli
3bece1aaaa
Set Axes request attributes in middleware
Fixes #415

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-03-03 22:13:13 +02:00
Aleksi Häkli
b55cba78e6
Rename migrating to upgrading in docs
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-03-02 22:40:18 +02:00
Aleksi Häkli
5f61b0ae76
Improve documentation on axes.utils.reset
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-26 13:04:56 +02:00
Aleksi Häkli
ff6cb8bffd
Move utils to helpers module
In order to offer backwards compatible import path for the
axes.utils.reset function it has to have a separate
implementation that can be imported independently from
the axes.helpers functions that are used by the
AxesBaseHandler implementation.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:54:40 +02:00
Aleksi Häkli
e50bbd4701
Enumerate documentation source files
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:35:44 +02:00
Aleksi Häkli
6d8aea8aab
Clean up documentation configuration
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 22:02:31 +02:00
Aleksi Häkli
677d4c48f4
Improve documentation
- Add information on handlers
- Document configuration options and precedences
- Restructure documentation for better readability

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-25 17:04:03 +02:00
Aleksi Häkli
e69d479f6a
Refactor handlers to a more pluggable format
- Define a base handler API with method signatures
- Move proxy handler to a separate path for importability
- Implement a database handler with clean external dependencies
- Change the authentication backend and decorators to use the authentication backend

This enables clean pluggable authentication backend definitions that users
can override and specialize with e.g. cached handlers in their own packages.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-22 19:55:57 +02:00
Aleksi Häkli
139a2b38fb
Update changelog and documentation
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-22 19:55:55 +02:00
Aleksi Häkli
cd56631865
Refactor attempts and add NEVER_LOCKOUT_GET flag
- Move cache and cool off utility functions to the axes.utils module
- Clean up axes.attempts duplicate code in attempt and cache calculations
- Add stable implementation for AccessAttempt attribute calculation
  in the axes.attempts.get_filter_kwargs function

Fixes #398

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-13 18:20:04 +02:00
Aleksi Häkli
a9e9b0d984
Pluggable signal handler backend for lockouts
Implements a proxied API which enables overriding
a handler backend with a user supplied implementation.

Fixes #399

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 22:13:30 +02:00
Aleksi Häkli
fcef40748a
Deprecate old signature for AXES_USERNAME_CALLABLE and update documentation
Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 22:09:21 +02:00
Aleksi Häkli
030810df79
Drop Python 2.7 and Python 3.4 support
Fixes #395

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-07 17:28:26 +02:00
Aleksi Häkli
ecadddbf5d
Improve management commands, docs, and tests
Fixes #362

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Aleksi Häkli
99175dc57f
Use middleware, backends, and signals for lockouts
Fixes #389

Remove monkey-patching from the application loader phase
and use the Django authentication stack for lockout signals.

Utilize custom AUTHENTICATION_BACKENDS and MIDDLEWARE with signals
with backwards compatible implementation of features.

Update documentation, configuration and migration instructions
to match the new configuration and improve the code commentation.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:30 +02:00
Aleksi Häkli
9c328713e7
Use Django checks for cache configuration
Fixes #383

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2019-02-03 16:03:28 +02:00
Aleksi Häkli
7c3e21166e
Backwards compatibility fixes for credentials
Revert some of the PR changes to tests to make sure that all of the
old format function invocations work with the old and new tests.

Implement small enchancements to documentation and credentials resolving
for usability and flexibility with custom authentication backends.

Update documentation to indicate that backwards compatibility
is supported as well as the new format credentials invocations.

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
2018-12-23 02:58:53 +02:00