Projet

Général

Profil

Development #69720

auth_saml: refaire fonctionner le SLO

Ajouté par Benjamin Dauvergne il y a plus d'un an. Mis à jour il y a plus d'un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
29 septembre 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Dans #44320 la méthode redirect_logout_list() a été déplacé de la classe Plugin à la classe SAMLBackend ce qui ne marche pas du tout, accumulate_from_backend() ne fonctionnant qu'avec les classes IDPBackend ou Plugin.


Fichiers

0008-auth_saml-use-token-url-for-logout-69720.patch (1,13 ko) 0008-auth_saml-use-token-url-for-logout-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0005-misc-split-auth_saml-tests-69720.patch (39,3 ko) 0005-misc-split-auth_saml-tests-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0006-views-refactor-the-logout-view-69720.patch (4,16 ko) 0006-views-refactor-the-logout-view-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0009-auth_saml-after-logout-response-return-to-the-logout.patch (918 octets) 0009-auth_saml-after-logout-response-return-to-the-logout.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0010-tests-add-auth_saml-logout-test-69720.patch (2,31 ko) 0010-tests-add-auth_saml-logout-test-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0004-misc-move-auth_saml-test-in-directory-69720.patch (32,2 ko) 0004-misc-move-auth_saml-test-in-directory-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0002-tests-target-the-password-form-in-login-69720.patch (1021 octets) 0002-tests-target-the-password-form-in-login-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0001-tox.ini-use-django-mellon-from-git.patch (608 octets) 0001-tox.ini-use-django-mellon-from-git.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0007-misc-use-hooks-to-accumulate-redirect-logout-urls-69.patch (9,71 ko) 0007-misc-use-hooks-to-accumulate-redirect-logout-urls-69.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0003-misc-move-hooks-module-in-utils-package-69720.patch (18,9 ko) 0003-misc-move-hooks-module-in-utils-package-69720.patch Benjamin Dauvergne, 18 octobre 2022 20:36
0001-torebase-ecazenave-remark-on-logout-69720.patch (1,61 ko) 0001-torebase-ecazenave-remark-on-logout-69720.patch Benjamin Dauvergne, 19 octobre 2022 11:44

Demandes liées

Lié à Plugin Carte eID (fedict/bosa) - Development #69739: Dupliquer redirect_logout_list pour rester compatible avec les évolutions dans authenticFermé29 septembre 2022

Actions

Révisions associées

Révision e520e186 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

tests: target the password form in login() (#69720)

When testing multiple authentication backends, the current code for
login() cannot find the login/password form.

Révision 8f3ca8e4 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

misc: move hooks module in utils package (#69720)

Révision 342b855d (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

misc: move auth_saml test in directory (#69720)

Révision adc13b92 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

misc: split auth_saml tests (#69720)

Révision 7005127a (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

views: refactor the logout view (#69720)

Révision 307a061a (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

misc: use hooks to accumulate redirect logout urls (#69720)

Révision 3af47026 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

auth_saml: use token url for logout (#69720)

Révision 3fb31937 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

auth_saml: after logout response return to the logout view (#69720)

Révision 008acea8 (diff)
Ajouté par Benjamin Dauvergne il y a plus d'un an

tests: add auth_saml logout test (#69720)

Historique

#2

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Assigné à mis à Benjamin Dauvergne
#3

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Lié à Development #69739: Dupliquer redirect_logout_list pour rester compatible avec les évolutions dans authentic ajouté
#4

Mis à jour par Benjamin Dauvergne il y a plus d'un an

Bloqué par #69739.

#6

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • 0001: c'est pour utiliser le django-mellon du git
  • 0002: tests.utils.login() ne fonctionne pas lorsqu'il y a plusieurs modes d'authentification (il y a plusieurs <form/> il est perdu) ça corrige ce souci
  • 0003: du rangement (déplacement authentic2.hooks vers authentic2.utils.hooks)
  • 0004: idem, déplacement des tests auth_saml dans un sous-répertoire
  • 0005: suite, split du fichier de test unique en plusieurs
  • 0006: simplification de de la logique du code de la méthode logout() (normalement sans rien changer)
  • 0007: déplacement des méthodes redirect_logout_list() des objets Plugin vers les AppConfig et utilisation de call_hooks() pour les appeler
  • 0008: utilisation de la nouvelle methoude make_logout_url de django-mellon pour générer l'URL de logout (URL de logout qui fonctionnera même si la session locale est supprimée)
  • 0009: changement de l'URL de retour par défaut après logout pour /logout/ au lieu de /
  • 0010: ajout d'un test sur le logout SAML par auth_saml (vers l'IdP qui a permis d'ouvrir la session)
#7

Mis à jour par Emmanuel Cazenave il y a plus d'un an

0006 :

Un passage par la session superflu il me semble :

# Put redirection targets in session (after local logout)
request.session['logout_redirections'] = targets
targets = request.session.pop('logout_redirections', None)

A part ça pas du tout évident de se plonger là dedans, si personne d'autre ne s'y penche je validerai.

#9

Mis à jour par Emmanuel Cazenave il y a plus d'un an

  • Statut changé de Solution proposée à Solution validée
#10

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit 0421c43a6ea61f8b3a15047142cd49c2e44413d6
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 6 06:45:42 2022 +0200

    tests: add auth_saml logout test (#69720)

commit 3f67e5a4ba52b43188c2083abc9306d18b4f4b76
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Sep 30 01:23:34 2022 +0200

    auth_saml: after logout response return to the logout view (#69720)

commit 220e96bf9c4a5fea5a337be98a001aef549a8259
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 6 07:22:11 2022 +0200

    auth_saml: use token url for logout (#69720)

commit 073799183afde1e38fb5afb85055229279d35d08
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Sep 29 17:42:13 2022 +0200

    misc: use hooks to accumulate redirect logout urls (#69720)

commit 5ae366eed385b24549cb4e8b4e974566bc560aba
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Mon Oct 3 11:42:21 2022 +0200

    views: refactor the logout view (#69720)

commit 95edffd601a39434d545c8608293825c10f2b462
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 6 06:44:37 2022 +0200

    misc: split auth_saml tests (#69720)

commit 7b0b0e815225a58ee161676e7fb8b5b29acb8094
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Sep 29 20:04:33 2022 +0200

    misc: move auth_saml test in directory (#69720)

commit fcd495b15c4b2b2fc867390bb87ebef6cf4e3527
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Sep 29 15:47:18 2022 +0200

    misc: move hooks module in utils package (#69720)

commit 24220e76b38c1c0ee73cb527309619b179b64bca
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Sep 30 01:10:41 2022 +0200

    tests: target the password form in login() (#69720)

    When testing multiple authentication backends, the current code for
    login() cannot find the login/password form.
#11

Mis à jour par Transition automatique il y a plus d'un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#12

Mis à jour par Transition automatique il y a plus d'un an

Automatic expiration

Formats disponibles : Atom PDF