laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Cookies permit two separate sessions to be tracked even using the same authentication though. I might be merlyn with two separate shopping sessions going
on, one for stuff I'm buying for work, and one for stuff I'm buying for the house.
Also, BasicAuth requires two trips to the server for each page, whereas cookies come up for free on the first hit, so server load is much lower with cookies. Ideally then, I'd authenticate using BasicAuth, and then a time-limited cookie gets thrown at me while I wander through non-authed (but cookie protected) pages. Finally, every BasicAuth is transmitted in the clear, so this gives a sniffer that many more times to see the password. Do you really want your password being transmitted in the clear for each and every hit, or just once at the beginning of a session (perhaps in SSL) and then the rest of the session transmits just a session cookie? In fact, that'd be interesting to set two cookies, one that is used to track the shopping cart, but a completely different SSL-only cookie that is used for final checkout, so that the worst someone could do is put stuff in the cart, but not actually buy it. Hmm. Nice idea. I'll have to make a column on that. {grin} -- Randal L. Schwartz, Perl hacker In reply to RE: Answer: Security: Cookies vs HTTP authentication
by merlyn
|
|