Commit Graph

30 Commits

Author SHA1 Message Date
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 1e02302fd9 python3: get metadata from URL as a string 2018-04-05 14:38:36 +02:00
Frédéric Péters 401b65f8b3 python3: adjust unicode usage 2018-04-05 14:29:55 +02:00
Frédéric Péters 7df3a6f5e0 python3: don't use iteritems 2018-04-05 14:25:54 +02:00
Frédéric Péters d342971a45 python3: use open() to open files 2018-04-05 14:25:54 +02:00
Benjamin Dauvergne be791d54a8 set a default value for IDENTITY_PROVIDERS ((fixes #20221) 2018-03-07 18:09:44 +01:00
Benjamin Dauvergne b66a974922 do not raise ImproperlyConfigured on acces to app_settings.IDENTITY_PROVIDERS (fixes #20221) 2018-03-07 16:54:19 +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
Frédéric Péters 343be40b6f misc: update exception handling for Python 3 (#20925) 2017-12-30 11:53:31 +01:00
Frédéric Péters dada4e8242 add logging of IdP SAML responses and looked up users (#14056) 2016-11-23 13:09:01 +01: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 ec27553789 adapters: factorize user creation in lookup_user() (fixes #10164)
User creation can have peculiarities.
2016-03-02 17:39:15 +01:00
Benjamin Dauvergne 8961a743f5 move idp settings building in adapters 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 359a2f4be0 reset is_staff when superuser mapping fails (fixes #9736) 2016-01-21 20:02:34 +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
Benjamin Dauvergne 6b4cabdc27 adapters: fix DefaultAdapter.get_idp(), idp['ENTITY_ID'] is a string not a list
This method was incorrectly using the `in' operator instead of the == operator.

fixes #7270
2015-05-18 16:35:48 +02:00
Benjamin Dauvergne 1f56211c2f Limit username to 30 characters for now (#7085) 2015-05-07 11:32:53 +02:00
Benjamin Dauvergne 86a1167b99 add a model to store user<->NameID mapping (#7085) 2015-05-07 11:32:52 +02:00
Frédéric Péters 40a31aba9e save provisioned users (#6667) 2015-03-16 10:40:35 +01:00
Benjamin Dauvergne 9525e29b03 Always use adapters to get to IdP settings 2015-02-13 18:10:51 +01:00
Benjamin Dauvergne 9376d444d4 adapters: force template string to be unicode as attributes are unicode values 2015-02-04 12:48:08 +01:00
Benjamin Dauvergne f33ab053d4 adapters: add implementation of get_idp() to the DefaultAdapter class 2014-09-03 09:12:01 +02:00
Benjamin Dauvergne e5e9dcf86a rename get_parameter() to get_setting() 2014-09-03 09:12:01 +02:00
Benjamin Dauvergne a1646489e2 first commit 2014-04-30 14:34:39 +02:00