Commit Graph

32 Commits

Author SHA1 Message Date
Benjamin Dauvergne e57fea6e5c misc: add Secure flag to cookies (#90240)
gitea/django-mellon/pipeline/head This commit looks good Details
It is required by the SameSite=None flag.

   https://developer.mozilla.org/fr/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
2024-05-02 10:29:44 +02:00
Benjamin Dauvergne af81da4954 adapters: do not log errors on cold cache (#84933)
gitea/django-mellon/pipeline/head This commit looks good Details
Only log errors if the cache is older than 24 hours.
2024-01-16 12:41:25 +01:00
Benjamin Dauvergne 0f7044e7a0 adapters: do not exclude already linked users (#76083)
gitea/django-mellon/pipeline/head This commit looks good Details
When two IdP are used with common directory accounts of if we migrate
from a test IdP to a production IdP, it can be useful to relink existing
users to the new source.
2023-04-01 17:32:39 +02:00
Paul Marillonnet e27bafd8cb handle long attribute truncate variations between django2 & 3 (#64309) 2022-04-20 15:01:59 +02:00
Benjamin Dauvergne 73bfa476ef drop and rename issuer field (#56819) 2021-09-15 16:55:59 +02:00
Benjamin Dauvergne 2d1510aae1 adapters: truncate username to the field's max_length (#56482) 2021-08-30 15:29:37 +02:00
Benjamin Dauvergne 4729ef9a3b apply isort and pyupgrade (#55990) 2021-08-05 11:13:19 +02:00
Benjamin Dauvergne 472ce61844 adapters: improve log messages (#55544)
- add mellon: prefix to all messages
- log all failures at the warning or error level instead of debug
2021-07-13 12:09:12 +02:00
Benjamin Dauvergne 5b9bc1ff57 trivial: apply black (#51575) 2021-03-02 14:52:10 +01:00
Benjamin Dauvergne 672cfb90a4 adapters: report warning about TRANSIENT_FEDERATION_ATTRIBUTE to user (#51568) 2021-03-02 14:47:56 +01:00
Benjamin Dauvergne ab92ca9a07 use unicode_literals (#34008) 2019-07-02 17:44:03 +02:00
Benjamin Dauvergne 39e2e7e5ac update and cache metadata from URL and path (#10196) 2019-06-18 00:53:01 +02:00
Benjamin Dauvergne 83a09d874e code style (#10196) 2019-06-18 00:53:01 +02:00
Benjamin Dauvergne 31015e6580 add user lookup by attributes (#33739) 2019-06-11 16:46:02 +02:00
Paul Marillonnet 349a4ec3bc skip test if number of concurrent connections above default pg limit (#25252) 2018-07-18 18:07:24 +02:00
Frédéric Péters edb09ed8fd use force_text for python2/3 compatibility (#24139) 2018-05-29 12:21:13 +02:00
Frédéric Péters d342971a45 python3: use open() to open files 2018-04-05 14:25:54 +02:00
Benjamin Dauvergne f1af12e6a1 tests: prevent "Database is locked" error during concurrency test (fixes #19678)
SQLite has a default timeout of 5 seconds, we augment it to 400 seconds. We also
replace our custom thread pool by the one provided by multiprocessing.
2018-03-12 14:27:27 +01:00
Benjamin Dauvergne 6c528dd2c3 Revert "support federation file loading (#19396)"
This reverts commit 63993e360c.
2018-01-09 21:43:25 +01:00
Paul Marillonnet 63993e360c support federation file loading (#19396) 2018-01-09 17:50:25 +01:00
Benjamin Dauvergne 83388d396c tests: replace unmaintained pytest-capturelog by its maintained fork pytest-catchlog 2017-03-22 23:06:50 +01:00
Benjamin Dauvergne 958cb65acd tests: use dummy metadata from lasso, starts tests of SSO/SLO (fixes #11476) 2016-06-22 11:06:20 +02:00
Benjamin Dauvergne 49a5254363 allow federating transient NameID using an attribute (fixes #10619) 2016-04-27 09:22:05 +02:00
Benjamin Dauvergne 6aa9170982 Fix removal of admin right when users have admin attributes but is already admin (fixes #10195) 2016-03-04 10:07:54 +01:00
Benjamin Dauvergne afd7d519ec tests: remove unused variable 2016-02-26 18:09:27 +01:00
Benjamin Dauvergne 9fe8aaf0be adapters: improve logging during provisionning
- user creation is logged
- attributes are only changed if different from the provisionning value,
  and changes are logged.
2016-02-26 18:09:27 +01:00
Benjamin Dauvergne fc7fd250cd pep8ness 2016-02-12 19:44:19 +01:00
Benjamin Dauvergne e641c6ec96 fix concurrency error when creating new users (fixes #9965)
UserSAMLIdentifier is retrieved using get_or_create() first, and if is new
we proceed with the creation of the new user, otherwise we delete the temporaru
user we created use the one attached to the existing UserSAMLIdentifier.
2016-02-12 19:44:19 +01:00
Benjamin Dauvergne e18dd7c7e5 adapters: prevent collision in provision_groups() (fixes #9327)
Assiging related m2m fields provokes a bulk insert which is not safe with
respect to concurrent writes, we replace this by use of get_or_create() and
delete() on the through model of the User.groups field.
2015-12-15 10:52:10 +01:00
Benjamin Dauvergne b1b0494ccc adapters: truncate attributes assigned to user fields (fixes #7907) 2015-07-22 16:22:59 +02:00
Frédéric Péters eac5d90da8 tests: adapt to usernames cut at 30 characters 2015-05-07 11:32:53 +02:00
Frédéric Péters 0315d395bf tests: initial adapter tests 2015-05-07 11:32:53 +02:00