Skip to content

Connexion: Amélioration de la fiabilité de la connexion avec ProConnect#5097

Merged
tonial merged 1 commit into
masterfrom
alaurent/proconnect_iat
Nov 15, 2024
Merged

Connexion: Amélioration de la fiabilité de la connexion avec ProConnect#5097
tonial merged 1 commit into
masterfrom
alaurent/proconnect_iat

Conversation

@tonial
Copy link
Copy Markdown
Contributor

@tonial tonial commented Nov 15, 2024

🤔 Pourquoi ?

La vérification du token user_info plante parfois à cause d'un décalage de l'horloge de nos serveurs qui cause un ImmatureSignatureError.
La vérification de ce champs n'est pas obligatoire, on la retire donc (voir jpadilla/pyjwt#939)

🍰 Comment ?

Décrivez en quelques mots la solution retenue et mise en oeuvre, les difficultés ou problèmes rencontrés. Attirez l'attention sur les décisions d'architecture ou de conception importantes.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

🏝️ Comment tester

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@tonial tonial added the tech label Nov 15, 2024
@tonial tonial self-assigned this Nov 15, 2024
Copy link
Copy Markdown
Member

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour être plus réalistes, on pourrait ajouter iat aux OIDC_USERINFO de pro connect.

key=constants.PRO_CONNECT_CLIENT_SECRET,
algorithms=["HS256"],
audience=constants.PRO_CONNECT_CLIENT_ID,
options={"verify_iat": False},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peut-être mettre en commentaire l’issue, avec un TODO, pour qu’on retire ce comportement une fois que c’est le défaut ?

A difference between or serveur clocks causes some
ImmatureSignatureError.
It' not even mandatory to check it, see
jpadilla/pyjwt#939
@tonial tonial force-pushed the alaurent/proconnect_iat branch from d7eeb98 to 452f927 Compare November 15, 2024 09:43
@tonial
Copy link
Copy Markdown
Contributor Author

tonial commented Nov 15, 2024

J'ai ajouté l'iat au user_info justement, en le mettant une heure après timezone

@tonial tonial enabled auto-merge November 15, 2024 09:44
@tonial tonial added this pull request to the merge queue Nov 15, 2024
Merged via the queue into master with commit f931097 Nov 15, 2024
@tonial tonial deleted the alaurent/proconnect_iat branch November 15, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants