Skip to content
Ameen Abozaid
Planned lessonJNR-038-L07

Demo: attacking token validation (tampering, expiry, audience)

  • Lesson 7 of 7
  • Junior
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

prove validation works by trying to break it. Prepares JNR-038-LAB1.

Draft outline details

Step by step

  1. Change a claim (roles to ADMIN) without re-signing: the API returns 401.
  2. Wait for or set an expired token: 401.
  3. Issue a token with the wrong aud: 401.
  4. Try an unsigned alg: none token: 401.
  5. Planned mistake: a decoder configured without an audience check accepts the wrong-audience token. Fix: add an audience validator and re-run.
  6. Turn each attack into an automated test.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.