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

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 back
1# The platform Worker's secrets. Non-secret settings live in wrangler.jsonc
2# `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=14

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 15why, one step back
15# Named sessions beside accounts: a JSON object from token to

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

line 16why, one step back
16# handle, `{"<token>":"alice"}`, for the examples' fictional people. Each token

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 17–20why, one step back
17# is at least 32 characters. The operator's token wins if both name one.
18# @optional @sensitive19SESSION_TOKENS=20

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 21why, one step back
21# Sign-in: the key a sign-in in progress is sealed into its form

Sign people in by a proven email, with a display name, and Google's emailoscabrielbefore adoption125964c

lines 22–25why, one step back
22# with (HMAC-SHA-256), and each mailed code's HMAC under it, at least 32
23# 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 back
26# @required @sensitive @type=string(minLength=32)
27COOKIE_KEY=28

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 29why, one step back
29# 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 back
30# at least 32 characters. Without it a copy of the accounts table is
31# useless; changing it makes every stored password fail to verify.32# @required @sensitive @type=string(minLength=32)33PASSWORD_PEPPER=34

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 35why, one step back
35# Google sign-in, optional: the id of the platform's Google OAuth

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

line 36why, one step back
36# client, a "Web application" client whose authorised redirect URI is

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 37why, one step back
37# `<platform origin>/oauth/google/callback`. Set it with

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 38–42why, one step back
38# GOOGLE_CLIENT_SECRET or not at all; with neither, sign-in offers only a
39# password. Not secret: Google shows it to everyone who signs in.40# @optional41GOOGLE_CLIENT_ID=42

Close W7: cross-compile the release again, guard pi's edits, and keep the swarm out of this checkoutoscabrielbefore adoption842f042

line 43why, one step back
43# 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 back
44# @optional @sensitive
45GOOGLE_CLIENT_SECRET=46

Drop the private build plan's citations from the code, and fail verify if one comes backoscabrielbefore adoptiona29cef6

line 47why, one step back
47# Write-only env values: the 256-bit key, as 64 hex characters, that

Merge build/maintainer-wording into mainoscabrielbefore adoption4c1a571

line 48why, one step back
48# 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 back
49# Losing it loses every stored value: nobody, the platform included, can
50# 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=