Backend Developer

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.

50 min

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

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans