Skip to content
Roadmap0/111
not startedstudy day 6 of 6 · covers original day 46

Implement a local delegated-access simulation with short-lived…

P3 Agent systemS6D7
not started0/5 blocks
0/5
Jump & context

Week 6: MCP Proxy Hardening, LangGraph Checkpoints, OAuth2 Delegation & Inter-Agent Bus

The five hours

  1. 01

    Concepts & system design

    60 min

    R22 — OAuth token validation & audience restrictions

    R23 — Actor/subject token exchange

    Read the assigned sections; map the mechanism, threat model and trade-offs.

  2. 02

    Project implementation

    120 min

    Implement the local identity-broker (D7) that exchanges a user's session token for a short-lived, task-scoped, audience-bound JWT for a specific tool call.

    Build, integrate, debug and improve the increment in the active project.

  3. 03

    Security lab

    60 min

    Verify the agent cannot inherit broader user permissions than the approved task scope, cannot reuse a token on a different resource (aud mismatch), and fails closed upon token expiry or revocation.

    Test the abuse case, failure path, authorization bypass or resource limit.

  4. 04

    Verification & evidence

    30 min

    Negative authorization test suite for D7 (expired token, wrong audience,missing scope, revoked token).

    Add or run regression tests; record the 9-point evidence record.

  5. 05

    Deliberate practice & Socratic review

    30 min

    Answer the 8 Socratic questions without notes: What? Why? How? What if? Why not? How can I prove it? Where can it break? What have I learned?

    Re-explain the hardest concept aloud, inspect one edge case, update the gap log.

  6. total5 h

Read today · inside the concepts block

R22 R23

Read only the named sections needed for today's task. Reading sits inside the 60-minute concepts block; it is not extra time.

Free resources for this day

5 curated
  • docsOWASP · ~20 min read
    OAuth2 - OWASP Cheat Sheet Series

    Implementation-level checklist for token replay prevention, audience-restricted bearer tokens and PoP, the properties the short-lived task-scoped JWT must satisfy.

    R22checked 2026-11-11
  • videoCode with Josh · ~45 min
    Secure FastAPI API with JWT (OAuth2) – Python Token Authentication Tutorial

    Builds issuance and verification of a signed access token in FastAPI with a protected route, the skeleton of the broker's `/exchange` endpoint.

    R22checked 2026-11-11
  • videoEric Roby · ~20 min
    FastAPI JWT Tutorial | How to add User Authentication

    Covers the dependency-injection pattern for decoding a bearer token before the handler runs, which is where you insert audience and expiry validation.

    R22checked 2026-11-11
  • articleSE with MJ · ~25 min read
    FastAPI + JWT/OAuth2 Authentication from Scratch: A Complete Guide

    Shows a short-lived access token carrying `sub`, `aud`, `iss`, `jti` and `exp` plus validation of every one of them — the exact claim set a delegated, audience-bound token needs.

    R22moved 2026-11-11
  • labAuth0 · ~20 min hands-on
    FastAPI API - Auth0 Docs

    Working code that validates an access token and gates endpoints by audience and scope, giving you a reference implementation to compare your local broker's exchanges against.

    R22checked 2026-11-11

Evidence record · 9-point standard

0/9

A lab is complete only when it produces evidence. Installing PyRIT, Garak, Presidio or TransformerLens is not completion. Saved on this device only.

Day notes

empty

The two source formulations

verbatim · nothing summarised

Project & Deliverable Target

P3 | `D7` (Delegated Agent OAuth Broker) | S6

Core Implementation

Implement the local identity-broker (D7) that exchanges a user's session token for a short-lived, task-scoped, audience-bound JWT for a specific tool call.

Security Lab

Verify the agent cannot inherit broader user permissions than the approved task scope, cannot reuse a token on a different resource (aud mismatch), and fails closed upon token expiry or revocation.

Verification & Evidence

Negative authorization test suite for D7 (expired token, wrong audience,missing scope, revoked token).

Read Today (60m Concepts Block)

R22 (OAuth token validation & audience restrictions), R23 (Actor/subject token exchange).

---