I’m using SSL to transmit all data. HTTP is completely disabled. Short of malware, or accessing someones physical machine (both of which are very hard to prevent from server side), I don’t see how an attacker could steal a login cookie.
Thus, is it okay to not worry about stealing a login cookie?
The complexity to properly implement a non-stealable login cookie, that still allows users to have sessions across different browsers and different machines is higher than the material it’s safe-guarding.
Thus, I believe it’s okay to not safe guard against copy and pasting cookie data from machine to machine.
Is this a valid trade off, or am I forgetting something critical here.
You do need to ensure that you have the
Secureflag set on your cookie, because you can’t generally prevent people from attempting to access your site over non-SSL. Otherwise, I believe you should be OK.That said, I’d suggest taking reasonable precautions. For example:
HttpOnlyflag on sensitive cookies so that any potentially-untrusted JavaScript can’t steal them.