Skip to content

docs: expand cache-header-tamper mitigations#63

Merged
jgowdy-godaddy merged 1 commit intomainfrom
docs/cache-header-aad-design-note
Apr 17, 2026
Merged

docs: expand cache-header-tamper mitigations#63
jgowdy-godaddy merged 1 commit intomainfrom
docs/cache-header-aad-design-note

Conversation

@jgowdy-godaddy
Copy link
Copy Markdown
Contributor

Summary

The previous "future hardening: AAD" note on cache-header tamper understated how much the real risk-level-downgrade threat is already neutralized by the layered checks in place today:

  • sso-jwt and awsenc both take `max(header, config)` for the risk level at read time (`sso-jwt-lib/src/cache.rs:57-59` for the concrete citation), so a header edit that tries to downgrade is clamped back to the configured minimum.
  • Server-side expiration on the issued credential (STS, JWT `exp`) is authoritative regardless of what the client cache header says.
  • Both consumers recheck payload-embedded timestamps (`token_iat` / `session_start` in sso-jwt, STS `Expiration` in awsenc) after decrypt.

Spell these out in `THREAT_MODEL.md` so reviewers don't have to trace the mitigations back through consumer code. Keep AAD binding noted as deferred — it's a trait-signature break across all four backends (SE, CNG, keyring, software) and every consumer, plus an on-disk format break, for a threat that's already handled at the application layer.

No code change.

Test plan

  • Docs-only change.

The previous 'future hardening: AAD' note understated how much the
real risk is already neutralized by the layered checks that are in
place today:

- sso-jwt and awsenc both take max(header, config) for the risk level
  at read time, so a header edit that tries to downgrade is clamped
  back to the configured minimum.
- Server-side expiration on the issued credential (STS, JWT exp)
  is authoritative regardless of what the client cache header says.
- Both consumers recheck payload-embedded timestamps after decrypt.

Spell these out in THREAT_MODEL.md so reviewers don't have to trace
the mitigations back through consumer code. Keep the AAD binding
noted as deferred — it's a trait-signature break across 4 backends
and every consumer, plus an on-disk format break, for a threat that
is already handled at the application layer.
@jgowdy-godaddy jgowdy-godaddy merged commit 54d1117 into main Apr 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants