.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 fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–14why, one step back1# 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=14Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 15why, one step back15# Named sessions beside accounts: a JSON object from token toMerge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf
line 16why, one step back16# handle, `{"<token>":"alice"}`, for the examples' fictional people. Each tokenMerge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 17–20why, one step back17# is at least 32 characters. The operator's token wins if both name one.18# @optional @sensitive19SESSION_TOKENS=20Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 21why, one step back21# Sign-in: the key a sign-in in progress is sealed into its formSign people in by a proven email, with a display name, and Google's emailoscabrielbefore adoption125964c
lines 22–25why, one step back22# 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.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 26–28why, one step back26# @required @sensitive @type=string(minLength=32)27COOKIE_KEY=28Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 29why, one step back29# Sign-in: the pepper every password is HMAC'd with before PBKDF2,Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 30–34why, one step back30# 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=34Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 35why, one step back35# Google sign-in, optional: the id of the platform's Google OAuthMerge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
line 36why, one step back36# client, a "Web application" client whose authorised redirect URI isClose W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 37why, one step back37# `<platform origin>/oauth/google/callback`. Set it withMerge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 38–42why, one step back38# 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=42Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042
line 43why, one step back43# Google sign-in, optional: that client's secret, set with its id.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 44–46why, one step back44# @optional @sensitive45GOOGLE_CLIENT_SECRET=46Drop the private build plan's citations from the code, and fail verify if one comes backoscabrielbefore adoptiona29cef6
line 47why, one step back47# Write-only env values: the 256-bit key, as 64 hex characters, thatMerge build/maintainer-wording into mainoscabrielbefore adoption4c1a571
line 48why, one step back48# wraps the data key of every value a maintainer sets (WebCrypto, AES-GCM).Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 49–53why, one step back49# 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=