Bind operator security checks to a canonical public origin #609

Closed
opened 2026-08-12 01:49:46 +00:00 by rockachopa · 0 comments
Member

Problem

Operator-mode CSRF and passkey trust currently derive from request URL metadata, so a forwarded untrusted Host can redefine the expected origin. Operator responses also omit HSTS. No historical issue or recent commit covers a canonical public-origin trust boundary.

Scope

  • Require a valid HTTPS STACKCHAIN_DASHBOARD_PUBLIC_ORIGIN in operator mode.
  • Reject requests whose host does not match that canonical authority before authentication.
  • Derive CSRF and default WebAuthn origin/RP ID from the canonical origin.
  • Emit HSTS for operator-mode responses.
  • Preserve explicit insecure-local development behavior and subpath deployment.

Acceptance tests

  • Missing/invalid canonical origin fails closed in operator mode.
  • Foreign Host is rejected before session/Gitea access.
  • CSRF accepts only the configured origin regardless of Host.
  • Passkey defaults are request-independent.
  • Operator responses include HSTS; insecure-local responses do not.
  • Full suite remains green.
## Problem Operator-mode CSRF and passkey trust currently derive from request URL metadata, so a forwarded untrusted Host can redefine the expected origin. Operator responses also omit HSTS. No historical issue or recent commit covers a canonical public-origin trust boundary. ## Scope - Require a valid HTTPS `STACKCHAIN_DASHBOARD_PUBLIC_ORIGIN` in operator mode. - Reject requests whose host does not match that canonical authority before authentication. - Derive CSRF and default WebAuthn origin/RP ID from the canonical origin. - Emit HSTS for operator-mode responses. - Preserve explicit insecure-local development behavior and subpath deployment. ## Acceptance tests - Missing/invalid canonical origin fails closed in operator mode. - Foreign Host is rejected before session/Gitea access. - CSRF accepts only the configured origin regardless of Host. - Passkey defaults are request-independent. - Operator responses include HSTS; insecure-local responses do not. - Full suite remains green.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#609
No description provided.