So I was perusing:
(Normally, I take these sorts of pages with a grain of salt, but in this case the contributors are particularly high grade)
In any case, I was reading this bit:
PART II: How To Remain Logged In - The Infamous "Remember Me" Checkbox
…
2. And DO NOT STORE THE PERSISTENT LOGIN COOKIE (TOKEN) IN YOUR DATABASE, ONLY A HASH OF IT! The login token is Password Equivalent, so if an attacker got his hands on your database, he could use the tokens to log in to any account, just as if they were cleartext login-password combinations. Therefore, use strong salted hashing (bcrypt / phpass) when storing persistent login tokens.
…
Right now, I'm following the examples verbatim and using set_secure_cookie/get_secure_cookie to store an user identifier to indicate the user's logged in, and it of course (again probably foolishly) doubles as a "keep me logged in" device.
After reading this, I suspect that's completely wrong, and should be storing something else in the cookie, but to be useful that would be a decryptable version of the user identifier, which would seem to have it's own insecurities. I would guess a server side secret would solve that, but I'm not sure that - in the end - is more secure than what's in place with _xsrf and set/get_secure_cookie.
Does anyone here have any experience with this and tornado that would like to share?
Thanks!