Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2FA Le path du cookie est hardcodé. Le 2FA ne fonctionne pas si pas déployé dans "/extract" #331

Closed
yblatti opened this issue Sep 11, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@yblatti
Copy link
Contributor

yblatti commented Sep 11, 2024

Dans src/main/java/ch/asit_asso/extract/authentication/twofactor/TwoFactorCookie.java le path du Cookie est harcodé :

    private static final String PATH = "/extract";

Si extract est déployé dans un autre contexte (par ex : /extract-dev ou dans ROOT /), le serveur va toujours envoyer un cookie (header set-cookie) avec le path /extract, le client ne le renverra jamais lors des requêtes suivantes car le path ne correspond pas.

@yblatti yblatti added the bug Something isn't working label Sep 11, 2024
@yblatti
Copy link
Contributor Author

yblatti commented Sep 11, 2024

Quelle serait la meilleure solution ?

  • Extraire le contexte tomcat ?
  • Extraire le path de application.properties : application.external.url

J'ai l'impression que la deuxième solution fait plus de sens, car elle prends en compte le cas des reverse proxy.

@yblatti
Copy link
Contributor Author

yblatti commented Sep 11, 2024

Remonté chez arxit : FS#23633

@yblatti yblatti added this to the v2.1.4 milestone Sep 11, 2024
@yblatti
Copy link
Contributor Author

yblatti commented Sep 26, 2024

Merci @arxit-ygr !

@yblatti yblatti closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant