feat(openapi): persist Swagger authorization only in development profile - #804
feat(openapi): persist Swagger authorization only in development profile#804seonghobae wants to merge 5 commits into
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Current exact boundary
develop@e06b1f3fb10903569124af011da213951e6e24730a67037ce7e21e7dbd020b20eda2e74470b98540src/newsdom_api/main.py,tests/test_health.py,CHANGELOG.md.Jules/palette.mdrule was restored to the protected-base blob; this product-local choice is not repository-wide UX doctrine.Product contract
FastAPI's Swagger UI configuration now sets
persistAuthorization: trueonly whenRuntimeProfile.DEVELOPMENTis selected. Production retains Swagger UI's default behavior and does not opt into persisted authorization state.Swagger UI documents
persistAuthorizationasfalseby default and states that enabling it preserves authorization data across browser close/refresh. That is the exact behavior this bounded DX change intentionally uses; it is not an accessibility-conformance claim or a general credential-storage recommendation.The focused test now exercises the positive path with a development-profile bearer token rather than disabling authentication, while the production-profile test verifies
persistAuthorizationremains absent. The CHANGELOG records the same development-only boundary.Security / UX boundary
Persisting a development token extends its lifetime inside that browser context. The change therefore stays limited to the explicit development runtime profile and makes no claim that shared/untrusted browser profiles are appropriate for secrets. Production remains fail-closed at the existing authentication boundary and does not inherit this UI convenience setting.
Promotion boundary
Keep Draft until this exact head has terminal applicable CI, security/SAST/dependency evidence, current review/thread resolution and qualifying independent review under live protection. Queued, pending, stale, predecessor, model-only, author-only or absent evidence is non-passing. No self-approval, admin bypass, gate weakening, force push, destructive rebase or no-op retrigger.