Add audit events, timeouts, cancellation, and error boundaries…
Jump & context
Week 6: MCP Proxy Hardening, LangGraph Checkpoints, OAuth2 Delegation & Inter-Agent Bus
The five hours
- 01
Concepts & system design
60 min· read · map the mechanismR21 — MCP cancellation & error handling
R27 — OpenTelemetry context propagation & audit logs
Read the assigned sections; map the mechanism, threat model and trade-offs.
- 02
Project implementation
120 min· build · integrate · debugAdd structured audit event emission, per-call timeouts, output-size caps, cancellation propagation, and egress restrictions to
D2.Build, integrate, debug and improve the increment in the active project.
- 03
Security lab
60 min· attack your own systemRun combined prompt-injection, malformed JSON-RPC, timeout, and unauthorized tool tests through the agent
D2MCP server path.Test the abuse case, failure path, authorization bypass or resource limit.
- 04
Verification & evidence
30 min· test · record evidenceIntegrated
D2Sandboxed MCP Proxy security test report.Add or run regression tests; record the 9-point evidence record.
- 05
Deliberate practice & Socratic review
30 min· explain aloud · update gapsAnswer 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.
- total5 h
Read today · inside the concepts block
R21 R27Official specification: client/server lifecycle, JSON-RPC messages, tool discovery, authorization, and trust boundaries.
Traces, spans, context propagation, semantic conventions, and redacting sensitive attributes.
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- docsOpenTelemetry · ~10 min readContext propagation
Explains trace/span context injection and extraction across service boundaries and the security warning about forged trace headers and leaking baggage — the correlation spine for audit events.
R27moved 2026-11-11 - videoLightstep is now ServiceNow Cloud Observability · ~10 minContext Propagation makes OpenTelemetry awesome
Walks why traces break without propagation and how the context object flows through nested spans, so per-call spans for each MCP invocation stay in one trace.
R27checked 2026-11-11 - videoOpenTelemetry · ~38 minOTEL in Practice: Context Propapagtion in Distributed Tracing with Doug Ramirez
Python-specific walkthrough of inject/extract and manual instrumentation, including where to attach attributes to spans rather than dumping payloads into them.
R27checked 2026-11-11 - articleOWASP · ~15 min readMCP Security - OWASP Cheat Sheet Series
Prescribes logging and centrally monitoring every tool invocation, plus output-size and least-privilege controls, which are the audit-event and egress requirements for the proxy.
R21checked 2026-11-11 - labOpenTelemetry Python · 3 runnable scriptsBasic Context — OpenTelemetry Python documentation
Runnable implicit, child and async context examples let you prove spans nest correctly around each tool call, including the cancellation path in an async handler.
R27checked 2026-11-11
Evidence record · 9-point standard
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
emptyThe two source formulations
verbatim · nothing summarisedProject & Deliverable Target
P3 | `D2` (Sandboxed MCP Proxy) | S3
Core Implementation
Add structured audit event emission, per-call timeouts, output-size caps, cancellation propagation, and egress restrictions to D2.
Security Lab
Run combined prompt-injection, malformed JSON-RPC, timeout, and unauthorized tool tests through the agent D2 MCP server path.
Verification & Evidence
Integrated D2 Sandboxed MCP Proxy security test report.
Read Today (60m Concepts Block)
R21 (MCP cancellation & error handling), R27 (OpenTelemetry context propagation & audit logs).
---