docs(auth): record accepted-risk decision for SPA OIDC token storage (MAPPS-362) #425
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/MAPPS-362-oidc-token-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
MAPPS-362 (accepted-risk tracking, LOW severity). Records the deliberate decision about SPA OIDC token storage, and answers the browser-held-refresh-token question. Docs + one cross-reference comment; no behavior change.
Changes
docs/oidc-token-storage.md: the token-storage model (access/id/refresh insessionStorage,src/modules/oidc/storage.rs; ID token decoded unverified for display,tokens.rs:59), the risk (web-storage/WASM readable by scripts -> XSS exfil; OAuth BCP discourages a browser-held refresh token), the mitigations (short access-token TTL, OP-side refresh rotation + family-reuse detection, TLS-only delivery, PKCE,noncevalidation +return_tosanitization,sessionStorageoverlocalStorage, backend re-validation of the access token), the decision (keep the SPA public-client model, accept the risk), the deferred httpOnly-cookie BFF option with its cost, and the triggers to revisit.storage.rsmodule comment.Decision recorded
Accept the SPA public-client model per the issue's framing (deliberate tradeoff, BFF "not mandated"). If you'd rather commit to the BFF migration instead, that's a materially larger change and would be its own issue - say so and I'll re-scope.
AC status
use_token_refresh->grant_type=refresh_token,offline_accessrequested; no backend session to hold it -> relocating it = the BFF). Documented; not moved (that is the deferred BFF).Testing
Docs + a module-doc comment only;
cargo fmt --all --checkclean, no em-dash. No runtime change.