Your technical library
Security Engineering & Identity
13 modules · 64 topics
About this book
Security Engineering & Identity
Most real breaches are not broken cryptography. They are a token accepted by the wrong audience, a check made on the wrong object, a key trusted for the wrong tenant, a server fetching a URL an attacker chose, or a build that signed whatever it was given. This course teaches each of those failure classes as the consequence of a design decision, so you can recognise it in a system you have never seen and design, review and argue about the defence. It assumes no security background: OAuth libraries, cloud permission consoles and secret stores are explained before they are relied on, and the depth aims past what a senior staff engineer is expected to know. It builds on Computer Networking, for cryptography and TLS, and Operating Systems, for protection and memory-corruption exploits.
Threat modelling says what a security claim means and against whom. Server-side vulnerability classes covers injection, server-side request forgery, insecure deserialization, request smuggling and race conditions, and the browser security model covers the same-origin policy, cookies, cross-site request forgery, cross-site scripting and content security policy. Identity follows: authentication, self-contained tokens such as JSON Web Tokens, and delegated authorization: OAuth 2 and OpenID Connect.
Authorization models and policy languages and evaluation decide what an authenticated party may do. Keys and secrets keeps the keys, zero trust and workload identity authenticates services as well as people, tenant isolation keeps customers apart in a shared system, and software supply chain checks that the code you run is the code you meant to build. Case studies traces two real incidents through everything before.
64 topics across 13 modules, in dependency order.
This course is planned; no lessons are written yet. The map shows every module and topic so its coverage can be reviewed before authoring. Each topic will open with what to read first and close with what it leaves open.
Read at your own pace. Each topic is one continuous page; mark it done as you finish.
Start with 01.1 · Security goals and adversaries: a claim is only as good as its threat modelReview what you have finished↷ 0 skipped topics- 03.1The same-origin policy and CORS: reads are isolated, sends are not
- 03.2Cookies ignore the same-origin policy: domains, sites and attributes
- 03.3CSRF: ambient credentials on requests someone else starts
- 03.4XSS: attacker data parsed as script in the victim's origin
- 03.5Content Security Policy: allowlists fail, nonces hold
- 04.1Password storage: making each guess expensive
- 04.2Online guessing and credential stuffing: throttling what you cannot see
- 04.3Multi-factor authentication: which factors a phishing proxy can relay
- 04.4WebAuthn and passkeys: a signature the phishing site cannot use
- 04.5Account recovery: the authentication path nobody threat-models
- 04.6Session management: the credential you actually use
- 04.7Stateful sessions versus bearer tokens: the revocation trade-off
- 06.1The delegation problem: why OAuth has four roles
- 06.2The authorization code flow: derived from the implicit flow's failures
- 06.3PKCE: binding the code to the client that asked for it
- 06.4Redirect and mix-up attacks: sending the code to the wrong place
- 06.5Refresh tokens: long-lived credentials and reuse detection
- 06.6Sender-constrained tokens: DPoP and mutual-TLS binding
- 06.7OpenID Connect: an ID token for the client, not an access token for an API
- 06.8OAuth by client type: server apps, browser apps, native apps and services
- 07.1Broken object-level authorization: authenticated is not authorized
- 07.2The confused deputy in services: whose authority is this request using?
- 07.3RBAC: permissions through roles, and role explosion
- 07.4ABAC: rules over attributes, and the audit question it makes hard
- 07.5ReBAC and the Zanzibar tuple model
- 07.6The new-enemy problem: authorization must respect causality
- 07.7Choosing an authorization model: which questions must be cheap
- 09.1Envelope encryption: a key per object, wrapped by a key that never leaves
- 09.2The key-management service: the API is the boundary
- 09.3Key usage limits and rotation: counting encryptions, not calendar days
- 09.4Crypto-shredding: deleting data by destroying its key
- 09.5Secrets management: sprawl, secret zero and short-lived credentials
- 10.1Zero trust: access from identity and device, not network location
- 10.2Identity-aware proxies: authenticating at the edge, and the header trap
- 10.3Workload identity with SPIFFE: attestation instead of secret zero
- 10.4Service-to-service authorization: the caller and the end user are different principals
- 10.5Workload identity federation: trusting another platform's tokens
- 12.1The supply-chain threat model: every step between commit and deploy
- 12.2Dependency confusion and typosquatting: the resolver chooses the attacker
- 12.3SLSA and build provenance: a signed statement of how an artifact was made
- 12.4Sigstore: keyless signing with transparency logs
- 12.5Reproducible builds: verifying a binary by building it again
- 12.6Admission policy: verifying an artifact before it runs
01.2STRIDE and trust boundaries: where data changes hands, threats appear
01.3Attack trees: the attacker's cheapest path
01.4Defence in depth: layers only multiply when they fail independently
02.1Injection: when data crosses into code
02.2SSRF: the server as the attacker's proxy
02.3Insecure deserialization: object graphs as a program
02.4HTTP request smuggling: when two parsers disagree
02.5Race conditions in web applications: limit overrun and multi-step state
03.1The same-origin policy and CORS: reads are isolated, sends are not
03.2Cookies ignore the same-origin policy: domains, sites and attributes
03.3CSRF: ambient credentials on requests someone else starts
03.4XSS: attacker data parsed as script in the victim's origin
03.5Content Security Policy: allowlists fail, nonces hold
04.1Password storage: making each guess expensive
04.2Online guessing and credential stuffing: throttling what you cannot see
04.3Multi-factor authentication: which factors a phishing proxy can relay
04.4WebAuthn and passkeys: a signature the phishing site cannot use
04.5Account recovery: the authentication path nobody threat-models
04.6Session management: the credential you actually use
04.7Stateful sessions versus bearer tokens: the revocation trade-off
05.1JWT validation: what a signature does and does not prove
05.2JWT attacks: letting the token choose how it is checked
05.3Signing-key rotation: publish before use, retire after expiry
05.4Macaroons: bearer tokens anyone can weaken but no one can strengthen
06.1The delegation problem: why OAuth has four roles
06.2The authorization code flow: derived from the implicit flow's failures
06.3PKCE: binding the code to the client that asked for it
06.4Redirect and mix-up attacks: sending the code to the wrong place
06.5Refresh tokens: long-lived credentials and reuse detection
06.6Sender-constrained tokens: DPoP and mutual-TLS binding
06.7OpenID Connect: an ID token for the client, not an access token for an API
06.8OAuth by client type: server apps, browser apps, native apps and services
07.1Broken object-level authorization: authenticated is not authorized
07.2The confused deputy in services: whose authority is this request using?
07.3RBAC: permissions through roles, and role explosion
07.4ABAC: rules over attributes, and the audit question it makes hard
07.5ReBAC and the Zanzibar tuple model
07.6The new-enemy problem: authorization must respect causality
07.7Choosing an authorization model: which questions must be cheap
08.1The IAM evaluation algebra: grants, ceilings and explicit deny
08.2Cedar: a policy language designed to be analysed
08.3SMT-based policy analysis: questions about every possible request
08.4Where the decision runs: PDP, PEP and the latency of authorization
09.1Envelope encryption: a key per object, wrapped by a key that never leaves
09.2The key-management service: the API is the boundary
09.3Key usage limits and rotation: counting encryptions, not calendar days
09.4Crypto-shredding: deleting data by destroying its key
09.5Secrets management: sprawl, secret zero and short-lived credentials
10.1Zero trust: access from identity and device, not network location
10.2Identity-aware proxies: authenticating at the edge, and the header trap
10.3Workload identity with SPIFFE: attestation instead of secret zero
10.4Service-to-service authorization: the caller and the end user are different principals
10.5Workload identity federation: trusting another platform's tokens
11.1Enforcing tenant isolation: tenant context from the principal, checked at every layer
11.2Cross-tenant vulnerabilities: when the provider's own boundary fails
12.1The supply-chain threat model: every step between commit and deploy
12.2Dependency confusion and typosquatting: the resolver chooses the attacker
12.3SLSA and build provenance: a signed statement of how an artifact was made
12.4Sigstore: keyless signing with transparency logs
12.5Reproducible builds: verifying a binary by building it again
12.6Admission policy: verifying an artifact before it runs
13.1Case study: a consumer signing key that minted enterprise tokens
13.2Case study: a stolen session that bypassed MFA and forced a secrets rotation
Skipped topics
Moved past without finishing. A skipped topic still closes its module, and Continue goes on without it — open one to read it or mark it understood.