in reply to Re^3: Eliminate server-side state to obviate cookies
in thread "omniscient debugging" for Perl
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
Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder
|
---|