Commit graph

2213 commits

Author SHA1 Message Date
Éloi Rivard
4fff9fa5a6 Merge branch 'issue-200-uv' into 'main'
Migrate from poetry to uv

Closes #200

See merge request yaal/canaille!187
2024-11-06 15:07:06 +00:00
sebastien
289176a086 replaces 'pwned' by 'compromised' 2024-11-06 15:57:51 +01:00
Éloi Rivard
c57244b9fa
fix: zxcvbn compilation in demo
until https://github.com/fief-dev/zxcvbn-rs-py/issues/2 is fixed, it is
needed to manually force the compatibility with Python 3.13
2024-11-06 15:21:15 +01:00
Éloi Rivard
6a6350e368
fix: with LDAP backend, edition the admin group would fail
The `match_filter` method evaluate filters, and queries objects from their ids.
The value was stored in the `filter` arg, but being a dict it was
re-used during the following calls of `match_filter`.
After editing the `admin` group (by adding or removing an user), a new page is displayed, and as always it checks the user permissions.
The user permission check would call `match_filter` then compare an
updated version of the admin group (with one less or one new user) with
an unfortunate *cached* version in the `match_filter` `filter` arg.
With the SQL or the memory backend the comparision would be successful,
but it is not with the LDAP backend.
This resulted in permission loss for users after editing the `admin`
group. Being a method default value edited, it would remain until the
Canaille service was reloaded.

Related to https://stackoverflow.com/questions/1132941/least-astonishment-and-the-mutable-default-argument
2024-11-06 15:00:57 +01:00
sebastien
56f0c9b51b hotfix api url following manual failed request tests 2024-11-06 13:51:50 +01:00
sebastien
025da08fd3 adds flash message for user when password compromise investigation failed. 2024-11-06 13:05:32 +01:00
sebastien
fa3a5f6616 gets the emails of each admin to send them the compromised_password_check_failure_mail 2024-11-06 12:56:35 +01:00
Éloi Rivard
fe8e1160ab
refactor: move session related methods in a dedicated file 2024-11-06 09:10:43 +01:00
sebastien
b47c949239 adds tests for check if password is compromised or not 2024-11-05 16:59:03 +01:00
sebastien
9708809714 updates file names, variable names to be clearer. 2024-11-05 16:18:45 +01:00
sebastien
ff871f1340 updates tests with compromised password check with api HIBP 2024-11-05 15:44:25 +01:00
sebastien
ca7f718353 adds mail sending to admin if failure of api HIBP request to check if password is compromised 2024-11-05 15:43:15 +01:00
Éloi Rivard
fb5c1bac15
chore: minimum authlib version is 1.3.0 2024-11-05 08:59:24 +01:00
Éloi Rivard
6503945f7a
chore: set minimum pycountry dependency to 23.12.7 2024-11-04 23:21:00 +01:00
sebastien
093397256b fix url typo 2024-11-04 11:15:32 +01:00
sebastien
0acbb40ecd consumes haveibeenpwned API directly 2024-11-04 08:55:55 +01:00
Éloi Rivard
f70b71db18
chore: dependency upgrade 2024-11-02 17:17:13 +01:00
Éloi Rivard
6a57a37377
tests: fix tox python versions 2024-11-02 16:57:52 +01:00
Éloi Rivard
f56d715543
doc: use uv in the RTD compilation 2024-11-01 22:25:22 +01:00
Éloi Rivard
adafa43ddc
chore: use 'uv-venv-lock-runner' as the default tox-uv runner 2024-11-01 14:18:10 +01:00
sebastien yaal
f4e222a24c
Translated using Weblate (French)
Currently translated at 100.0% (380 of 380 strings)

Translation: Canaille/Canaille
Translate-URL: https://hosted.weblate.org/projects/canaille/canaille/fr/
2024-11-01 10:00:27 +01:00
Éloi Rivard
6df18de6e7
fix: quotes around the gitlab yaml variables 2024-10-31 20:08:40 +01:00
Éloi Rivard
45457b3cc9
tests: tox minversions environment use python 3.10 2024-10-31 19:44:41 +01:00
Éloi Rivard
0656811313
chore: set setuptools minimum version to 50.0.0 2024-10-31 19:24:13 +01:00
Éloi Rivard
2a5ca26a59
chore: fix a minimum versions for the development dependencies 2024-10-31 19:05:57 +01:00
Éloi Rivard
3fe501e32e
chore: install cargo in the demo Docker image
this was missing to allow the zxcvbn dependency to compile
2024-10-31 18:58:30 +01:00
Éloi Rivard
ce1ea3f6c3
chore: set a minimum version for coverage 2024-10-31 18:55:12 +01:00
Éloi Rivard
2195c686a6
tests: fix zxcvbn compilation with Python 3.13
temporarily, until this is fixed upstream
https://github.com/fief-dev/zxcvbn-rs-py/issues/2
2024-10-31 18:40:11 +01:00
Éloi Rivard
885ba0f48c
chore: migrate to uv 2024-10-31 09:49:53 +01:00
gallegonovato
8af6263b2f
Translated using Weblate (Spanish)
Currently translated at 100.0% (380 of 380 strings)

Translation: Canaille/Canaille
Translate-URL: https://hosted.weblate.org/projects/canaille/canaille/es/
2024-10-29 23:11:51 +01:00
Hosted Weblate
161293bf53
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Canaille/Canaille
Translate-URL: https://hosted.weblate.org/projects/canaille/canaille/
2024-10-28 22:17:56 +01:00
Éloi Rivard
05cc09ab74 Merge branch 'password-strength' into 'main'
Password strength

See merge request yaal/canaille!182
2024-10-28 21:17:47 +00:00
sebastien yaal
a4bd03f71c feat: password strength indicator 2024-10-28 21:17:47 +00:00
Éloi Rivard
6b5e3e1a8e
fix: py310 unit tests
For some reasons, list["Client"] does not resolve the ForwardRef in
python 3.10 as it does with typing.List["Client"], which in the end
breaks the memory backend model accessors.
2024-10-28 21:41:55 +01:00
Éloi Rivard
0b51b01031
refactor: apply ruff migrations for python 3.10+ 2024-10-28 09:13:00 +01:00
Éloi Rivard
37adb66e06
chore: lower the minimum sphinx version 2024-10-28 08:55:42 +01:00
Éloi Rivard
ebbeb13542
chore: fix pre-commit version in Gitlab CI
Until the docformatter hook is fixed
https://github.com/PyCQA/docformatter/issues/293
2024-10-28 08:51:53 +01:00
Éloi Rivard
e79319110b
doc: remove sphinxcontrib-images
at least until the status_iterator deprecation is solved
https://github.com/sphinx-contrib/images/pull/39
2024-10-28 08:45:30 +01:00
Éloi Rivard
3a3cd304b8
tests: refactor logging tests
add restaure 100% coverage
2024-10-27 21:46:47 +01:00
Éloi Rivard
52031dd2c4
refactor: move logging machinery in its own dedicated file 2024-10-27 13:54:14 +01:00
Éloi Rivard
103c6343be Merge branch 'py313' into 'main'
python 3.13 support

See merge request yaal/canaille!186
2024-10-27 10:25:07 +00:00
Éloi Rivard
08b6ec3a3b
chore: python 3.13 support 2024-10-27 11:21:42 +01:00
Éloi Rivard
ff4a404149
chore: fix pre-commit version
until docformatter hook is fixed
https://github.com/PyCQA/docformatter/issues/293
2024-10-27 11:05:21 +01:00
Éloi Rivard
954ab1cbbb
chore: dependencies update 2024-10-24 09:31:12 +02:00
Éloi Rivard
5dffae8a1e
chore: pre-commit autoupdate 2024-10-23 09:22:24 +02:00
Éloi Rivard
40136fa394 Merge branch '177-security-events-logging-policy' into 'main'
feat: Added security logs for email update, forgotten password mail, token...

Closes #177

See merge request yaal/canaille!185
2024-10-23 07:21:35 +00:00
Félix Rohrlich
603eab0b3c refactor : added proper security logging level and refactored change email logging 2024-10-21 11:17:55 +02:00
Éloi Rivard
d0784075d5
chore: dependencies update
temporary fixed pre-commit version because of
https://github.com/PyCQA/docformatter/issues/293
2024-10-19 18:37:32 +02:00
Éloi Rivard
831517d740
doc: remove sitemap
temporarily, until it does not break RTD builds anymore
https://readthedocs.org/projects/canaille/builds/25905113/
2024-10-19 18:27:49 +02:00
Félix Rohrlich
038e6c094e feat: Added security logs for email update, forgotten password mail, token emission/refresh/revokation, new consent, consent revokation #177 2024-10-14 14:04:39 +02:00