Commit Graph

1767 Commits

Author SHA1 Message Date
Benjamin Dauvergne 0b1e9b9dd6 bump release to 2.1.4 2014-07-15 16:20:27 +02:00
Benjamin Dauvergne d30a8f5d7e hashers: add hashers compatible with OpenLDAP 2014-07-15 16:16:21 +02:00
Benjamin Dauvergne 9ee8a2f1cc bump release to 2.1.3 2014-07-15 13:06:31 +02:00
Benjamin Dauvergne a2c2ade6af registration_backend/views: fix registration of new users
Extra attributs must not be saved in the user model.
2014-07-11 10:38:37 +02:00
Benjamin Dauvergne aedcb83bce management: add missing __init__.py files 2014-07-11 10:12:23 +02:00
Jérôme Schneider 720e2d41fe middleware: fixes OpenedSessionCookieMiddleware middleware 2014-07-10 16:00:04 +02:00
Benjamin Dauvergne df8075399b saml: do not configure choice for attribute names at the model level as it breaks model validation before running migrations 2014-07-09 13:50:09 +02:00
Benjamin Dauvergne ed76842bd5 management: add new command clean-unused-accounts
This command takes one required argument the number of days before
deleting an account. Accounts not logged since this number of days are
sent an email using templates,
authentic2/unused_account_delete_subject.txt and
authentic2/unused_account_delete_body.txt and are deleted using the
DeletedUser model, to allow for mass deletion and actions on deletion.
The template receives two variable: user and the days threshold.

The --alert-thresholds parameter allow to set threshold in days after
which accounts will receive an alert email warning people of the future
deletion of their account. Alert thresholds are given as a comma
separated list of days count, each days count must be inferior to the
delete threshold. The mail templates are
authentic2/unused_account_alert_subject.txt and
authentic2/unused_account_alert_body.txt. The template receives three
variable: user, the current alert threshold and the remaining days
before reaching the delete threshold.

You can limit cleaning to only some kind of accounts using the --filter
option, for example --filter groups__name="Online registration" will
limit the cleaning to accounts in the "Online registration" group.

The --fake option will only print actions done and will not send emails
or delete accounts.

The --period option is the number of days between two runs of the
clean-unused-accounts command, it defaults to one day.
2014-07-08 14:52:37 +02:00
Benjamin Dauvergne 02f3a2bae8 forms: allow ordering of fields on profile page 2014-07-08 10:15:33 +02:00
Benjamin Dauvergne 56592e6ac3 middleware: do not reset root logger to level 0 2014-07-07 18:26:49 +02:00
Benjamin Dauvergne 69514f9e3c run.sh: do not make DEBUG=1 a default 2014-07-07 17:19:21 +02:00
Benjamin Dauvergne ad4d83e822 settings: do not disable existing loggers, it's clear now that it is wrong 2014-07-07 16:56:21 +02:00
Benjamin Dauvergne 6c20a1a064 ldap_backend: replace dn lookup by an external_id lookup
The external_id template can be specified using external_id_tuples. Each
tuple list the attributes to concatenante to build the external id.
Attributes are urlencode then joined using a space character. If you add
the ':unquote' suffix to an attribute name it will not be urlencoded,
but you must be sure it's always an ASCII string without any space.

The new setting clean_external_id_on_update indicate to clean all other
existing external id for an user after linking the user to an external
id.

All use of UserExternalId is supported by the default configuration of:

	external_id_tuples=(('dn:unquote',),),

to migrate to a new way of building the external id just define:

	external_id_tuple=(('my', 'new', 'tuple), ('dn:unquote',)),

The first tuple is used to canonicalize the external id of a found or
newly created user. The other tuples are only used to lookup existing
users, so that you can safely migrate from an old way of building the
external_id to a new one.

On AD the following configuration gives a permanent external id:

 external_id_tuple=(('objectGUID',),)

On OpenLDAP:

 external_id_tuple=(('entryUUID',),)
2014-07-07 16:07:40 +02:00
Benjamin Dauvergne 2383d81f73 ldap_backend: fail cleanly when attribute retrieval fails and log an error 2014-07-07 16:07:39 +02:00
Benjamin Dauvergne a5172a5259 ldap_backend: add dn to the attribute dict 2014-07-07 16:07:39 +02:00
Benjamin Dauvergne 7dcd2ad257 ldap_backend: remove redefinition of LDAPBackendError 2014-07-07 15:15:07 +02:00
Benjamin Dauvergne a5351585bf models: add string cast to UserExternalId 2014-07-07 15:09:05 +02:00
Benjamin Dauvergne 79e6f3d007 registration_backend/forms: use A2_REGISTRATION_FIELDS to reorder fields in the registration form 2014-07-04 16:29:58 +02:00
Benjamin Dauvergne 383b7763f1 idp/locale: update french translations 2014-07-04 16:02:40 +02:00
Benjamin Dauvergne d655013b8e locale: grammar correction 2014-07-04 15:55:40 +02:00
Benjamin Dauvergne c1a4f932ec admin: show attribute name in listing of attribute definitions 2014-07-04 15:21:54 +02:00
Benjamin Dauvergne 33f533fb80 attribute_kinds: remove siret attribute which is too specific 2014-07-04 11:42:30 +02:00
Benjamin Dauvergne d870b239dc attribute_kinds: pick attribute kinds from settings 2014-07-04 11:41:49 +02:00
Benjamin Dauvergne c86342783f compat: add settings to add user model fields to the registration form
A2_REGISTRATION_FIELDS list additional fields for the form
A2_REGISTRATION_REQUIRED_FIELDS list fields that must be required
2014-07-04 10:27:47 +02:00
Benjamin Dauvergne 4c2ca1e29e settings: load /etc/authentic2/config.py if available 2014-07-02 19:38:00 +02:00
Benjamin Dauvergne 95e407a783 context_processors: add settings.TEMPLATE_VARS in template context
It's better to remove configuration from templates.
2014-07-02 16:26:39 +02:00
Benjamin Dauvergne 83a0d42b05 fix_user_model: fix username length check also in overriden forms 2014-07-02 16:26:39 +02:00
Benjamin Dauvergne fcd2259be1 fix_user_model: fix widget maxlength attribute 2014-07-02 15:20:53 +02:00
Benjamin Dauvergne b50e22f30a fix_user_model: fix also username length in user change and creation forms 2014-07-02 10:12:59 +02:00
Benjamin Dauvergne 85c24a59a6 middleware: add a middleware to install a cookie when the user has an open session
fixes #5043
2014-06-30 15:18:00 +02:00
Frédéric Péters 9b878e57b2 templates: fix back link closing tag
fixes #4983
2014-06-30 09:21:56 +02:00
Frédéric Péters f4fdc4e1b9 saml: use GET binding when the HTTP method is HEAD
fixes: #4987
2014-06-30 09:20:35 +02:00
Benjamin Dauvergne 5d3b8002be fix_user_model: patch directly the user model 2014-06-27 16:44:14 +02:00
Benjamin Dauvergne fa537219e5 fix_user_model: importing django.contrib.auth.forms inside a function does not work 2014-06-27 16:12:25 +02:00
Benjamin Dauvergne a26d3aef7e fix_user_model: also fix admin forms when changing validation regex for username 2014-06-27 15:42:32 +02:00
Benjamin Dauvergne 1fcee43803 views: add a logged-in jsonp web service
Security is obtained through the Referer header.
2014-06-18 22:29:30 +02:00
Benjamin Dauvergne b0af1b647c idp/saml/saml2_endpoints: fix typo 2014-06-16 20:03:18 +02:00
Benjamin Dauvergne 74765bbea6 idp/saml/saml2_endpoints: in add_attributes add debug log of attribute values 2014-06-16 20:00:05 +02:00
Benjamin Dauvergne 080f5bdef0 idp/saml/saml2_endpoints: in add_attributes() fix query for SAML2Attribute objects 2014-06-16 19:59:54 +02:00
Benjamin Dauvergne 0ecad21d62 attributes_ng/source/django_user: add missing attribute django_user_identifier 2014-06-16 18:05:18 +02:00
Benjamin Dauvergne a4dbd4de7f saml/admin: explicitely list fields to show on change form 2014-06-16 17:52:00 +02:00
Benjamin Dauvergne df00c9d6c8 idp/saml: add attribute to assertions based on new attribute definitions 2014-06-16 17:52:00 +02:00
Benjamin Dauvergne 20362c3e0e saml/admin: add inline admin forms for SAML attribute definitions 2014-06-16 17:52:00 +02:00
Benjamin Dauvergne 0fb3681d7d saml: add attribute definition model 2014-06-16 17:52:00 +02:00
Benjamin Dauvergne 0965fbd9f8 start new attributes-ng subproject 2014-06-16 17:52:00 +02:00
Benjamin Dauvergne 97b819f4c6 attribute_aggregator/user_profile: only set attributes from user model fields if get_attributes() did not return an equivalent value 2014-06-16 10:57:53 +02:00
Benjamin Dauvergne 203e7af73f fix_user_model: allow overriding django User model username regex validator and help text 2014-06-16 10:19:44 +02:00
Frédéric Péters e48714a6fe makes sure msg is defined before asserting on it 2014-06-13 12:59:55 +02:00
Benjamin Dauvergne 5008e25808 registration/views: fix n-th misuse by me of get_or_create() 2014-06-04 10:20:47 +02:00
Benjamin Dauvergne e23a700c7f add setting A2_REGISTRATION_GROUPS to affect default groups to self-registered users 2014-06-03 22:31:24 +02:00