Repository navigation
fix(web): no-store per-user auth/user response (was cacheable PII) - #1113
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: OWASP/OpenCRE/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. Summary by CodeRabbit
WalkthroughThe cache-control hook now applies ChangesPer-user endpoint cache control
Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The per-user endpoints are marked no-store, and the regression test covers all three routes. No merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change reduces the chance that a browser or shared cache serves one user's identity to another. It does not change endpoint access, but cache behavior in deployed infrastructure has not been verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Per @northdpole's go-ahead.
/rest/v1/auth/user(and the/rest/v1/useralias) returns thelogged-in user's email, but the
after_requesthook stamped itCache-Control: max-age=300— thesibling
/rest/v1/user/resourceswas alreadyno-storeed in the same hook,auth/user+ aliaswere just missed.
Fix: add both per-user identity paths to the existing no-store branch. Reproduced before/after via
the test client (was
max-age=300, nowno-store), plus a regression test assertingno-storeonall three per-user endpoints (fails on unfixed main, passes with the fix).
Low severity — impact is shared-device / post-logout browser cache serving a prior user's email;
CDN vector is deployment-dependent.