Case File: The Cookie That Cannot Be Forged
A login cookie that says only a name can be edited by anybody. Sign it with an HMAC and a secret key, verify it with a constant-time comparison, reject cookies that are broken, forged or expired, and run the check on cookie lists you cannot see. The users, expiry times and cookies are generated for you alone.
Case File: The Cookie That Cannot Be Forged
A login cookie that says only a name can be edited by anybody. Sign it with an HMAC and a secret key, verify it with a constant-time comparison, reject cookies that are broken, forged or expired, and run the check on cookie lists you cannot see. The users, expiry times and cookies are generated for you alone.
In this lesson:
- security
- cookies
- hmac
- sessions
- python
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans