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

Fix cookie check with yunohost on subdomain of other yunohost #233

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Josue-T
Copy link
Contributor

@Josue-T Josue-T commented Dec 6, 2024

Problem

In case we have one yunohost instance on a subdomain of an other yunohost instance we have a cookie issue with SSOWAT. Note that this issue don't happen with the Yunohost portal API.

By example we have have one yunohost on example.com and an other on hello.example.com.
In this case, the browser will send 2 cookie for the key yunohost.portal. One for the domain '.example.com' and an other one for '.hello.example.com'.

Currently ssowat check the only first cookie, if the first one is the correct one it's good but it could also be the second and in this case the authentication fail.

Step to reproduce the issue

  • Install a yunohost instance on example.com.
  • Install a yunohost instance on sub.example.com.
  • Install my_webapp as private app on sub.example.com instance.
  • Authenticate on the portal example.com and on sub.example.com.
  • Try to access to sub.example.com.

You will see that you are redirected to the portal and you can't access to my_webapp because ssowat consider you are not authenticated because it check the wrong cookie. But the yunohost portal API check the good one so you can see the portal.

Expected

After the authentication you should be able to access to my_webapp.

@Josue-T Josue-T requested a review from alexAubin December 6, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant