Hi Péter,
And that’s what the cookie is indeed. If you don’t check the cookie, then you are opening for session fixation attacks. An attacker could somehow set a session cookie for you (one which he or she knows), and since the session cookie identifier does not change when logged in, if you now log in, the attacker just needs to use that session cookie to be logged in as you. The auth token is a cookie which is randomly generated after authentication, and its value is stored in the session itself. Since it’s random, it’s not predictable, and an attacker can’t know its value on beforehand, nor fix it in any way. If the auth token does not match the auth token stored for the session, then you are not considered logged in.
> How can this cookie be removed or forgotten on logout?
It should. And in any case, if it’s not removed after logout, it would be overwritten on the next login, so I don’t see any problem here.
If something as simple as that does not work for you, there must be a configuration error somewhere. If the error appears to be related with cookies, I would check the cookie configuration. And of course I would set SimpleSAMLphp in debug mode and check the log files for information that could lead to the reason of the error. Tracing the requests and responses in your browser is also a good idea.
--
Jaime Pérez
UNINETT / Feide
mail:
jaime...@uninett.no
xmpp:
ja...@jabber.uninett.no
"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost