Development #36281
Adapter idp_registration_url au portail en cours
0%
Description
Actuellement on pointe seulement {{ idp_url }}/accounts/register/
, je propose de filer directement {{ idp_url }}/accounts/register/?next={{ portal_user_url }}
si c'est possible.
Fichiers
Révisions associées
settings_loaders: compute final idp_registration_url after other variables (#36281)
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Fichier 0001-settings_loaders-add-next-portal_user_url-to-idp_reg.patch 0001-settings_loaders-add-next-portal_user_url-to-idp_reg.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Frédéric Péters il y a plus de 4 ans
Je crains pour les endroits où serait actuellement utilisé {{idp_registration_url}}?whatever, si ça existe. (faudrait un "grep" sur les redirect_url et contenu des cellules texte)
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
Frédéric Péters a écrit :
Je crains pour les endroits où serait actuellement utilisé {{idp_registration_url}}?whatever, si ça existe. (faudrait un "grep" sur les redirect_url et contenu des cellules texte)
Je n'en ai trouvé aucun dans nos dépôts git (j'ai cherché directement sur git.entrouvert.org), tu penses qu'il pourrait y en avoir directement dans des cellules texte ?
PS:
git:/home/git/repositories$ for i in *.git; do (cd $i; git grep idp_registration_url HEAD && echo $i); done fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree HEAD:hobo/multitenant/settings_loaders.py: variables['idp_registration_url'] = service.get('base_url') + 'accounts/register/' hobo.git fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree HEAD:templates/combo/page_template.html: {% if idp_registration_url %} HEAD:templates/combo/page_template.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/arles/combo/page_template.html: {% if idp_registration_url %} HEAD:templates/variants/grenoble-metropole-2019/theme.html: {% if idp_registration_url %} HEAD:templates/variants/grenoble-metropole-2019/theme.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/grenoble-metropole/theme.html: {% if idp_registration_url %} HEAD:templates/variants/grenoble-metropole/theme.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/haute-garonne-cd31/combo/page_template.html: {% if idp_registration_url %} HEAD:templates/variants/haute-garonne-cd31/combo/page_template.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/hautes-alpes-2018/combo/page_template_neutre.html: {% if idp_registration_url %} HEAD:templates/variants/hautes-alpes-2018/combo/page_template_neutre.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/hautes-alpes-2018/theme.html: {% if idp_registration_url %} HEAD:templates/variants/hautes-alpes-2018/theme.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/metz-metropole-2019/combo/page_template.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a> HEAD:templates/variants/moselle/combo/page_template.html: {% if idp_registration_url %} HEAD:templates/variants/moselle/combo/page_template.html: <a class="registration" href="{{idp_registration_url}}">Inscription</a></span> HEAD:templates/variants/nancy-2017/combo/cells/bienvenue/text-cell.html: href="{% if idp_registration_url %}{{idp_registration_url}}{% else %}{% url 'auth_login' %}{% endif %}" class="link-bloc">Créer mon compte maintenant</a></p> HEAD:templates/variants/toulouse-metropole/combo/page_template.html: <span class="registration">Pas de compte ? <a href="{{idp_registration_url}}">S'inscrire</a></span> publik-base-theme.git fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree HEAD:templates/variants/rouen/authentic2/accounts.html: {% if idp_registration_url %} HEAD:templates/variants/rouen/authentic2/accounts.html: <a class="registration" href="{{idp_registration_url}}"><span class="pre-register">Pas de compte ?</span><span class="register">Enregistrez-vous !</span></a> HEAD:templates/variants/rouen/combo/page_template.html: {% if idp_registration_url %} HEAD:templates/variants/rouen/combo/page_template.html: <a class="registration" href="{{idp_registration_url}}"> rouen-publik-theme.git fatal: This operation must be run in a work tree fatal: This operation must be run in a work tree HEAD:wcs/ctl/check_hobos.py: variables['idp_registration_url'] = service_url + 'accounts/register/'
Mis à jour par Frédéric Péters il y a plus de 4 ans
tu penses qu'il pourrait y en avoir directement dans des cellules texte
Oui c'est après avoir vérifié côté publik-base-theme que je me suis dit peut-être ailleurs et qu'il fallait vérifier redirect_url et contenu des cellules texte.
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Statut changé de Solution proposée à En cours
Frédéric Péters a écrit :
tu penses qu'il pourrait y en avoir directement dans des cellules texte
Oui c'est après avoir vérifié côté publik-base-theme que je me suis dit peut-être ailleurs et qu'il fallait vérifier redirect_url et contenu des cellules texte.
Ok je vais faire un script.
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
Voilà le résultat, à aucun endroit ça n'est utilisé avec une query_string (ou alors mon script est foireux ou a raté des instances, c'est aussi possible) :
bdauvergne@revestel:~/wd/eo/misc-fred/eoptasks$ cat /tmp/find_idp_registration_url.py; for host in combo.node1.prod.saas.entrouvert.org `./eoptasks.py -k prod -l | grep -v saas | grep -v -- '-2'`; do echo Host: $host; scp /tmp/find_idp_registration_url.py $host:/tmp; ssh $host which combo-manage \&\& sudo -u combo combo-manage tenant_command runscript --all-tenants /tmp/find_idp_registration_url.py; ssh $host rm /tmp/find_idp_registration_url.py; done import pprint from django.db import connection from combo.data.models import Page, TextCell found = [] for page in Page.objects.filter(redirect_url__contains='idp_registration_url'): found.apped((page, page.redirect_url)) for cell in TextCell.objects.filter(text__contains='idp_registration_url'): found.append((repr(cell.page), repr(cell), cell.text)) if found: print connection.tenant.domain_url pprint.pprint(found) Host: combo.node1.prod.saas.entrouvert.org find_idp_registration_url.py 100% 444 7.4KB/s 00:00 /usr/bin/combo-manage mesdemarches06.fr [('<Page: Connexion>', "<TextCell: Text (Vous n'avez pas de compte\xe2\x80\xaf? \xc2\xa0 \xc2\xa0 \r...)>", u'<h2>Vous n'avez pas de compte\u202f?</h2>\r\n\r\n<p> </p>\r\n\r\n<p> </p>\r\n\r\n<p style="text-align: center;"><a class="tip-button" href="{{idp_registration_url}}">CRÉEZ VOTRE PROPRE COMPTE</a></p>')] Host: alpi-prod Warning: Permanently added the ECDSA host key for IP address '176.31.123.109' to the list of known hosts. find_idp_registration_url.py 100% 444 4.3KB/s 00:00 /usr/bin/combo-manage Host: amiens-prod find_idp_registration_url.py 100% 444 6.0KB/s 00:00 /usr/bin/combo-manage Host: auquo.entrouvert.org find_idp_registration_url.py 100% 444 8.8KB/s 00:00 Host: authentic.entrouvert.org find_idp_registration_url.py 100% 444 7.6KB/s 00:00 Host: bi.entrouvert.org find_idp_registration_url.py 100% 444 9.3KB/s 00:00 Host: cd31-prod find_idp_registration_url.py 100% 444 7.0KB/s 00:00 /usr/bin/combo-manage Host: chrono.entrouvert.org find_idp_registration_url.py 100% 444 9.1KB/s 00:00 Host: combo.entrouvert.org find_idp_registration_url.py 100% 444 9.1KB/s 00:00 /usr/bin/combo-manage Host: corbo.entrouvert.org find_idp_registration_url.py 100% 444 3.9KB/s 00:00 Host: fargo.entrouvert.org find_idp_registration_url.py 100% 444 8.7KB/s 00:00 Host: grandlyon-formpub-prod find_idp_registration_url.py 100% 444 7.2KB/s 00:00 /usr/bin/combo-manage Host: grandlyon-guichet-prod-1 find_idp_registration_url.py 100% 444 6.6KB/s 00:00 /usr/bin/combo-manage Host: hobo.entrouvert.org find_idp_registration_url.py 100% 444 7.8KB/s 00:00 Host: lille-prod find_idp_registration_url.py 100% 444 9.0KB/s 00:00 /usr/bin/combo-manage Host: mandayejs.entrouvert.org find_idp_registration_url.py 100% 444 8.4KB/s 00:00 Host: montpellier-prod find_idp_registration_url.py 100% 444 6.7KB/s 00:00 Host: moselle-prod The authenticity of host 'openvpn.entrouvert.org (176.31.123.109)' can't be established. ECDSA key fingerprint is SHA256:n/Uu3+j1kPpd2Gmf3eXjmsL07yh8W6X9hKnS9F6GnOQ. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'openvpn.entrouvert.org' (ECDSA) to the list of known hosts. Connection closed by 176.31.123.109 port 22 kex_exchange_identification: Connection closed by remote host lost connection The authenticity of host '172.31.10.2 (<no hostip for proxy command>)' can't be established. ECDSA key fingerprint is SHA256:DFekISNXSYc/0dRvHlx0G9TgTLheXFw6hQ9cu9tqurc. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '172.31.10.2' (ECDSA) to the list of known hosts. /usr/bin/combo-manage agent_contact_moselle_fr: ImportError: No module named find_idp_registration_url contact_moselle_fr: ImportError: No module named find_idp_registration_url Command failed on multiple tenants rm: impossible de supprimer '/tmp/find_idp_registration_url.py': Aucun fichier ou dossier de ce type Host: moselle-prod-authentic The authenticity of host '172.31.10.1 (<no hostip for proxy command>)' can't be established. ECDSA key fingerprint is SHA256:DFekISNXSYc/0dRvHlx0G9TgTLheXFw6hQ9cu9tqurc. Are you sure you want to continue connecting (yes/no/[fingerprint])? Host key verification failed. lost connection The authenticity of host '172.31.10.1 (<no hostip for proxy command>)' can't be established. ECDSA key fingerprint is SHA256:DFekISNXSYc/0dRvHlx0G9TgTLheXFw6hQ9cu9tqurc. Are you sure you want to continue connecting (yes/no/[fingerprint])? Host key verification failed. The authenticity of host '172.31.10.1 (<no hostip for proxy command>)' can't be established. ECDSA key fingerprint is SHA256:DFekISNXSYc/0dRvHlx0G9TgTLheXFw6hQ9cu9tqurc. Are you sure you want to continue connecting (yes/no/[fingerprint])? Host key verification failed. Host: passerelle.entrouvert.org find_idp_registration_url.py 100% 444 8.9KB/s 00:00 Host: rochefort-prod find_idp_registration_url.py 100% 444 6.5KB/s 00:00 /usr/bin/combo-manage Host: sictiam-prod ,------. ,--. ,--.,--.,--. ,------. ,--. ,--. | .--. ',--.,--.| |-. | |`--'| |,-. ,----. | .---',--.--. ,---. ,--,--, ,-' '-. ,--,--.| | | '--' || || || .-. '| |,--.| / '----' | `--, | .--'| .-. || \'-. .-'' ,-. || | | | --' ' '' '| `-' || || || \ \ Prod | |` | | ' '-' '| || | | | \ '-' || | `--' `----' `---' `--'`--'`--'`--' `--' `--' `---' `--''--' `--' `--`--'`--' Debian GNU/Linux 9 find_idp_registration_url.py 100% 444 6.7KB/s 00:00 ,------. ,--. ,--.,--.,--. ,------. ,--. ,--. | .--. ',--.,--.| |-. | |`--'| |,-. ,----. | .---',--.--. ,---. ,--,--, ,-' '-. ,--,--.| | | '--' || || || .-. '| |,--.| / '----' | `--, | .--'| .-. || \'-. .-'' ,-. || | | | --' ' '' '| `-' || || || \ \ Prod | |` | | ' '-' '| || | | | \ '-' || | `--' `----' `---' `--'`--'`--'`--' `--' `--' `---' `--''--' `--' `--`--'`--' Debian GNU/Linux 9 /usr/bin/combo-manage ,------. ,--. ,--.,--.,--. ,------. ,--. ,--. | .--. ',--.,--.| |-. | |`--'| |,-. ,----. | .---',--.--. ,---. ,--,--, ,-' '-. ,--,--.| | | '--' || || || .-. '| |,--.| / '----' | `--, | .--'| .-. || \'-. .-'' ,-. || | | | --' ' '' '| `-' || || || \ \ Prod | |` | | ' '-' '| || | | | \ '-' || | `--' `----' `---' `--'`--'`--'`--' `--' `--' `---' `--''--' `--' `--`--'`--' Debian GNU/Linux 9 Host: sitiv-prod find_idp_registration_url.py 100% 444 7.3KB/s 00:00 /usr/bin/combo-manage Host: toulouse-1 find_idp_registration_url.py 100% 444 6.1KB/s 00:00 /usr/bin/combo-manage montoulouse.eservices.toulouse-metropole.fr [('<Page: Accueil>', '<TextCell: Text (Pas encore inscrit\xe2\x80\xaf? Effectuez vos d\xc3\xa9...)>', u'<h3>Pas encore inscrit\u202f?</h3>\r\n\r\n<p>Effectuez vos démarches et suivez leur traitement.</p>\r\n\r\n<p><a href="{{idp_registration_url}}" id="creer-mon-compte">Créer mon compte maintenant</a></p>\r\n\r\n<p>Déjà inscrit\u202f? <a href="/login/">Se connecter</a></p>')] tm.eservices.toulouse-metropole.fr [('<Page: Accueil>', '<TextCell: Text (Les d\xc3\xa9marches @page { margin: 2cm }...)>', u'<h1>Les démarches</h1>\r\n\r\n<p><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta name="generator" content="LibreOffice 5.4.6.2 (Windows)" />\r\n<style type="text/css">@page { margin: 2cm }\r\n\t\tp { margin-bottom: 0.25cm; line-height: 120% }\r\n\t\ta:link { so-language: zxx }\r\n</style>\r\n</p>\r\n\r\n<p align="center"><font color="#FFFFFF">Découvrez les premiers téléservices qui facilitent votre quotidien.</font></p>\r\n\r\n<p><a class="pk-button" href="{{idp_registration_url}}">Créer mon compte</a> <a class="pk-button inverse" href="/login/">Se connecter</a></p>')] Host: villejuif-prod entrouvert@5.135.246.173's password: ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: Broken pipe lost connection entrouvert@5.135.246.173's password: ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: Broken pipe entrouvert@5.135.246.173's password: ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: Broken pipe Host: villeurbanne-prod find_idp_registration_url.py 100% 444 6.1KB/s 00:00 /usr/bin/combo-manage Host: welco.entrouvert.org find_idp_registration_url.py 100% 444 7.1KB/s 00:00
Mis à jour par Emmanuel Cazenave il y a plus de 4 ans
- Statut changé de En cours à Solution validée
Banzai.
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 3320657f0c508598c9203e72d5b3e9a032834ae2 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Thu Sep 19 19:17:11 2019 +0200 settings_loaders: add next=portal_user_url to idp_registration_url (#36281)
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Statut changé de Résolu (à déployer) à En cours
Ça ne marche pas du tout, comme on est dans ou boucle sur les services et que le plus souvent authentic est avant combo, au moment de définir idp_registration_url, portal_user_url n'est pas encore défini :/
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
Code mis en place sur Toulouse recette, tout roule (la redirection vers le portail de départ fonctionne), voir https://tm.cutm-publik-preprod.nfrance.com/.
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Fichier 0001-settings_loaders-compute-final-idp_registration_url-.patch 0001-settings_loaders-compute-final-idp_registration_url-.patch ajouté
- Statut changé de En cours à Solution proposée
Mis à jour par Nicolas Roche il y a plus de 4 ans
- Statut changé de Solution proposée à Solution validée
Je valide la correction.
Mis à jour par Benjamin Dauvergne il y a plus de 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 2cc9c1f05a005eb89f6189d022b6c50ca3d94a95 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Thu Oct 3 20:24:39 2019 +0200 settings_loaders: compute final idp_registration_url after other variables (#36281)
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
settings_loaders: add next=portal_user_url to idp_registration_url (#36281)