Closed dataCobra closed 2 weeks ago
@dataCobra do you use the cloudstack GUI, or build your own dashboard ?
We are using the default GUI.
@dataCobra what is the exact error message, "JSESSIONID from cookie is invalid." ?
Oh sorry, yes this is the error. Will update the main message.
@dataCobra no problem.
For users who use the default GUI, it should work. we have made some changes on the cloudstack GUI to pass jsessionid to each API, it has been tested by multiple users. If it does not work, please clean the browser cache and retry.
For users who build their own dashboard, they need to modify their codebase and pass the jsessionid which can be found in the response of login API. As a workaround, they can set the global setting api.sessionkey.check.locations
from default CookieAndParameter
to CookieOrParameter
. Please note, it is insecure. Users should fix their codebase asap.
Thank you for the quick answer.
We will test this and I come back to you after that.
Thank you for the quick answer.
We will test this and I come back to you after that.
If it still does not work, can you share
please also try with different values of global setting api.sessionkey.cookie.samesite
.
it has 4 valid values: Lax (default), Strict, NoneAndSecure and Null
We have the same issue with 4.18.2.4 using the default GUI (no 2fa enabled).
Setting api.sessionkey.check.locations
to CookieOrParameter
did not resolve the issue.
With api.sessionkey.check.locations
still set to CookieOrParameter
changing api.sessionkey.cookie.samesite
to any of the values did not change the result either.
Setting enable.secure.session.cookie
to false made login work for us.
@BartJM thanks for sharing
@dataCobra
do you have the same setting enable.secure.session.cookie=true
?
@BartJM @dataCobra Is your cloudstack set up with https or http ?
Ours is setup with HTTPs.
The other question I can answer you on monday.
I am able to reproduce the issue when 'enable.secure.session.cookie' is 'true'. Tested with both http and https websites.
this is a regression of security fix for CSRF in 4.18.2.4 and 4.19.1.2.
workaround:
update configuration set value='false' where name='enable.secure.session.cookie';
then restart cloudstack-management
I will create a fix cc @rohityadavcloud @DaanHoogland @GutoVeronezi @JoaoJandre
fixed in 9856
@DaanHoogland can we close this?
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
SUMMARY
After the update to version
4.19.1.2
. Users that don't have 2FA enabled are unable to login and get a401 UNAUTHORIZED
answer from the system. In the logs I can see that an errorJSESSIONID from cookie is invalid.
gets logged multiple times.We have no special login methods (like OAuth, SAML) enabled and 2FA is also not mandatory but enabled.
This was tested with different clients with and without cache. All clients produced the same error.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
We've downgraded to version 4.19.1.1 for now.