US08-01 — Make the Trust Boundary Configurable and Authenticated #87
Notifications
Due Date
No due date set.
Blocks
Depends on
#89 US08-03 — Compose the Runtime and Mount the Library Safely
domverse/photoanalyzer
#91 US08-05 — Automate Container Deployment Acceptance
domverse/photoanalyzer
#39 US07-02 — Harden API Authorization and Path Boundaries
domverse/photoanalyzer
Reference: domverse/photoanalyzer#87
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Source specification: delivery_backlog/stories/US08-01-trusted-hosts-auth.md
US08-01 — Make the Trust Boundary Configurable and Authenticated
Epic: E08
As an operator, I want to reach the application through my own hostname without
weakening it, so a container behind a reverse proxy is as safe as the loopback
deployment it replaces.
Context
photo_pipeline/api/security.pyrefuses any request whoseHostorOriginis notloopback. That check is the current stand-in for authentication: whoever can reach
127.0.0.1:8000is the owner. Behind a proxy the hostname is no longer loopback, sorelaxing the check without adding an authentication gate would publish the library.
Acceptance criteria
PHOTO_PIPELINE_*), default tothe current loopback set, and an unset configuration behaves exactly as today.
refuses to serve without one; loopback-only deployments keep working with no secret.
bootstrap endpoint; every protected route keeps its current session and CSRF
requirements unchanged.
X-Forwarded-Proto,X-Forwarded-Host) are honored only from aconfigured trusted proxy and ignored otherwise, so a client cannot forge its origin.
Securewhen the effective external scheme is HTTPS.or any request body.
Automated tests
unconfigured host, forged forwarded headers, and trusted-proxy forwarded headers.
secret, replay of an old session, cross-site request, and unauthenticated access to
every route class.
Dependencies
Claimed for implementation on branch
us/US08-01-make-the-trust-boundary-configurable-and-authent.Submitted for review: #96
Tests passed:
work_item/scripts/python -m unittest discover -s work_item/tests -vwork_item/scripts/python -m pytest tests -qwork_item/scripts/python -m pytest tests/unit/test_security_policy.py tests/integration/test_trusted_hosts.py -qCompleted and merged via PR #96.