Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Eliminate server-side state to obviate cookies

by tmoertel (Chaplain)
on Jul 05, 2005 at 18:50 UTC ( #472563=note: print w/replies, xml ) Need Help??


in reply to Re^3: Eliminate server-side state to obviate cookies
in thread "omniscient debugging" for Perl

Why do you think it is so difficult?

All you need is a single secret on the server. Then you can compute a signature as the hash of the secret plus the outgoing state plus a random salt. The signature, salt, and state are emitted in the response. When a request comes in, verify its signature by comparing it to the hash of the server's secret plus the client's salt and state.

Easy as pie.

If you're paranoid, you can add timestamps, rotate secrets, and use public-key signatures, none of which makes the job much more difficult. And, even if you do consider it more difficult, why does it matter for the day-to-day web programmer? This stuff is part of the web-app framework and invisible to end programmers.

Cheers,
Tom

  • Comment on Re^4: Eliminate server-side state to obviate cookies

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://472563]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-12-01 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?