We have a web application that is stateless. We use http authentication through SSL / TLS. User browsers presumably save authentication credentials (perhaps even after disabling the browser if they configure their browsers like this). We check them with every access.
For reasons mainly related to usability, we would like to stop using HTTP authentication. Is there a reasonable way to enter a username and
- Stay stateless.
- It does not require users to re-enter credentials at every access.
- Be at least as secure as HTTP authentication over SSL / TLS.
For example, we are prepared to use cookies and may store username and password as a cookie. However, this seems less secure. But is it? If we use a volatile cookie, is it less secure than any method the browser uses to store credentials for a session duration or longer?
We could save the username and password hash, as suggested here: What do I need to store in cookies for the โRemember Meโ implementation during user login , but is this better?
We could store a random token as a cookie, but then we need to save the lookup table (session) on the server and become state-safe.
We could store the encrypted version of the credentials as a cookie, and then decrypt and verify each access. This one seems like it is a bit more secure than http authentication, and also does not require state. However, Iโm not sure that we need additional decryption overhead. And is it safer? If someone gets a copy of an encrypted (or hashed, as above) string, does it give the same access as if they had a password?
I would be grateful for your thoughts, but let me start with the assumption that HTTP authentication via SSL / TLS is secure enough for our purposes, and we want to remain stateless.
EDIT
After some further research, I think this stackoverflow question: client-side sessions speaks more accurately about the problem, and the answers are correspondingly better. Thank you all for your input.
authentication web-applications cookies login session
bmb Jul 21 '10 at 18:40 2010-07-21 18:40
source share