Unit 1 of 15 · about 4 hours · explain, implement
Threat models for clients, services and operators, workload identity and mutual TLS
Authorization, tenancy and audit all assume the caller is who it claims to be. A forged or stale identity makes every later check in this section decide on false input.
You'll be able to
- Build a threat model across client, network, service, storage, operator, tenant, dependency and artifact boundaries, naming the trust boundary each threat crosses.
- Assign SPIFFE IDs to workloads and explain what each side verifies during mutual TLS with X.509-SVIDs.
- Check JWT time claims with inclusive not-before and exclusive expiration rules, and state what claim checks cannot cover.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Threat model method: diagrams, trust boundaries, STRIDEOWASP Threat Modeling Cheat Sheet
System Modeling (data-flow diagrams, trust boundaries, data stores and processes); Threat Identification (the STRIDE table applied to components, data flows and trust boundaries); Response and Mitigations
- mTLS and service identity: Zero Trust, handshake, SPIFFEHLD Handbook - Reliability, Operations and Security at Scale
The Zero Trust model; mTLS handshake mechanics; Certificate lifecycle: issuance, rotation, revocation; SPIFFE and SPIRE
Skim Service mesh as the practical answer and When mTLS is overkill for tool choice. This unit builds on SPIFFE concepts, not on deploying a mesh.
- SPIFFE Workload API: SVIDs, bundles and streaming updatesSPIFFE Workload Identity and Workload API
X.509-SVID Profile: FetchX509SVID and FetchX509Bundles; Stream Responses (every message is a complete update that replaces prior state); Federated Bundles for cross-domain trust (page read 2026-10-15)
Focus on
- Draw the data-flow diagram first, then apply STRIDE per boundary. A threat without a named crossing is a worry, not a model.
- A SPIFFE ID names a trust domain plus a workload path, for example
spiffe://prod.example/log-writer. The peer verifies the SVID signature against its trust bundle and then authorizes that ID. - Workload API responses replace prior state. An empty optional
federated_bundlesmap removes previously supplied federated bundles; the local trust-domain bundle must always be present, and loss of all entitlement arrives asPermissionDenied. Clients hold the connection open and redial when it drops. - Caller identification at the endpoint is out-of-band attestation, not a client password. The API itself carries no direct client authentication.
Common mistakes · 3
- Server-authenticated TLS alone does not authenticate the client workload. Use a client certificate or a separate verified application credential; cipher strength does not establish caller identity.
- Merging streamed bundle updates instead of replacing them. A removed bundle that stays trusted is a revoked identity that still authenticates.
- Treating claim checks as token verification. The JWT exercise states it plainly: structure and signature are assumed already verified, and revocation is out of scope.
Try it yourself
Closed-book, before checking anything
spiffe:// IDs for three loglab processes in one trust domain, then state what each side checks during mutual TLS and what a client must do when its bundle stream delivers an empty optional federated-bundle map.Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.A forged client identity crosses the service boundary. Which STRIDE category is it, and what does it violate?Answer
Spoofing, which violates authentication. The fix sits at the trust boundary the forged identity crosses.
2.When would a workload call
FetchX509Bundlesinstead ofFetchX509SVID?AnswerWhen it only needs bundles to validate peers, without obtaining its own SVID and private key. Both RPCs can supply local and federated bundles.
3.A bundle stream delivers a message without the bundle for
spiffe://peer.example. What must the client do?AnswerUnload that bundle. Responses are complete updates, so absence is a redaction, and peers presenting those SVIDs must no longer verify.
4.
isValidacceptsiat=10, nbf=10, exp=20atnow=10but rejects it atnow=20. Why?AnswerNot-before is inclusive (
nbf <= now) while expiration is exclusive (now < exp). Atnow=20the token has expired.
Practice
- Build Distributed Systems, The Securitor: first three tasks
First three free tasks of the track, graded in the browser after login
Treat a pass as a drill. The section mini-project covers this: a local mTLS or faithful verification mock that checks certificate validity, the matching trust-domain bundle and an allowed SPIFFE ID, then rejects an unknown domain, an expired SVID and a valid but unauthorized ID during bundle rotation.
- AlgoMaster: Validate JWT Time Claims
isValid(iat, nbf, exp, now); the page tests the inclusive not-before and exclusive expiration boundaries with no clock-skew allowanceThe page assumes signature verification already happened. State where signature and revocation checks live in your design.
You're done when
Your diagram names every trust boundary with its STRIDE rows, your verification check rejects an unknown trust domain, an expired SVID and a valid but unauthorized ID, and the JWT checks pass including both time boundaries.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 14 more in the section
- HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary
Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.
- SPIFFE Workload Identity and Workload APISPIFFE Project · support
Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (
FetchX509SVID,FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap. - OWASP Threat Modeling Cheat SheetOWASP · reference
Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.
Also in this section
- DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support
Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.
- Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required
Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.
- Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support
Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.
- Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support
Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.
- Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support
Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.
- Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support
Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.
- The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support
Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.
- Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional
Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support
Read signals and context propagation (W3C Trace Context
traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps. - Replicated Log and Stream Processor - Production ContractRoadmap-Final · support
Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.
- Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support
Read Point-in-time joins (entity dataframes,
get_historical_features, TTL backward scan,filter_by_created_timestamp) and Feature retrieval (event_timestampas the inclusive upper bound,get_online_featureswithout timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation). - MLflow Model Registry DocsMLflow · support
Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.
- DVC Docs - Data VersioningDVC · support
Read
dvc add(Description and Example: Single file) for.dvccontent-hash sidecars, thedvc.yamlpage with itsdvc.lock filesection for pipeline state, andpushandpullfor transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15. - PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference
Read Section 19.5.6 Recovery Target, the
pg_verifybackupreference and thepg_rewindreference for recovery stopping points, manifest checks and rejoining a diverged primary.