Defending AI Agents
עברית Join waitlist
Menu

On-ramp · Theoretical · 4 h · Defending AI Agents

On-ramp: the web plumbing the course assumes

Statistical twin Reading a log line and a token as data: what a request, a name, a channel and a credential each prove, and what they do not.

The course reads agent traffic at the wire. A gateway sits on an HTTP connection, a token says who may call a server, a proxy is trusted or not, a name resolves to an address that may change between two lines of code. Every one of those is a few pages of plain specification. If you already read curl -i output and a decoded JWT without effort, skip this unit. If not, an afternoon here saves you from learning HTTP and OAuth and statistics at the same time. Lessons 1 to 9 are what the course assumes; the two Expert lessons are for readers who want to argue about these protocols with the people who design them.

It is theoretical in the course's sense: the value is a way of reading, not a component. The exercises are small commands you can run on a laptop with python3, curl and openssl, plus PyYAML for lesson 3 (pip install pyyaml) and the cryptography package for one problem. Nothing needs Docker or an account, and after those two installs nothing needs the network.

You will be able to

Each line ends with badges: its tier, the graduate outcome it builds (the map) and where it is assessed (a check group, a problem P, the build or a written answer). Hover over a badge for its meaning; select a tier or an outcome to filter the course map.

  • Split a URL and an HTTP message into scheme, userinfo, host, port, path, query, headers and body, and say which name a TLS handshake checks. Foundations
  • Predict how two JSON parsers and a YAML safe loader read the same bytes, and name the disagreement a control must close. Foundations
  • Decide where a bearer token may travel (header, query string, prompt, log line) and what to do instead where it may not. Foundations
  • Design a name check that a rebinding resolver cannot defeat, by connecting to the address that was checked. Advanced
  • Pick the client address out of a X-Forwarded-For chain, given the proxies you run. Advanced
  • Test which names a wildcard certificate covers, and state what the handshake proved. Advanced
  • Write a JWT verifier that checks algorithm, signature, issuer, audience and time in that order, with a lifetime policy. Advanced
  • Demonstrate end to end the key confusion that reading the algorithm from the token allows. Expert
  • Annotate an MCP authorization flow step by step with OAuth's roles, scope, aud and sub, and count the tokens per-call minting issues. Expert
  • State when a check on a message is sound against the parser that acts on it, and choose among one parser, a smaller language and differential testing. Expert
  • Audit an agent's OAuth client against RFC 9700's attacker model, and schedule a signing-key rotation from cache and token lifetimes. Expert

Who it is for, and where it plugs in

If you are missing Read The course uses it in
HTTP, headers, status codes 1 Module 1 (the lab), Module 3 lessons 2 and 6 (a gateway, parser differentials)
JSON and YAML 2, 3 Module 3 lesson 6; every module's configuration
API tokens 4 Module 3 lesson 10; Module 12
DNS, proxies, TLS 5, 6, 7 Module 3 lesson 2; Module 12 lesson 7 (egress)
JWT, OAuth roles, audience 8, 9 Module 3 lesson 10; Module 12 lessons 1 to 4
Parser differentials as a class 10 Module 3 lesson 6; Module 12 lesson 7
OAuth's threat model, token exchange, key rotation 11 Module 3 lesson 10; Module 12 lessons 4 and 5

Lessons

Foundations

  1. An HTTP call is text in, text out
  2. JSON is simple, and its parsers still disagree
  3. YAML is JSON with indentation and four traps
  4. An API token is a password with a label

Advanced

  1. A name is not an address, and the answer can change
  2. A proxy is a server that is also a client
  3. TLS proves you reached a name, not that the name is honest
  4. A JWT is signed claims, and a check has an order
  5. OAuth gives a token a purpose: roles, scope, audience

Expert

  1. Two parsers, one message: a check is sound only if it reads what the target reads
  2. OAuth's own threat model: what RFC 9700 requires, and why an agent needs all of it

Then: problems. There is no build and no make check; every lesson ends in something you run or read.

Where this stops

It teaches reading, not operating. Certificate authorities, OAuth login pages for people, DNSSEC, HTTP/2 framing and the many JWT algorithms are left to the specifications, and the lessons say where. Module 3 lesson 10 and Module 12 take the credentials further; they assume lessons 8 and 9.

Readings