Commit Graph

2213 Commits

Author SHA1 Message Date
Benjamin Dauvergne dc3e09d9ea Prepare release 2.1.13 2015-03-23 17:25:46 +01:00
Benjamin Dauvergne 2d8fbdcd53 ldap: update block saved in LDAP users objects with default values (#6784)
If a session is older thant the last upgrade then it can happend that
user.block miss keys which are now mandatory and have a default value.
To be sure those keys exist we update the block with default value each
time it is used, i.e. in LDAPUser.get_connection().
2015-03-23 17:13:14 +01:00
Benjamin Dauvergne 22d382e27a Optimize queries in SamlBackend.service_list()
Homepage was making too many queries when there are a lot of service
providers, for example when the IdP is part of a federation.
2015-03-23 17:12:59 +01:00
Benjamin Dauvergne 96ab51e357 In get_sp_options_policy() and get_idp_options_policy() cache query for default and all queries 2015-03-23 17:12:59 +01:00
Benjamin Dauvergne d69eec9e20 Add decorator to cache function results in request
It should be used to cache queryset result that can be reused during the
same request.
2015-03-23 17:12:59 +01:00
Benjamin Dauvergne 9b23610a01 Fix missing distribution of locales and tempaltes for authentic2_idp_cas 2015-03-13 16:10:11 +01:00
Benjamin Dauvergne e878ad3c14 Prepare release 2.1.12 2015-03-13 16:08:01 +01:00
Benjamin Dauvergne dba9e5e3ba Generate version only from git tags 2015-03-13 16:08:01 +01:00
Benjamin Dauvergne e30917ed40 Reorder migrations of the saml application 2015-03-13 15:40:06 +01:00
Benjamin Dauvergne dc70e960e1 ldap: fix logging call 2015-03-13 14:15:57 +01:00
Benjamin Dauvergne 7a9423e6ed Do not pass homepage url through settings, use variables set in the template context by a template context processor (refs #6690) 2015-03-13 12:06:27 +01:00
Serghei Mihai f41a12ba9a login label updated when email authentication enabled (6669) 2015-03-12 11:21:11 +01:00
Benjamin Dauvergne 6b9606a2c0 Support variable MANAGER_HOMEPAGE_URL and MANAGER_HOMEPAGE_TILE for the first element of the manager breadcrumb (fixes #6690)
The goal is to ease integration of A2 manager in an administration
portal by permitting global navigation between sites.
2015-03-11 15:10:02 +01:00
Benjamin Dauvergne c38ee5e7c6 Add created filed to SamlKeyValue to permit expiration of stored values (fixes #5639)
This commit also set the default manager to be the ExpireManager.
2015-03-11 15:08:42 +01:00
Benjamin Dauvergne d5675f2540 Add an ExpireManager to share common code around expiration of models (refs #5639) 2015-03-11 15:08:42 +01:00
Benjamin Dauvergne 1d6a4d9e15 Remove LibertyFederation model (refs #5639)
The model is unused since commit df00c9d6c8.
2015-03-11 15:08:42 +01:00
Benjamin Dauvergne 4df0d05f4c Add missing newline in translations that broke msgfmt 2015-03-10 14:57:11 +01:00
Benjamin Dauvergne 6f4c045408 Deactivate custom csrf view for tests 2015-03-10 14:53:13 +01:00
Frédéric Péters 5907b85caf update French translation 2015-03-10 13:23:47 +01:00
Benjamin Dauvergne f257370779 Use new CSRF cookie validation on login view (refs #5617) 2015-03-10 12:47:35 +01:00
Benjamin Dauvergne 8fd5446dc0 Update french translation (fixes #5617) 2015-03-10 12:47:20 +01:00
Benjamin Dauvergne 0baa91cf25 Use new mixin on registration view to show a form error on CSRF token validation error instead of a redirect (refs #5617) 2015-03-10 12:47:15 +01:00
Benjamin Dauvergne 31c743d879 Allow validation of CSRF cookie to be done in view using a CBV mixin or an helper function (refs #5617)
Use the CBV for a do-nothing use or on a function based view you must
apply the decorators @csrf_exempt and @ensure_csrf_cookie on your view
(in this order) and use utils.csrf_token_check(request, form) to check
for the cookie before validating your form.
2015-03-10 12:47:15 +01:00
Benjamin Dauvergne 25ef99ffae Use setting CSRF_FAILURE_VIEW to prevent user seeing 403 on CSRF failure, instead redirect them to the same page and display a warning (refs #5617) 2015-03-10 12:47:15 +01:00
Serghei Mihai 28a158144a registration tests updated to new settings (#6661) 2015-03-10 11:07:10 +01:00
Serghei Mihai 7de4f82778 email authentication enabled by default
Closes #6658
2015-03-10 09:26:16 +01:00
Serghei Mihai 4b746622f8 locale: french translation for registration backend 2015-03-09 18:20:44 +01:00
Serghei Mihai 8a97dddf1e typo fix on login choices page (#6634) 2015-03-09 18:16:46 +01:00
Serghei Mihai a025418232 first and last names mandatory on registration (#6653) 2015-03-09 17:08:34 +01:00
Serghei Mihai 433737b162 user fullname prefixed by account number on login choices page (#6634)
Accounts ordered by join date in order to have coherent indexes
2015-03-09 15:36:36 +01:00
Serghei Mihai 1051624fd7 auth model backend path fix (#6635) 2015-03-09 15:36:36 +01:00
Serghei Mihai e9d6739020 limit username to 30 chars (#6636) 2015-03-09 15:36:36 +01:00
Benjamin Dauvergne a838d08d1d Only remove the opened session cookie when the feature is activated (#6265) 2015-03-09 11:48:43 +01:00
Benjamin Dauvergne ab50dcee8b Use a valid python identifier for lable of SAML 2.0 IdP AppConfig (#6518) 2015-03-06 16:01:20 +01:00
Benjamin Dauvergne 6b48ab8744 Fix OpenID 2.0 IdP migrations since the application was renamed 2015-03-02 14:59:51 +01:00
Benjamin Dauvergne 5f018c79ce Fix use of the logout view by SAML 2.0 IdP 2015-03-02 13:56:53 +01:00
Benjamin Dauvergne 976ab8e2e4 Remove Ticket.identifier from the admin, the field has been removed 2015-03-02 12:28:11 +01:00
Benjamin Dauvergne 9b958d3133 Add a CAS IdP module
fixes #6396
2015-03-01 23:11:16 +01:00
Benjamin Dauvergne b8716b93c9 Makes make_url() accepts a fragment in the base url 2015-03-01 22:28:44 +01:00
Benjamin Dauvergne e927faf05b Makes registration tests pass without network 2015-03-01 22:28:44 +01:00
Benjamin Dauvergne 69df3702fc Add helper methods to normalize attributes values
- normalize_attribute_values() take a list of value, stringify them and
  remove duplicate values.
- attribute_values_to_identifier() verifies that value list is valid for
  building and identifier.
2015-03-01 22:28:43 +01:00
Benjamin Dauvergne a73adab5ad Move to_list() and to_iter() in utils.py 2015-03-01 22:28:43 +01:00
Benjamin Dauvergne ab3dd57e14 Add a helper method to retrieve the user from a session given the session key 2015-03-01 22:28:43 +01:00
bdauvergne 8dd988ac11 Make compile_translations target of setup.py compatible with Django 1.7 2015-03-01 22:28:43 +01:00
bdauvergne 4d15508a9a Add helper method check_session_key() to verify that session is still valid 2015-03-01 22:28:43 +01:00
Benjamin Dauvergne e0db633001 Refactor SAML 2.0 SP initiated slo to use the refactored logout view 2015-03-01 22:28:43 +01:00
Benjamin Dauvergne 15d87d5a0b Rename idp/logout.html template to authentic2/logout.html 2015-03-01 22:28:42 +01:00
Benjamin Dauvergne ef59354e04 Refactor the logout view
Now a request for logout coming from an unknown site, i.e. not the same
origin will show a form for confirmation by user.

IdP module must re-use the view and not redirect to it if they want to
skip the confirmation when requests are checked.
2015-03-01 22:28:42 +01:00
Benjamin Dauvergne 581f34dd23 Add check_referer() helper method to check that referer match the current domain
This function must be used when a GET can accomplish some action, for
example a logout view.
2015-03-01 22:28:42 +01:00
Benjamin Dauvergne 0bee142df0 Create a ModelAdmin mixin for adding a default cleanup action to any model admin 2015-03-01 22:28:42 +01:00