Beefy Boxes and Bandwidth Generously Provided by pair Networks
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
in thread Security: Cookies vs HTTP authentication by rodry

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-23 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found