Skip to content
Myr

.env.schema

This file

Path

apps/platform/.env.schema

53 lines · 2.3 KiB

Last changed by

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

History of this file

Take it

1# The platform Worker's secrets. Non-secret settings live in wrangler.jsonc2# `vars`. Values go in apps/platform/.env.local (gitignored), encrypted with3# `varlock encrypt --file apps/platform/.env.local`; a person sets them, and4# the deploy hands them to the Worker. The Worker never imports varlock.5#6# @import(../../, pick=[APP_ENV])7# @defaultRequired=infer @defaultSensitive=false8# ---910# The bearer token of the one operator session. Anyone holding it calls the11# contracts as `OPERATOR_HANDLE` (wrangler.jsonc).12# @required @sensitive @type=string(minLength=32)13OPERATOR_TOKEN=1415# Named sessions beside accounts: a JSON object from token to16# handle, `{"<token>":"alice"}`, for the examples' fictional people. Each token17# is at least 32 characters. The operator's token wins if both name one.18# @optional @sensitive19SESSION_TOKENS=2021# Sign-in: the key a sign-in in progress is sealed into its form22# with (HMAC-SHA-256), and each mailed code's HMAC under it, at least 3223# characters. Accounts are the platform's own; the only outside service is24# the `EMAIL` binding (wrangler.jsonc), whose sending domain is onboarded25# for Email Sending on the account.26# @required @sensitive @type=string(minLength=32)27COOKIE_KEY=2829# Sign-in: the pepper every password is HMAC'd with before PBKDF2,30# at least 32 characters. Without it a copy of the accounts table is31# useless; changing it makes every stored password fail to verify.32# @required @sensitive @type=string(minLength=32)33PASSWORD_PEPPER=3435# Google sign-in, optional: the id of the platform's Google OAuth36# client, a "Web application" client whose authorised redirect URI is37# `<platform origin>/oauth/google/callback`. Set it with38# GOOGLE_CLIENT_SECRET or not at all; with neither, sign-in offers only a39# password. Not secret: Google shows it to everyone who signs in.40# @optional41GOOGLE_CLIENT_ID=4243# Google sign-in, optional: that client's secret, set with its id.44# @optional @sensitive45GOOGLE_CLIENT_SECRET=4647# Write-only env values: the 256-bit key, as 64 hex characters, that48# wraps the data key of every value a maintainer sets (WebCrypto, AES-GCM).49# Losing it loses every stored value: nobody, the platform included, can50# open one again. Keep a copy outside this machine. Changing it needs every51# value re-wrapped first.52# @required @sensitive @type=string(isLength=64, matches=regex("^[0-9a-fA-F]{64}$"))53MASTER_KEY=