quarterdeck

by Rotational Labs

Helm chartv0.19.0App 0.19.0Verified publisher

Distributed authentication and authorization service for Rotational applications.

About this chart

Quarterdeck

Fetch Metadata CSRF protection

Quarterdeck uses Gimlet's Fetch Metadata CSRF protection. Same-origin mutations pass; same-site mutations require a trusted exact Origin. Requests with missing or unknown fetch metadata require a trusted Origin or Referer. Explicit cross-site mutations and Sec-Fetch-Site: none mutations are rejected by default. Safe methods default to GET,HEAD,OPTIONS.

Configure the middleware under quarterdeck.csrf:

quarterdeck:
  csrf:
    namespace: quarterdeck
    disable: false
    # Empty uses the chart's resolved CORS origins (quarterdeck.allowOrigins,
    # global.origins, or global.issuer, in that order).
    expectedOrigins: []
    safeHTTPMethods: [GET, HEAD, OPTIONS]
    allowMissingMetadata: false
    allowUnknownSite: false
    allowSiteNone: false
    allowedFetchModes: []
    allowedFetchDestinations: []
    requireFetchMode: false
    requireFetchDestination: false

expectedOrigins is a separate policy from CORS allowOrigins. It must contain exact browser-facing HTTP(S) origins, including scheme and non-default port when applicable; do not use wildcard domains or URL paths. Set expectedOrigins to a non-empty list to override the fallback. Lists are exported to the application as comma-separated environment variables. Boolean relaxations default to false; fetch mode and destination allowlists default to empty.

For example, with the following configured origins, leaving expectedOrigins empty trusts those same origins for CSRF checks:

global:
  origins:
    - https://quarterdeck.example.com
    - https://endeavor.example.com

Authentication cookie settings are independent from this CSRF configuration and are not changed by these options.

Deploy quarterdeck with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has quarterdeck on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartquarterdeck is pinned at v0.19.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply