Development #7879
When an authnrequest is canceled, statusMessage should contain a message telling what happened.
0%
Fichiers
Demandes liées
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
- Lié à Bug #7878: Erreur lors de l'annulation d'une tentative de SSO ajouté
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
In response messages of the SAML protocol there is a part called the Status (an XML element), it contains an unique element the StatusCode which is usually success (see https://www.samltool.com/generic_sso_res.php for an exemple). When the statuscode is not success, it can be accompanied by another element named "StatusMessage" which is a freeform message intended to the user. Currently we do not set such a message when we return a not success error (for example if the user select "cancel" instead of login in).
Points where not succes is returned by authentic must be found (in authentic2/idp/saml2/saml2_endpoints.py) and a statusmessage should be set using a translatable string (lasso expect UTF-8 strings, so the string must be encoded before being set in login.response.status.statusMessage).
Mis à jour par Josué Kouka il y a plus de 8 ans
- Fichier 0001-Status-message-added-when-user-refuse-to-consent-or-.patch 0001-Status-message-added-when-user-refuse-to-consent-or-.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
statusMessage added when user refuses to consent or cancel the login process
Mis à jour par Josué Kouka il y a plus de 8 ans
- Fichier 0001-7879-adding-translation-to-SAML-response-statusMessa.patch 0001-7879-adding-translation-to-SAML-response-statusMessa.patch ajouté
- Patch proposed changé de Oui à Non
translation added
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
I forgot that set_saml2_response_responder_status_code
did already handle this, good catch.
This line is erroneous:
_('User canceled login process'.decode('utf-8'))
you must encode and not decode, and it must be done after getting the translated string, like this:
_('msg').encode('utf-8')
Also I would prefer only one patch for these changes (use git rebase), but with one more patch for the translations (do makemessages, then modify src/authentic2/saml/locale/fr/.../django.po
to translate both strings).
Mis à jour par Josué Kouka il y a plus de 8 ans
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
Ok, par contre on a pour habitude de séparer les patchs au code et aux fichiers des traductions, les patchs aux fichiers de traductions on les nomme générale "update french translation" ou "update translations".
Mis à jour par Josué Kouka il y a plus de 8 ans
- Fichier 0001-7879-statusMessage-in-SAML-Response-and-tests-added.patch 0001-7879-statusMessage-in-SAML-Response-and-tests-added.patch ajouté
- Fichier 0001-7879-update-french-translation.patch 0001-7879-update-french-translation.patch ajouté
It should be ok now
Mis à jour par Frédéric Péters il y a plus de 8 ans
De mon côté, je suggérerais que le .encode('utf-8') soit placé à l'intérieur de set_saml2_response_responder_status_code().
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
Ok avec ça, il manque un test sur le consentement.
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
- Assigné à changé de Benjamin Dauvergne à Josué Kouka
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Lié à Project management #10245: Gérer les autorisations de se connecter à un service dans authentic ajouté
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Patch proposed changé de Oui à Non
Il manque toujours un test sur le consentement (ouais c'est chiant d'avoir à faire des tests qui devraient être là :) ).