Configuration Reference

For an operator wiring a deployment, or an agent editing docker-compose.yml or config/: this page is the one home for variable names, defaults and the secrets workflow. Ports live in Services; first run in Local Development; topology, profiles, databases and health in Deployment Guide.

Layering and CANOPY_ENV

Every axum service loads its settings through canopy_common::settings::load_service_config (ADR-012). Four tiers, lowest precedence first; a later tier overrides an earlier one key by key:

  1. {config_root}/canopy-<svc>/default.yaml — checked in; exactly one per service. It names no configuration source (below).

  2. {config_root}/canopy-<svc>/{tier}.yaml — optional overlay, named only by an explicit CANOPY_ENV on ADR-012’s mapping: dev for development and prod for production (each case-insensitive), the value itself otherwise (CANOPY_ENV=staging names staging.yaml). Unset or empty names no overlay, and neither does dev, which is not a development value (#2632). Every service ships one overlay, the development dev.yaml, and it carries only the devstack’s configuration source.

  3. The unprefixed whole-stack variables CANOPY_CONFIG_SOURCE, CANOPY_POLICY_ROOT and CANOPY_CONFIG_ALLOW_UNVERIFIED (Configuration source (CANOPY_CONFIG_SOURCE)), each applied only when non-empty.

  4. CANOPY_<SVC><KEY> — the environment, one double underscore after the service prefix (CANOPY_SNAPRULES_URL sets rules_url).

An empty override is refused (#2635). A CANOPY_<SVC>__<KEY> variable that is set but empty stops the boot with env variable "…" is set but empty, whatever the setting's type. It is neither applied as "" over the YAML tiers nor dropped in their favour: a variable that expanded to nothing in a deployment template is the usual cause, and either reading would hide it. Unset the variable to take the tiers' value. A key a service reserves for its own reader (a signing key, say) is outside the loader and keeps that reader's rule.

A config key takes no index (#2699). A YAML tier’s top-level key, or a CANOPY_<SVC>… variable name, that carries an index postfix ([, as in x[0]) is refused at boot, naming the tier or the variable. The config crate parses each such name as a path and grows an array to its index, so x[9223372036854775807]: 1 would otherwise panic the boot before any refusal ran. Nest with in the environment, and with a YAML map in a tier. ObjectStoreConfig (CANOPY_STORE__…) refuses an indexed variable name the same way.

{config_root} is CANOPY_CONFIG_ROOT, else the working directory; compose sets /app/config on every service. The collected map is partitioned by ServiceSettings::FIELDS (crates/canopy-common/src/settings.rs): baseline keys go to the shared struct, everything else to the service’s own struct, and both are #[serde(deny_unknown_fields)], so a misspelled key fails boot naming itself. Keys a service reads outside serde — secrets and accountable overrides — are its reserved_keys: removed from the environment tier before deserialization, and a boot failure if written into a YAML tier.

CANOPY_ENV has two roles, which agree on what is development:

  • Overlay file name — tier 2 above. The development overlay, dev.yaml, loads exactly when is_development() is true, so a deployment that leaves CANOPY_ENV unset or empty, guarded as production, loads no development overlay (#2632).

  • Permissiveness recognizer — canopy_common::env::is_development() is true only for development (case-insensitive). Unset means production: DB TLS required, DB-name mismatch fatal, Local object store refused, CANOPY_ENCRYPTION_KEY required, CORS refused, /readyz error detail suppressed, the portal’s no-op CAPTCHA refused. The devstack sets development on every canopy- service, the portal included; .cargo/config.toml sets it for host cargo run and cargo test.

The configuration source is required, with no shipped default

config_source follows the CANOPY_ENV secure-by-default rule (#2627): development may default it, anything else must set it. No shipped default.yaml names one, so a deployment sets CANOPY_CONFIG_SOURCE (every service), CANOPY_<SVC>CONFIG_SOURCE (one service) or a YAML tier of its own. A boot whose tiers name none, or a blank one, is refused before deserialization: no configuration source is configured: set CANOPY_CONFIG_SOURCE (every service) or CANOPY_<SVC>CONFIG_SOURCE (this service) …, from both load_service_config and the portal’s load_single. The only checked-in tier that names one is the development overlay, config/canopy-<svc>/dev.yaml, which the devstack loads because every service there runs with CANOPY_ENV: development (a host run reads it only with CANOPY_CONFIG_ROOT=config set, the config root otherwise being the working directory; .cargo/config.toml sets the development CANOPY_ENV). It names the federal and Georgia configuration repositories as git sources on main, read from the tree the fetcher published under the policy root, and CANOPY_CONFIG_SOURCE still overrides it. cargo xtask neutrality-lint (detector config-jurisdiction) refuses a top-level config_source or jurisdiction key in any other file under config/.

The YAML tiers only name the source; the policy itself is read through the configuration layers it lists, file by file (Configuration source (CANOPY_CONFIG_SOURCE), Rulesets).

Paired processing clocks

The SNAP processing clocks live under two keys each: [snap.issuance].standard_days / expedited_days (canopy-enrollment) and [shared.application_processing].snap_standard_days / snap_expedited_days (canopy-applications). cargo xtask rules processing-days — the processing-days-parity stage of cargo xtask validate — fails when a pair disagrees in a jurisdiction.toml or when the checked-in YAML tiers point the two services at different files. A deployment that splits CANOPY_ENROLLMENTCONFIG_SOURCE and CANOPY_APPLICATIONSCONFIG_SOURCE in the environment must keep both files' clocks equal itself.

Configuration source (CANOPY_CONFIG_SOURCE)

A deployment’s policy (its pack, the federal tables, the notice templates) is configuration in ordered layers, not part of the service settings (ADR-051). Three baseline keys name it, on every axum service (Baseline variables (ServiceSettings, every axum service)) and, declared by PortalConfig itself, on the portal; each also has a whole-stack unprefixed variable (tier 3 above), which CANOPY_<SVC>__<KEY> overrides:

Variable (key) Default Meaning

CANOPY_CONFIG_SOURCE (config_source)

required outside development (dev: dev.yaml)

The layers, comma-separated, lowest precedence first: <name>=<source>. A source is path:<dir> (a working copy, read where it stands), or git+https://… / git+ssh://… with exactly one of #branch=<name> or #tag=<name>, optionally &verify=head|tag|tag-and-head (default head for a branch, tag for a tag; a branch cannot verify a tag) and optionally &sha=<40 hex>, the commit canopy-config-fetch resolve pinned for a rollout. A pin must be a commit on the branch the source names, or the commit its tag points at; any other is refused. A layer name matches [a-z0-9][a-z0-9_-]{0,63} and appears once. Example: federal=git+https://…/canopy-config-federal.git#tag=federal-2026.11.0,georgia=git+https://…/canopy-config-georgia.git#branch=ga/production.

CANOPY_POLICY_ROOT (policy_root)

/app/policy

Where each git source’s verified tree is published, <policy_root>/<name>/current → <name>/<sha>/, beside the publisher’s <name>/status.json. Unread when every source is path:. Distinct from CANOPY_CONFIG_ROOT, which holds the YAML tiers.

CANOPY_CONFIG_ALLOW_UNVERIFIED (config_allow_unverified)

false

Lets a list of only path: sources load unverified (the devstack and a pack author’s loop). Read only when every source is path:; set beside any git source, it refuses the boot.

canopy-config-fetch publishes each git source under the policy root (Deployment Guide › Fetching configuration). It reads CANOPY_CONFIG_SOURCE and CANOPY_POLICY_ROOT as the services do, and one variable of its own, CANOPY_CONFIG_TRUST_DIR (/app/config-trust in its image): the directory holding each source's trust root, <name>.allowed_signers or <name>.openpgp with <name>.openpgp.asc. The shipped tiers and the devstack name path: sources only.

Each layer’s manifest. A layer’s root carries canopy-config.toml (crates/canopy-config/src/manifest.rs):

schema = 1                  # the config schema major; any other is refused
layer = "jurisdiction"      # base | jurisdiction | deployment
jurisdiction = "georgia"    # jurisdiction layers only, and required there
overrides = []              # lower-layer decisions this layer replaces; an undeclared one refuses canopy-rules

The deployment’s jurisdiction is the slug its jurisdiction layers name; there is no jurisdiction setting.

Resolution. A file resolves to the highest-precedence layer that holds it, and a directory lists the union of the layers' entries, each resolved the same way; nothing is merged inside a file (Rulesets › Layers). Each service loads one ConfigSnapshot at boot, before telemetry (canopy_api::bootstrap_requiring), resolves each layer’s current link once and never re-reads it, so a later publish takes effect on restart.

Refusals. The boot is refused, the message naming the layer to fix, when:

  • the list is empty, an entry does not parse, a layer name is invalid or repeated, a git source names no #branch= or #tag=, or a branch source asks to verify a tag;

  • a git URL carries userinfo: credentials come from the git credential environment, never the source string, which is logged and shown on GET /version;

  • a path: source loads without CANOPY_CONFIG_ALLOW_UNVERIFIED=true, or beside a git source; or the flag is set beside a git source;

  • a git layer has no published tree (the reason from its status.json when its last sync refused), or its tree is not named by a 40-hex commit;

  • a layer has no canopy-config.toml, the manifest is invalid, or it declares a schema other than 1;

  • no layer is a jurisdiction layer, or two jurisdiction layers name different slugs.

A git layer whose status.json records a refused sync but which still has a published tree loads that last good tree and is reported stale: /readyz answers 503 until a sync succeeds (Deployment Guide › Health).

What a process runs on. GET /version on every service (the canopy-api services, canopy-web and the portal) answers the layers and the commit each was loaded at (path for a working copy) and whether every layer was verified (Services); the boot log line starting <service> service carries the same stamp as config=name@sha,….

Retired. CANOPY_JURISDICTION, CANOPY_RULESETS_DIR and the keys jurisdiction, rulesets_dir (every service), federal_rulesets_dir (canopy-rules) are gone with no alias; a YAML tier or CANOPY_<SVC>__… variable that still sets one fails boot as an unknown key, while an exported unprefixed CANOPY_JURISDICTION or CANOPY_RULESETS_DIR is simply no longer read. canopy-seed’s --jurisdiction / --rulesets-dir are --config-source, --policy-root and --config-allow-unverified. The cargo xtask commands that take --jurisdiction <slug> keep it: they stack that pack’s in-source layers themselves (xtask/src/config_layers.rs).

Baseline variables (ServiceSettings, every axum service)

Read as CANOPY_<SVC>__<KEY>; the authoritative list is ServiceSettings::FIELDS. canopy-portal is not a canopy-api service and has no baseline (see canopy-portal (applicant portal BFF)).

Key Type Default Meaning

PORT

u16

required

HTTP listen port. Container ports: Services.

DATABASE_URL

String

required

PostgreSQL URL. Outside development it must carry sslmode=verify-ca or verify-full, and its database name must match the service (ADR-001). Those two modes check the server's certificate, against the system's certificate store and the PEM file sslrootcert names; verify-full also checks that it names the host. require is refused: it encrypts but accepts any certificate (Deployment guide, TLS to the database).

MIGRATION_DATABASE_URL

String

unset

Dedicated URL for the migration phase only; unset ⇒ migrations run on DATABASE_URL. Same name guard. canopy-reporting (canopy-reporting) and canopy-security (canopy-security) set it.

RABBITMQ_URL

String

required

AMQP URL; amqps:// in production.

IDENTITY_ISSUER

String

required

canopy-identity’s issuer identifier (ADR-049 Amendment 14): the iss every token the service’s receiver accepts carries, under the rules of canopy-security’s own IDENTITY_ISSUER. A malformed pair refuses the boot before any connection. Devstack: https://web.canopy.test:<port>/identity, on the TLS ingress’s port.

IDENTITY_INTERNAL_URL

String

required

The same issuer’s base URL inside the deployment’s network: the receiver fetches {internal}/jwks and the sender asks {internal}/token there. Devstack: http://canopy-security:8012/identity.

LOG_LEVEL

String

info

Default tracing filter; a RUST_LOG in the environment replaces it (Process-wide variables (no service prefix)).

CONFIG_SOURCE

layer list

required outside development (dev: dev.yaml)

Per-service pin over CANOPY_CONFIG_SOURCE and the YAML tiers. No shipped default.yaml names one; a boot that names none, or a blank one, is refused naming CANOPY_CONFIG_SOURCE and this key (The configuration source is required, with no shipped default). Bootstrap loads the layers before anything else and reads the ADR-041 logging redaction policy through them (Rulesets › Logging redaction policy); grammar and refusals: Configuration source (CANOPY_CONFIG_SOURCE).

POLICY_ROOT

path

/app/policy

Per-service pin over CANOPY_POLICY_ROOT: where the git sources' verified trees are published (Configuration source (CANOPY_CONFIG_SOURCE)).

CONFIG_ALLOW_UNVERIFIED

bool

false

Per-service pin over CANOPY_CONFIG_ALLOW_UNVERIFIED: a list of only path: sources may load unverified; refused beside a git source (Configuration source (CANOPY_CONFIG_SOURCE)).

CORS_ORIGINS

String

http://localhost:3000,http://localhost:8080

Comma-separated origins; * is refused outside development.

BODY_LIMIT

usize

2097152

Maximum request body in bytes (2 MiB).

DB_MAX_CONNECTIONS

u32

10

Pool size. canopy-web opens two pools of this size on its database, so it holds up to twice this many connections per replica. One is the session store’s own, which no other code shares (#2224); the other is the one every other handler uses. The split is for capacity: every request to a signed-in route (behind the session layer) that carries a session cookie loads its session on the store’s pool before its handler runs, and the refresh claim, sign-in and sign-out write on it, so handlers holding every connection of the other pool cannot stall authentication, and /readyz (which gates on the store’s pool) still reports whether the replica can authenticate. Both pools reach the same server, so the split guards against one pool’s exhaustion, not a slow database.

DB_IDLE_TIMEOUT_SECS

u64

600

Pool idle timeout.

DB_STATEMENT_TIMEOUT_SECS

u64

30

1..=300; a value outside refuses the boot. How long the database lets one statement on the application pool run (ADR-053). It is sent as the statement_timeout startup option of every connection, so a connection pooler between a service and its database must pass startup options through, or the limit is silently absent. A statement past it is cancelled (SQLSTATE 57014) and answered 504 db_statement_timeout. The migration pool has no limit; a background job that needs longer sets its own for one transaction.

ADMIN_UNIT_LABEL

String

County

Display label for the administrative unit (Parish, Borough, Chapter, Municipio).

SESSION_TTL_SECONDS

u64

0

0 = service default. canopy-web: the worker session’s sliding idle deadline, 28800 (8 h), floor 300, read at boot; a request slides it when less than the deadline less 60 s is left (#2518). canopy-portal ignores it — its TTL is per flow (FlowKind::ttl in services/canopy-portal/src/session.rs: 30 min apply/recovery/renewal, 2 h steady state, 15 min kiosk).

RATE_LIMIT_RPM

u64

6000

Per-IP requests per minute; 0 disables.

RATE_LIMIT_REDIS_URL

String

unset

Redis behind the replica-aware limiter (the devstack sets redis://redis:6379 on canopy-web). Unset, or on Redis failure or a slow Redis, the service uses the process-local limiter, and each replica counts on its own. Consumed only by binaries built with canopy-api’s rate-limit-redis feature.

SKIP_MIGRATIONS

bool

false

true = bootstrap runs no migrator; a deploy-time job owns the schema (canopy-manage migrate apply --service <svc>). Refused in development unless the next key is also set.

MIGRATIONS_JOB_CONFIGURED

bool

false

Declares the migration job wired; gates SKIP_MIGRATIONS in development and means nothing alone.

INBOX_RETENTION_DAYS

non-zero u16

7

Days the service’s event_inbox keeps a processed row before the inbox janitor deletes it; zero, negative or non-numeric fails the boot. Unprocessed and parked rows are never deleted (Event-Delivery Protocol › Inbox retention, #2470).

A service’s outbound identity

A service’s outbound identity is its canopy-identity client key, CANOPY_<SVC>__IDENTITY_CLIENT_PRIVATE_KEY (Secrets): canopy_api::bootstrap builds the sender (IdentitySender::from_secrets) of each service that runs as a confidential client from it through the audited provider, and such a service refuses to boot without it, before its migrations. canopy-rules, canopy-persons and canopy-security send nothing and hold no key; canopy-web and canopy-portal build their own senders from theirs (canopy-web (worker portal BFF), canopy-portal (applicant portal BFF)). Which services a client may call, and with which token, is compiled, not configured (IdP Integration › Registering canopy’s clients).

Process-wide variables (no service prefix)

Read straight from the environment, outside the loader. Wherever a variable read this way has a default or a fallback, an empty value counts as unset and takes it, as ${VAR:-default} does (canopy_common::env::non_empty and its readers configured / configured_os, #2626); xtask’s path_var_lint test refuses a read under xtask/src, services/, crates/ or tools/ that writes its own fallback, or reads a path-like variable, without going through them. A secret holds to the stricter blank rule instead (Secrets). The loader’s environment tier (CANOPY_<SVC>__<KEY>, Layering and CANOPY_ENV) is stricter still: an empty KEY= there refuses the boot, naming the variable (#2635).

Variable Default Meaning

CANOPY_ENV

unset (= production)

See Layering and CANOPY_ENV.

CANOPY_CONFIG_SOURCE

required outside development, unless every service sets CANOPY_<SVC>__CONFIG_SOURCE

Whole-stack configuration layers (tier 3; Configuration source (CANOPY_CONFIG_SOURCE)); the shipped config names none outside the development overlay (The configuration source is required, with no shipped default). Compose merges it into every service through the x-canopy-shared-env anchor, so exporting it before cargo xtask dev reload boots the devstack on another layer stack (Local Development › Switching packs). The scheduled fixture-smoke lane sets this variable to each fixture pack's layer stack (test-min, test-max, default).

CANOPY_POLICY_ROOT

/app/policy

Whole-stack policy_root (tier 3; Configuration source (CANOPY_CONFIG_SOURCE)).

CANOPY_CONFIG_ALLOW_UNVERIFIED

false

Whole-stack config_allow_unverified (tier 3; Configuration source (CANOPY_CONFIG_SOURCE)).

CANOPY_CONFIG_ROOT

.

Root of the canopy-<svc>/*.yaml tiers; /app/config in compose.

CANOPY_TRUSTED_PROXIES

unset (trust none)

The proxies whose X-Forwarded-For is believed, comma-separated, each an exact address or a CIDR range, IPv4 or IPv6 (10.0.0.0/8, fd00:1::/64; #2846), so replicas with dynamic addresses can be named by their network (canopy_common::http::client_ip; ADR-049 Amendment 22). A request is attributed to its socket peer, or to the leftmost X-Forwarded-For hop only when that peer is listed: the per-IP limiters key on that client, and canopy-security’s issuance log records it as peer_addr. Blank entries are skipped. An entry that is neither an address nor a range is warned at startup and ignored, since a mistyped proxy puts every client it forwards in one bucket. So is a range with host bits set (10.0.0.1/8), which may mean the one address or the whole range: name the network (10.0.0.0/8) or the address. A range trusts every address in it, so list the narrowest network the proxies get addresses from. A listed proxy must overwrite X-Forwarded-For, never append to it, or its clients choose their own key. Read when each router is built. The devstack sets none; a production chain sets it on canopy-web and canopy-security (Deployment Guide › The proxy chain).

CANOPY_ENCRYPTION_KEY

required outside development

Base64 32-byte AES-256-GCM key (crates/canopy-common/src/crypto.rs; ADR-036). Read through the audit-logged secret provider, like _PREVIOUS and _VERSION below (#2490). The sealing services — persons, reporting, snap, tanf, medicaid, caps, wic — call require_env_kek as the boot requirement of canopy_api::bootstrap_requiring, right after telemetry installs and before the migration phase, and canopy-manage migrate apply re-checks it for them. Generate: openssl rand -base64 32. Devstack value: secrets/dev.yaml shared.encryption_key.

CANOPY_ENCRYPTION_KEY_PREVIOUS

unset

The retiring KEK during a rotation window: tried on unwrap after the current key fails. Set only between the rotation and the completed canopy-manage rewrap-keks runs (Security Operations › The KEK); requires CANOPY_ENCRYPTION_KEY and a CANOPY_ENCRYPTION_KEY_VERSION of at least 2, or the service refuses to start. Empty counts as unset.

CANOPY_ENCRYPTION_KEY_VERSION

1 when _PREVIOUS is unset

Positive SMALLINT naming the current KEK’s generation; every DEK wrapped under it records the number in redaction_keys.kek_version, which is how the rewrap job finds the rows still under a retired key (#2113). Unset or empty means 1 (the pre-rotation state, logged at info) only while _PREVIOUS is unset; once _PREVIOUS is set it is required and must be ≥ 2. Bump it by one at every rotation and keep it after _PREVIOUS is dropped. Malformed (non-integer, 0, negative, above 32767) always refuses.

CANOPY_PROGRAM_URL_{SNAP,TANF,MEDICAID,CHIP,CAPS,WIC}

unset

Program service base URLs the eligibility orchestrator fans out to (services/canopy-eligibility/src/registry.rs); CHIP points at canopy-medicaid.

CANOPY_VERIFY_KEY_{PROGRAM}

—

Current public verification key PEM per program, read by canopy-eligibility through the secret provider (VerifyingKeyRegistry::from_secrets, crates/canopy-signing/src/verifier.rs); in development only, .keys/<program>-public.pem stands in (Secrets). A program with neither verifies through canopy-security’s signing_key_history alone, which also serves the retired keys (ADR-036).

RUST_LOG

unset

EnvFilter directive; when present it replaces the service’s LOG_LEVEL.

OTEL_EXPORTER_OTLP_METRICS_ENDPOINT (or OTEL_EXPORTER_OTLP_ENDPOINT)

unset

When set, the service pushes OTLP/HTTP metrics there every OTEL_METRIC_EXPORT_INTERVAL ms (default 60000). Devstack: http://prometheus:9090/api/v1/otlp/v1/metrics, 5000 ms. canopy-api services serve no /metrics scrape route (crates/canopy-common/src/telemetry.rs).

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (or the global)

unset

When set, OTLP/gRPC trace export; each signal activates independently. A failed export is retried, up to three times with backoff. An endpoint written without a scheme is read as https, or as http when OTEL_EXPORTER_OTLP_TRACES_INSECURE=true. The devstack sets neither.

Event bus (canopy-mq)

Unprefixed knobs, read once at boot into canopy_mq::MqTuning (crates/canopy-mq/src/tuning.rs, #2578) and handed to the outbox drainer and the subscriber. An absent or empty knob takes its default. A value that does not parse (non-Unicode included), or that breaks its bound, refuses the boot naming the key; it never falls back to the default. The inbox janitor’s retention is the baseline INBOX_RETENTION_DAYS above.

Variable Default Meaning

CANOPY_MQ_DRAINER_TICK_MS

250

Sleep between outbox drain ticks; ≥ 1 (devstack: 25).

CANOPY_MQ_DRAINER_BATCH_SIZE

100

Per-tick claim ceiling; must be > 0.

CANOPY_MQ_DRAINER_PIPELINE_DEPTH

32

In-flight publish ceiling within a batch; must be > 0.

CANOPY_MQ_DRAINER_LEASE_TTL_SECS

60

Claim lease; boot-validated at ≥ 3× the worst-case batch publish time.

CANOPY_MQ_DRAINER_CONFIRM_TIMEOUT_SECS

30

Budget for one batch’s publish-plus-confirm exchange; must cover one worst-case batch publish and stay below the lease (checked at boot).

CANOPY_MQ_DRAINER_MAX_ATTEMPTS

10

Row-culpable publish attempts before a poison row parks. Parked rows degrade the /readyz outbox check; POST /v1/admin/events/replay unparks them. Infra failures never count.

CANOPY_MQ_OUTBOX_PENDING_ALERT_THRESHOLD

10000

Pending (unpublished, unparked) rows above which the outbox check reports degraded (ADR-018 alert threshold); must not be negative.

CANOPY_MQ_OUTBOX_OLDEST_AGE_ALERT_SECS

900

Oldest-unpublished age above which the outbox check degrades; must not be negative.

CANOPY_MQ_HELD_AGE_WARN_SECS

7200

Held-row age past which the held-row watch warns, and past which a program service lists a determination at GET /v1/held-determinations (#3065); ≥ 1.

CANOPY_MQ_OUTBOX_RETENTION_DAYS

7

Retention of already-published outbox rows; ≥ 1.

CANOPY_MQ_PREFETCH_COUNT

32

Per-consumer AMQP prefetch, 1 to 65535 (0 is AMQP’s unbounded prefetch and refused; devstack eligibility: 1, which canopy-eligibility requires at boot).

CANOPY_MQ_QUEUE_PREFIX

empty

Prefix applied to every declared queue name, so parallel deployments or test runs can isolate queues on one broker; routing keys are unaffected.

CANOPY_MQ_REPLICA_ID

unset

Replica suffix for per-replica queue names ({base}.{replica_id}); the last-resort fallback is the literal unknown.

CANOPY_MQ_UNPARK_INTERVAL_SECS

60

Unpark scan interval; ≥ 1.

Secrets

At rest. Secrets are SOPS-encrypted with age (ADR-017): one file, secrets/dev.yaml, whose recipients are the age public keys in .sops.yaml. The devstack values are fakes; production keeps its own encrypted files outside this repository. Git history keeps old ciphertext: removing a recipient protects only values encrypted afterwards, and rotation is the real revocation.

Tooling. cargo xtask secrets runs age and sops inside the canopy-devtools compose service (profile devtools); no host install is needed. The private key lives where sops itself looks for it — $XDG_CONFIG_HOME/sops/age/keys.txt, else ~/.config/sops/age/keys.txt, on Linux (xtask applies the same chain on every non-Windows host); %APPDATA%\sops\age\keys.txt on Windows, and when APPDATA is unset xtask rebuilds its default, %USERPROFILE%\AppData\Roaming — and is bind-mounted into the container (age_key_dir in xtask/src/devtools.rs).

Command Effect

cargo xtask secrets init

Generate the dev age keypair if missing and print the public key for .sops.yaml.

cargo xtask secrets edit

Open secrets/dev.yaml in $EDITOR through sops (decrypt on read, re-encrypt on save).

cargo xtask secrets decrypt

Print the decrypted file as a flat dotenv stream.

cargo xtask secrets add-recipient <age1…>

Append a recipient to .sops.yaml and re-encrypt the data key; run by an existing recipient.

cargo xtask secrets remove-recipient <age1…>

Drop a recipient from .sops.yaml and re-encrypt the data key without it; refuses the last recipient; rotate every value afterwards (Secret Management & Rotation).

cargo xtask secrets generate-signing-key

Print a fresh ECDSA P-256 PEM to paste under a service’s signing_key:.

A host with no age key (a CI job, a fresh checkout) needs none (#3247). Bring-up writes a generated CANOPY_ENCRYPTION_KEY into the .env secret floor (#3090) and a key pair per signing role under .keys/, and the integration and coverage lanes take that same set (secrets::dev_pairs), in the names secrets decrypt prints, so a test signs and decrypts with the values the stack it talks to holds. With an age key, both sides take the decrypted file. CI holds no SOPS key.

YAML to environment. canopy-<svc>: leaves become CANOPY_<SVC>__<KEY>; shared: leaves become CANOPY_<KEY> (single underscore); the sops: block is skipped; PEM values are dotenv-escaped (xtask/src/cmd/secrets.rs). The file carries shared.encryption_key and a signing_key for snap, tanf, caps, wic, medicaid and notices.

Injection. cargo xtask dev start|reload|restart|refresh decrypt and pass the pairs as process environment to docker compose, which fills the ${VAR:-} slots in docker-compose.yml. Without an age key the step is skipped with a warning. xtask also writes the single-line shared: values into a marker-delimited block of the gitignored workspace .env — the secret floor — so a compose invocation that does not thread the decrypted environment still interpolates the KEK; process environment wins over the file (xtask/src/docker.rs). Because the floor carries the KEK, the file is written readable by its owner only (0600 on Unix, #2679).

Loader policy. The signing keys (program services, canopy-notices, the portal’s applicant key), the verifying keys (CANOPY_VERIFY_KEY_<PROGRAM>, CANOPY_<SVC>APPLICANT_VERIFYING_KEY), the canopy-identity client keys (canopy_signing::load_provisioned_key) and canopy-security’s issuer database URL (CANOPY_SECURITYIDENTITY_DATABASE_URL, whose password is the secret) load through one policy, canopy_common::key_material (#2489):

  • the value is read through the audit-logged SecretProvider (EnvSecretProvider, every read logged with its key name, never the value); an empty or blank value counts as unset;

  • a .keys/ file stands in for a missing signing or verifying key only when CANOPY_ENV=development (DevKeyFiles::from_process_env); outside development no file is read, so a stray .keys/ directory in a deployment’s working directory is never trusted. The client keys and the issuer database URL have no file fallback in any environment;

  • a required key or secret that is still missing refuses the boot, naming the variable. No placeholder signer boots and no literal stands in for a secret.

The KEK (CANOPY_ENCRYPTION_KEY and its rotation siblings, Process-wide variables (no service prefix)) is read through the same provider, under its own boot rule (#2490). Every loader, canopy_secrets::require_with_dev_fallback and bootstrap_with's re-read of the database and broker URLs included, counts a blank value as unset (canopy_secrets::get_non_blank, #2511): a required one refuses the boot, an optional one stays unset.

The cargo xtask secret-loads gate (a validate stage) holds production code under services/ and crates/ to the policy: it refuses an env::var read of a variable named _SECRET, *_SIGNING_KEY, *_PRIVATE_KEY, *_PASSWORD, *_TOKEN, *_ENCRYPTION_KEY or *_API_KEY, or of a runtime name inside a function named as a key or secret loader; a secret provider read of such a name whose absence or failure is swallowed into a default (.ok(), .unwrap_or…), or that sits in a function which never tests a value for blankness (.is_empty(), #2511); a .keys path in a function that never calls is_development(), and a call to the DevKeyFiles::development_dir test seam; under tools/ and xtask/ as well, it refuses a reqwest .basic_auth(…) call, since OAuth client credentials are sent form-urlencoded through canopy_auth::ServiceCredentials (#2427), and a -not-for-production devstack-secret literal anywhere (#2491). Its allowlist is compliance/secret-loads-allowlist.toml, where every entry needs a written reason.

Signing keys. Program services and canopy-notices read CANOPY_<SVC>__SIGNING_KEY and, in development only, fall back to .keys/<program>-private.pem; with neither they refuse to boot. canopy-manage gen-signing-keys --program <snap|tanf|medicaid|caps|wic|notices|portal-applicant> --output-dir <dir> writes a production pair (chip is refused: canopy-medicaid signs CHIP with its medicaid key, #2952; canopy-manage Reference); for the devstack, dev start and dev refresh generate every one of them themselves (DEV_KEY_PAIRS, xtask/src/devstack_guard.rs). .keys/ is gitignored. Procedures: Secret Management and Signing Key Rotation.

Applicant claim keypair. The portal signs the applicant ownership claim with CANOPY_PORTALAPPLICANT_SIGNING_KEY (development fallback .keys/portal-applicant-private.pem); every receiver verifies it with CANOPY_<SVC>APPLICANT_VERIFYING_KEY — one PEM, or several concatenated during a rotation — with the development fallback .keys/portal-applicant-public.pem plus an optional .keys/portal-applicant-public-next.pem. Fatal at boot when no source is present.

canopy-identity client keys. Each service that sends as a canopy-identity confidential client reads its ES256 client key, CANOPY_<SVC>__IDENTITY_CLIENT_PRIVATE_KEY, through the audited provider with no file fallback in any environment (ADR-049 Amendment 16); a missing or malformed key refuses the boot before its migrations run. Those services are appeals, applications, caps, eligibility, enrollment, medicaid, notices, renewals, reporting, snap, tanf, verification and wic. canopy-web and canopy-portal reserve the key for the senders they build themselves. The devstack hands each client its key in its env file (.devstack/identity/env/<client>.env, Local Development).

Reserved keys (env-only; a boot failure if spelled into YAML), from each service’s RESERVED_KEYS:

Service CANOPY_<SVC>__…

snap

SIGNING_KEY, ALLOW_EXPIRED_PARAM_SET, IDENTITY_CLIENT_PRIVATE_KEY

tanf, medicaid, caps, wic

SIGNING_KEY, IDENTITY_CLIENT_PRIVATE_KEY

notices

SIGNING_KEY, APPLICANT_VERIFYING_KEY, ALLOW_DEFAULT_TEMPLATE_FALLBACK, IDENTITY_CLIENT_PRIVATE_KEY

eligibility, enrollment, renewals

APPLICANT_VERIFYING_KEY, IDENTITY_CLIENT_PRIVATE_KEY

persons

APPLICANT_VERIFYING_KEY

security

APPLICANT_VERIFYING_KEY, IDENTITY_DATABASE_URL, IDENTITY_ADMIN_DATABASE_URL, ALLOW_BROAD_DB_ROLE

applications

APPLICANT_VERIFYING_KEY, ALLOW_INSECURE_SCANNER, IDENTITY_CLIENT_PRIVATE_KEY

verification

APPLICANT_VERIFYING_KEY, ALLOW_FABRICATED_VERIFICATION, IDENTITY_CLIENT_PRIVATE_KEY

reporting

ALLOW_BROAD_DB_ROLE, IDENTITY_CLIENT_PRIVATE_KEY

appeals

IDENTITY_CLIENT_PRIVATE_KEY

web

DEADLINE_OVERRIDE, IDENTITY_CLIENT_PRIVATE_KEY, UPSTREAM_CLIENT_SECRET

portal

APPLICANT_SIGNING_KEY, ALLOW_CONFIDENTIAL_ADDRESS_LETTER_STREAMING, ALLOW_NOOP_CAPTCHA, COOKIE_SECURE, REQUIRE_DEPS, RATELIMIT_ENABLED, RATELIMIT_TRUST_FORWARDED_FOR, IDENTITY_CLIENT_PRIVATE_KEY

Accountable overrides

Fail-closed guards outside CANOPY_ENV=development, each relaxed only by its own variable set to exactly the lowercase literal true (canopy_common::env::override_flag_is_true; 1, on, yes, TRUE stay closed). Every override logs a loud warning at boot; the deployment owns the risk. Rationale and inventory: Security Operations › Startup-Guard Inventory.

Variable Guard it relaxes

CANOPY_DB__ALLOW_UNENCRYPTED_CONNECTION

DATABASE_URL without sslmode=verify-ca or verify-full: a connection that is unencrypted, or under require encrypted to a server nobody checked.

CANOPY_DB__ALLOW_NAME_MISMATCH

A database name that does not match the service (ADR-001).

CANOPY_STORE__ALLOW_LOCAL_BACKEND

The Local (/tmp) object-store backend.

CANOPY_APPLICATIONS__ALLOW_INSECURE_SCANNER

scanner_backend=noop — uploads would settle clean uninspected.

CANOPY_VERIFICATION__ALLOW_FABRICATED_VERIFICATION

A noop-adapters build, which serves fabricated IEVS/SAVE/SSA data.

CANOPY_REPORTING__ALLOW_BROAD_DB_ROLE

An over-broad DB session: privileged attributes, not canopy_reporting_app, or TEMPORARY or CREATE on the database (#2573).

CANOPY_SECURITY__ALLOW_BROAD_DB_ROLE

A main database pool that could replace the canopy-identity key registry: a superuser, a member of canopy_identity_owner, or an effective owner of the schema or the database (ADR-049 §9). No development arm: the probe refuses in every environment unless set. A deployment whose main pool is the canopy_security_runtime login needs none, and the devstack sets none (#2501). The issuer pool’s probe has no override.

CANOPY_NOTICES__ALLOW_DEFAULT_TEMPLATE_FALLBACK

Rendering legal notices from a base layer’s templates (the neutral notices-neutral layer) when no jurisdiction or deployment layer ships notices/manifest.toml.

CANOPY_SNAP__ALLOW_EXPIRED_PARAM_SET

Serving the newest expired snap-* parameter set instead of 422 params_unstaged; every use is ERROR-logged.

CANOPY_PORTAL__ALLOW_CONFIDENTIAL_ADDRESS_LETTER_STREAMING

Streaming letters that carry the real mailed address to address-confidential households. No development arm: suppressed in every environment unless set.

CANOPY_PORTAL__ALLOW_NOOP_CAPTCHA

Booting the portal with the no-op CAPTCHA provider, which leaves /recover initiate behind the rate-limit cascade alone.

CANOPY_WEB__DEADLINE_OVERRIDE

PAGE_DEADLINE_MS / FRAGMENT_DEADLINE_MS / DETERMINE_TIMEOUT_MS / PROJECTION_WAIT_MS outside their boot-validated ranges (budgets still hard-cap at 600 s).

CANOPY_STORE__ALLOW_HTTP is not an override: an ordinary ObjectStoreConfig bool that lets the S3 client speak plain http:// (the devstack sets it for Garage). Keep it false anywhere else.

Operator tooling variables (xtask)

Consumed by host-side operator commands, never by services. URLs travel through the environment, never argv.

Variable Default Meaning

CANOPY_MIGRATE__DATABASE_URL

none; required

The database canopy-manage migrate apply --service <svc> and canopy-manage rewrap-keks act on, with the migration credential. Unset or empty refuses the job. Same guard posture.

Per-service variables

Each table is the service’s own config struct (services/canopy-<svc>/src/config.rs) plus the values its config/canopy-<svc>/default.yaml ships. A "yaml:" default is the shipped YAML value, not a compiled-in one; every URL default is the compose service name. Every service also has the baseline keys above, CONFIG_SOURCE among them.

canopy-applications

Variable Default Meaning

CANOPY_APPLICATIONS__PERSONS_URL

http://canopy-persons:8002

canopy-persons base URL for the finalize cross-service writes.

CANOPY_APPLICATIONS__VERIFICATION_URL

http://canopy-verification:8005

canopy-verification base URL for the exact-caller batch-context read (denial-evidence resolution; fail-closed).

CANOPY_APPLICATIONS__RENEWALS_URL

http://canopy-renewals:8007

canopy-renewals base URL for the renewal-filing read behind POST /v1/applications with renews_certification_id (10 s client timeout), sent on the request’s canopy-identity token; a transport failure, a timeout, a 5xx or a malformed answer refuses the filing 502 renewal_certification_unavailable.

CANOPY_APPLICATIONS__ELIGIBILITY_URL

http://canopy-eligibility:8004

canopy-eligibility base URL.

CANOPY_APPLICATIONS__FINALIZE_LEASE_SECS

yaml: 30

Finalize-saga op lease (ADR-038); validated ≤ 600 s at boot.

CANOPY_APPLICATIONS__FINALIZE_HEARTBEAT_SECS

yaml: 10

Holder-side lease renewal period; validated < the lease.

CANOPY_APPLICATIONS__FINALIZE_RECONCILER_GRACE_SECS

yaml: 3600

Grace beyond lease expiry before the reconciler compensates a stuck operation; validated > 30 s and < 24 h.

CANOPY_APPLICATIONS__FINALIZE_COMPLETED_RETENTION_DAYS

yaml: 30

Days a terminal finalize-operation row is retained before the pruner may remove it.

CANOPY_APPLICATIONS__FINALIZE_DIGEST_SECRET

none

Keyed HMAC-SHA256 secret for the finalize request digest of the ADR-038 saga, finalize_draft's only path; ≥ 32 bytes, required (boot fails fast without it), env-only (the YAML carries no value and secrets-yaml-lint rejects one). Debug output is redacted.

CANOPY_APPLICATIONS__NOMI_PAGE_SIZE / NOMI_TICK_BUDGET_SECS

200 / 120

Notice-of-missing-information worker: keyset page size and per-tick time budget.

CANOPY_APPLICATIONS__INLINE_SAGA_DRIVE_BOUND_SECS

5

How long a postponement or reopen request (postpone, complete, revert, resume, reopen, reopen resume) waits for the saga drive it starts after its commit before it answers with the episode as it stands (#2195). The drive is not cancelled at the bound: it runs on, and the saga leg resumes what it leaves. Validated ≥ 1 at boot; 0 refuses to start.

CANOPY_APPLICATIONS__DAY30_MODE

off

Day-30 disposition dial: off (leg no-ops), shadow (classify only), enforce (applies the arms; requires the cutoff below and the canopy-persons service identity). The devstack sets enforce.

CANOPY_APPLICATIONS__DAY30_PAGE_SIZE / DAY30_TICK_BUDGET_SECS

100 / 120

Day-30 leg: keyset page (boot-validated 1..=100) and per-tick budget.

CANOPY_APPLICATIONS__DAY30_ENFORCE_CUTOFF_DATE

unset

Under enforce, only rows whose standard deadline falls on or after this date are dispositioned; older overdue rows report cutoff_deferred. Devstack: 2026-09-01.

CANOPY_APPLICATIONS__SCANNER_BACKEND

clamav

Content scanner (ADR-042): clamav (clamd INSTREAM sidecar) or noop; noop outside development trips the accountable-override guard.

CANOPY_APPLICATIONS__CLAMD_ADDR

— (required for clamav)

clamd TCP address (host:port; devstack clamav:3310). Unauthenticated protocol — never expose beyond the service network (runbook).

CANOPY_APPLICATIONS__CLAMD_TIMEOUT_SECS / SCAN_ATTEMPT_TIMEOUT_SECS / SCAN_POLL_SECS / SCAN_WORKER_CONCURRENCY / SCAN_MAX_ATTEMPTS / SCAN_LEASE_SECS / SCANNER_MAX_DEFINITION_AGE_DAYS

30 / 120 / 5 / 2 / 8 / 600 / 7

Scan-worker tunables, cross-validated at boot (per-exchange deadline < whole-attempt deadline < claim lease). SCAN_WORKER_CONCURRENCY=0 is the kill switch (uploads strand pending). Attempts count claims: the claim that reaches SCAN_MAX_ATTEMPTS settles terminal error. Definitions older than the max age fail scanning closed. Devstack: SCAN_POLL_SECS=1.

canopy-notices

Variable Default Meaning

CANOPY_NOTICES__RECONCILE_INTERVAL_HOURS

24

Hours between notice ↔ object-store reconciliation passes (streamed in 1 000-key batches into a TEMP table). 0 disables the loop.

CANOPY_NOTICES__WORKER_CONCURRENCY

4

Concurrent work-item claim loops per process; 0 disables the worker loops (items queue durably). Scale-out signals: canopy_notices_work_item_{queue_depth,oldest_age_seconds,terminal_failed}.

CANOPY_NOTICES__WORKER_POLL_MS / DISPATCHER_POLL_MS

2000 / 2000

Idle/error sleep of the worker and dispatcher loops; domain 50..=60000, boot-validated. Devstack: 200. Dispatcher signals: canopy_notices_dispatch_{queue_depth,oldest_age_seconds,terminal_failed} (#1216), and canopy_notices_stale_unregenerated{notice_type} (#2460): stale notices retired with no work item to regenerate them — legally required letters that will never be mailed (the direct POST /v1/notices path); it only grows, so alert on any increase.

CANOPY_NOTICES__APPLICATIONS_URL

http://canopy-applications:8003

Base URL for the lost-credential recovery subscriber (ADR-026).

CANOPY_NOTICES__PERSONS_URL

http://canopy-persons:8002

Base URL for work-item recipient resolution.

CANOPY_NOTICES__PORTAL_BASE_URL

http://localhost:8080

Public applicant-portal base URL for the recovery kill-switch link (applicant-facing, not the compose name).

CANOPY_STORE__BACKEND / BUCKET / LOCAL_ROOT / S3_ENDPOINT / S3_REGION / S3_ACCESS_KEY / S3_SECRET_KEY / MAX_UPLOAD_BYTES / ALLOW_HTTP

local or s3 / — / — / — / us-east-1 / — / — / 50 MiB / false

Object-store client (crates/canopy-store/src/config.rs); set on canopy-notices. Devstack: BACKEND=local, LOCAL_ROOT=/tmp/canopy-store, ALLOW_HTTP=true. Outside development local is refused unless CANOPY_STORE__ALLOW_LOCAL_BACKEND is set.

canopy-snap

Variable Default Meaning

CANOPY_SNAP__RULES_URL

yaml: http://canopy-rules:8001

canopy-rules URL for ruleset evaluation (no compiled-in default).

CANOPY_SNAP__VERIFICATION_URL

yaml: http://canopy-verification:8005

canopy-verification URL for IEVS match queries.

CANOPY_SNAP__PERSONS_URL / ENROLLMENT_URL

yaml: http://canopy-persons:8002 / http://canopy-enrollment:8006

In-boundary household and issuance reads for the overpayment recompute.

CANOPY_SNAP__SECURITY_URL

yaml: http://canopy-security:8012

Signing-key retention registration target (ADR-036); unset skips boot registration.

CANOPY_SNAP__EMIT_POLICY_ATTESTATION

yaml: false

Bind policy_target and evaluated_as_of into the signed envelope — an ADR-028 tolerant-first emission gate; flip only after every verifier runs a build that carries the fields (Rolling deploy & rollback). The devstack sets true.

CANOPY_SNAP__IEVS_CONCURRENCY

4

Maximum concurrent detached IEVS verification tasks; the determine handler try-acquires and skips verification with a warning when saturated. Must be ≥ 1 (0 is a boot error).

canopy-tanf, canopy-medicaid, canopy-caps, canopy-wic

Variable Default Meaning

CANOPY_{TANF,MEDICAID,CAPS,WIC}__RULES_URL

yaml: http://canopy-rules:8001

canopy-rules URL for ruleset evaluation.

CANOPY_{TANF,MEDICAID,CAPS,WIC}__SECURITY_URL

yaml: http://canopy-security:8012

Signing-key retention registration target (ADR-036); unset skips boot registration.

CANOPY_MEDICAID__PERSONS_URL

yaml: http://canopy-persons:8002

canopy-persons URL (Express Lane household reads).

CANOPY_TANF__PERSONS_URL

yaml: http://canopy-persons:8002

canopy-persons URL, required (no in-code default): the custodial children’s dates of birth behind the 45 CFR 261.34(c) week, read by persons:batchGet as canopy-tanf (#2193).

CANOPY_{TANF,MEDICAID}__CHAIN_V2_APPEND_ENABLED

yaml: false

chain-v2 arm for the FTI determination chain entries (ADR-014 Amendment 7). false keeps the v1 fti_audit_log path; true appends to fti_audit_log_v2 fail-closed.

canopy-eligibility

Variable Default Meaning

CANOPY_ELIGIBILITY__APPLICATIONS_URL

required (yaml: http://canopy-applications:8003)

canopy-applications base URL for the household_assignments lookup behind the scoped cross-program-alerts feed. Boot fails without it; the value is validated at startup (http/https, no query or fragment). The scoped feed has no unscoped fallback.

CANOPY_ELIGIBILITY__PERSONS_URL / VERIFICATION_URL / SECURITY_URL

yaml: http://canopy-persons:8002 / http://canopy-verification:8005 / http://canopy-security:8012

Peer base URLs. SECURITY_URL is optional: set, the determination verifier lazy-loads a retired signing kid from canopy-security’s signing-key history (ADR-036); unset, verification is in-memory only.

CANOPY_ELIGIBILITY__ENROLLMENT_URL / RENEWALS_URL

required (yaml: http://canopy-enrollment:8006 / http://canopy-renewals:8007)

The two fail-closed household reads every SNAP /determine without the bulk marker makes before its arm is chosen (services/canopy-eligibility/src/enrollment_state.rs, read_enrollment_state): canopy-enrollment’s live row (GET /v1/enrollments/live?household_id=&as_of=) and canopy-renewals' in-force certification. Both are boot-validated like APPLICATIONS_URL (http/https, no query or fragment); RENEWALS_URL was optional and bulk-only before the re-determination adoption and is now required. The bulk consumer’s per-case live read (read_live_period) dials the same ENROLLMENT_URL.

CANOPY_ELIGIBILITY__BULK_RUNS_ENABLED / BULK_ENACT_ACCEPT_DOWNSTREAM / BULK_CONSUMER_CONCURRENCY / BULK_SELF_CALL_TIMEOUT_SECS / BULK_MAX_ATTEMPTS / SELF_BASE_URL / RULES_URL

see services/canopy-eligibility/src/config.rs

Bulk-run (cohort) worker knobs and the optional peers it dials (the universe read rides the required RENEWALS_URL above). Devstack: CANOPY_ELIGIBILITY__BULK_WORKER_TICK_MS=100.

canopy-reporting

Variable Default Meaning

CANOPY_REPORTING__RENEWALS_URL / PERSONS_URL / APPLICATIONS_URL / ENROLLMENT_URL

yaml: http://canopy-renewals:8007 / http://canopy-persons:8002 / http://canopy-applications:8003 / http://canopy-enrollment:8006

Upstream reads for the SNAP reports.

CANOPY_REPORTING__SNAP_URL / TANF_URL / MEDICAID_URL / CAPS_URL

yaml: http://canopy-snap:8013 / http://canopy-tanf:8014 / http://canopy-medicaid:8015 / http://canopy-caps:8016

Program-service reads (canopy-reporting has no access to their databases, ADR-001).

CANOPY_REPORTING__MIGRATION_DATABASE_URL

unset (falls back to DATABASE_URL)

The migration-phase credential of the least-privilege split (ADR-004, #1456): bootstrap migrates on this URL while the runtime serves as the restricted canopy_reporting_app login on DATABASE_URL. Devstack: owner canopy / login canopy_reporting_app.

CANOPY_REPORTING__RUN_TICK_MS / RUN_FIRST_TICK_DELAY_SECS / RUN_CLAIM_SECS / RUN_HEARTBEAT_SECS / RUN_MAX_ATTEMPTS / RUN_MAX_QUEUED / RUN_CHUNK_SIZE / RUN_UPSTREAM_CONCURRENCY / RUNS_ENABLED / RUN_REAP_DAYS / RUN_GENERATION_ROW_RETENTION_DAYS

defaults and domains: Report runs › Knobs

The durable report-run pipeline; domains, relationship rules and operations in Report Runs. Devstack: RUN_TICK_MS=500, RUN_FIRST_TICK_DELAY_SECS=0.

canopy-security

breach_detection_interval_secs (yaml: 60) is the detection-rules evaluation interval. The chain-v2 and archive families below are serde-defaulted and every tunable is domain-validated at boot — out of domain is a startup error, never a clamp. Enablement and operating procedures: Security Operations.

CANOPY_SECURITY__… Default Domain / note

CHAIN_V2_APPEND_ENABLED

false

chain-v2 arm for both audit ingress paths (the #-queue consumer and POST /v1/security/audit/ingest); false = v1 advisory-lock chain.

CHAIN_DRAIN_BATCH_SIZE

500

1..=500

CHAIN_DRAIN_TICK_MS

250

10..=60000 (devstack 25)

CHAIN_DRAIN_MAX_BATCHES_PER_SHARD

4

1..=64

CHAIN_ROUTE_BATCH_SIZE

1024

1..=10000

CHAIN_ROUTE_MAX_BATCHES

4

1..=64

CHAIN_DRAIN_LOCK_TIMEOUT_MS

5000

100..=60000

CHAIN_DRAIN_STATEMENT_TIMEOUT_MS

30000

1000..=300000

CHAIN_STAGING_MAX_DEPTH

500000

≥ 1000; at the cap the consumer nacks and ingest returns 503

CHAIN_STAGING_ALERT_DEPTH

10000

≥ 1

CHAIN_STAGING_ALERT_AGE_SECS

300

≥ 1

CHAIN_V2_VERIFY_ENABLED

false

Master flag for the verifier tasks and job servicing. Off: GET /v1/security/chain/status serves unknown → 503 and POST /v1/security/chain/verify returns 503 verifier_unavailable.

CHAIN_VERIFY_TICK_MS

1000

10..=60000 (devstack 100)

CHAIN_VERIFY_FIRST_TICK_DELAY_SECS

60

0..=3600 (devstack 0)

CHAIN_VERIFY_BATCH_SIZE

1000

1..=10000

CHAIN_VERIFY_BATCH_BYTES

33554432

4 MiB..=256 MiB

CHAIN_VERIFY_PASS_BUDGET

16

1..=256

CHAIN_SCRUB_BATCHES_PER_PASS

1

1..=64, validated < CHAIN_VERIFY_PASS_BUDGET

CHAIN_CENSUS_INTERVAL_SECS

300

30..=86400

CHAIN_VERIFY_LEASE_SECS

30

5..=300

CHAIN_VERIFY_STATEMENT_TIMEOUT_MS

5000

1000..=10000; lease_secs × 1000 ≥ 3 × statement_timeout_ms

CHAIN_VERIFY_LOCK_TIMEOUT_MS

2000

100..=10000

CHAIN_JOB_CLAIM_SECS

60

10..=600, validated ≥ 3 × CHAIN_JOB_HEARTBEAT_SECS

CHAIN_JOB_HEARTBEAT_SECS

15

1..=200

CHAIN_JOB_MAX_ATTEMPTS

3

1..=10

CHAIN_JOB_MAX_QUEUED

8

1..=64; at the cap the verify endpoint returns 503 verifier_unavailable for a target with no active job (a target with one gets its 409 first, #2659)

CHAIN_JOB_REAP_DAYS

7

7..=90 (chain_job_reap enforces the 7-day floor again in SQL). The audit verifier task deletes terminal (done / error) chain_verify_jobs rows finished longer ago than this — on its first pass, then once a day; rows behind a still-latched incident are exempt. Polling a reaped job returns 404 (#2148).

CHAIN_TAIL_MAX_AGE_SECS

300

≥ 30

CHAIN_TAIL_MAX_LAG

100000

≥ 1

CHAIN_SCRUB_MAX_AGE_SECS

172800

≥ 300

CHAIN_MANIFEST_MAX_AGE_SECS

604800

≥ 300

CHAIN_VERIFY_DATABASE_URL / CHAIN_VERIFY_TANF_DATABASE_URL / CHAIN_VERIFY_MEDICAID_DATABASE_URL

—

Per-family verifier databases; the audit URL is required when verification is enabled, the TANF/Medicaid URLs are optional and their family stays dormant when absent. Parse-only at boot; connectivity is lazy per family. Debug-redacted.

ARCHIVE_SCHEDULER_ENABLED

false

Master flag for the scheduled enqueue path only; the runner is always spawned and manual POST /v1/security/archive always works.

ARCHIVE_AFTER_DAYS

none

1..=36500; required iff the scheduler is enabled. Age threshold moving rows to audit_events_archive — not a retention value.

ARCHIVE_CHUNK_SIZE

5000

100..=20000

ARCHIVE_MAX_CHUNKS_PER_PASS

20

1..=1000

ARCHIVE_INTERVAL_SECS

300

60..=86400

ARCHIVE_CATCHUP_INTERVAL_SECS

30

5..=3600, validated ≤ ARCHIVE_INTERVAL_SECS

ARCHIVE_STATEMENT_TIMEOUT_MS

30000

1000..=300000

ARCHIVE_LEASE_SECS

120

10..=600, validated ≥ 3 × (ARCHIVE_STATEMENT_TIMEOUT_MS / 1000)

ARCHIVE_MAX_ATTEMPTS

3

1..=10

ARCHIVE_RUNNER_TICK_MS

5000

500..=60000 (devstack 500); also feeds the /readyz audit-archive staleness window

ARCHIVE_FIRST_TICK_DELAY_SECS

60

0..=3600 (devstack 0)

The canopy-identity key registry (ADR-049 §9, #2498). Three env-only keys, none of them a config field; operating procedures in Security Operations › canopy-identity key registry.

CANOPY_SECURITY__… Default Note

IDENTITY_DATABASE_URL

required

The canopy_identity_issuer login’s URL for the issuer pool. Read through the audited secret provider with no file fallback in any environment; blank counts as unset and refuses the boot. Same database-name and TLS guards as DATABASE_URL. The pool holds at most IDENTITY_DB_MAX_CONNECTIONS connections, 28 by default (identity/registry.rs itemizes them: the two sweepers, the key ring and JWKS, the token route’s jti inserts, federation’s session transactions, delegation mints' session reads, the client-status memo’s read, and the native grants' transactions, reads and DPoP jti inserts), each started with lock_timeout and statement_timeout at 5 s and application_name = canopy-identity; the issuance-log writer holds one more of its own on the same login, canopy-identity-writer (ADR-049 Amendment 12). At boot a strict probe refuses the session unless it is exactly the issuer: no memberships, no privileged attributes, no ownership, exactly the migrations' grants, and no PUBLIC grant on an identity object.

IDENTITY_ADMIN_DATABASE_URL

optional

The canopy_identity_admin login’s URL for the security-admin pool (ADR-049 Amendment 8, #2730). Read through the audited secret provider with no file fallback; unset or blank, boot warns once and security administration is unavailable. Same database-name and TLS guards as DATABASE_URL. The pool holds at most 4 connections, with the issuer pool’s timeouts and application_name = canopy-identity-admin. When set, a strict boot probe refuses the session, aborting the boot, unless it is exactly the admin: no memberships, no privileged attributes, no ownership, EXECUTE on the six security-admin functions and SELECT on the tables the routes read and nothing more, and no PUBLIC grant on an identity object.

MIGRATION_DATABASE_URL

unset (falls back to DATABASE_URL)

The migration identity, which creates the identity roles, owns the registry through membership in canopy_identity_owner and runs the revocation runbook. Devstack: the canopy superuser. DATABASE_URL is the canopy_security_runtime login instead (#2501, Security Operations › The main pool).

ALLOW_BROAD_DB_ROLE

unset

The main-pool probe’s accountable override (Accountable overrides).

The canopy-identity issuer (ADR-049 §2 and Amendment 3, #2550). Two SecurityConfig fields mirrored from the baseline’s required pair (Baseline variables (ServiceSettings, every axum service)), so canopy-security issues under the identifier every receiver expects; a blank value counts as unset and refuses the boot. The issuer’s metadata and the tokens it mints: IdP Integration › The issuer identifier and metadata.

CANOPY_SECURITY__… Default Note

IDENTITY_ISSUER

required (the baseline’s, mirrored)

The issuer identifier: the iss of every canopy-identity token and the sole aud of every client assertion (Amendment 3). An absolute https URL (http too under CANOPY_ENV=development) whose path is exactly /identity, with no userinfo, query or fragment (RFC 8414 §2). It must be written in canonical form, the form url::Url serializes it to (a lowercase host, no default port, no dot segment), so the identifier is one exact string; boot names the canonical spelling when it is not. The endpoints are built under it by path segment: {issuer}/token and {issuer}/jwks. Devstack: https://web.canopy.test:<port>/identity, on the TLS ingress’s port.

IDENTITY_INTERNAL_URL

required (the baseline’s, mirrored)

The same issuer’s base URL inside the deployment’s network. The endpoint URLs in-cluster clients use are built under it the same way: {internal}/token and {internal}/jwks. The same rules as IDENTITY_ISSUER. Devstack: http://canopy-security:8012/identity, the container’s port in the compose network.

canopy-identity’s web sessions (ADR-049 §6; Amendment 6, #2715). Two SecurityConfig fields, whole seconds, validated at boot through canopy_auth::SessionLimits::new: a value outside its bounds refuses the boot, naming the setting, and is never clamped. Sessions and their store: canopy-security Data Model.

CANOPY_SECURITY__… Default Note

IDENTITY_WEB_SESSION_MAX_SECONDS

43200

1800..=86400. A web session ends this long after the upstream authentication (auth_time), whatever renews it; an open whose end would be under 900 s away is refused, so canopy-web re-authenticates the person upstream.

IDENTITY_SESSION_GRACE_SECONDS

1800

0..=3600. How far past a session’s last freshness window (its latest successful upstream validation + 900 s) a grace may hold it when the upstream could not be asked, never past the session’s end. Repeated grace never extends it.

IDENTITY_NATIVE_SESSION_MAX_SECONDS

28800

1800..=86400 (ADR-049 §7’s 8 h default and 24 h cap; Amendment 9). A native session, which the device-approval grant opens for canopy-cli, ends this long after its approval’s upstream authentication, whatever renews it.

IDENTITY_DEVICE_VERIFICATION_URI

unset

The page where a worker enters a device’s user code, canopy-web’s {origin}/device (RFC 8628 §3.2’s verification_uri; ADR-049 Amendment 9): an absolute https URL (http too under CANOPY_ENV=development) with no userinfo, query or fragment, written as it parses back. Unset or blank, the device flow is not served: POST /identity/device_authorization and POST /identity/device_verification answer 503, so canopy login cannot sign in. A defective value refuses the boot by name. Devstack: https://web.canopy.test:<port>/device.

IDENTITY_NATIVE_RATE_LIMIT_RPM

6000

1..=600000, the bounds a registry entry’s rate_limit_rpm is held to (ADR-049 Amendment 9). canopy-cli’s token requests a minute on each replica, with a burst of as many: its one budget, since it has no registry entry. Read and validated at boot; one outside the bounds refuses it by name. A device code poll spends one once its device is found and it is not told to slow down, and a refresh once its credential is found bound to the proof’s key, and one past the budget is a logged 429 with Retry-After.

IDENTITY_TOKEN_RATE_LIMIT_RPM

30000

1..=600000 (ADR-049 Amendment 10). The per-IP limit, requests a minute on each replica with a burst of as many, of POST /identity/token, POST /identity/revoke and POST /identity/device_verification, which share one limiter; POST /identity/device_authorization has its own fixed limit of 30 a minute. Process-local, keyed by the peer address (by X-Forwarded-For only from CANOPY_TRUSTED_PROXIES, the client every route’s issuance-log row records too); a request past it is a 429 that never reaches the handler and is not logged. A backstop: authenticated callers are bounded by their per-client budgets, and anonymous traffic by canopy-web’s edge limit. Size it at least 60 × canopy-web’s peak token requests a second / (canopy-web pods × max(replicas − 1, 1)); the default covers two pods and two replicas at the design peak (Amendment 10). Read and validated at boot; one outside the bounds refuses it by name.

IDENTITY_DB_MAX_CONNECTIONS

28

12..=64 (ADR-049 Amendment 10; the default is Amendment 12’s Rule P). The issuer pool’s ceiling on each replica. Five holders keep at most one connection each in the background (the jti and session sweepers, the key ring, the JWKS read, the client-status read); requests share the rest, each holding one for a statement or a short transaction, and a connection is pinged when lent only after idling 1 s (ADR-049 Amendment 13). The issuance-log writer is not among them: it holds one connection of its own on the same login, outside this ceiling (ADR-049 Amendment 12). Read and validated at boot; one outside the bounds refuses it by name. canopy-security’s connections per replica on its own database: Deployment Guide › connection budget.

IDENTITY_ISSUANCE_GATHER_MS

2

0..=20 (ADR-049 Amendment 12; the default is its Rule G). How long the issuance-log writer gathers a batch, counted from its oldest row’s submission: a row that has already waited this long behind the batch before goes in the next batch at once. Longer builds larger batches and fewer commits at each token response’s cost; 0 commits what is queued without waiting. Read and validated at boot; one outside the bounds refuses it by name.

The canopy-identity client registry (ADR-049 §10; Amendment 3, #2550; Amendment 4, #2641; Amendment 7, #2726). The public keys each client authenticates with, and its token-request rate, in <CANOPY_CONFIG_ROOT>/canopy-security/identity-clients.yaml (the working directory when CANOPY_CONFIG_ROOT is unset), read once at boot. It is a file of its own: no {CANOPY_ENV}.yaml tier, jurisdiction or environment variable layers over it. The repository ships none; a deployment mounts its own beside default.yaml, and an absent file registers no client. The devstack’s is generated, never committed (ADR-049 Amendment 11): before every bring-up xtask writes .devstack/identity/identity-clients.yaml, registering every confidential client with the public half of an ES256 key it generates once under .devstack/identity/keys/ (owner-only, in the PKCS#8 format load_provisioned_key reads), canopy-web at 60 000 and canopy-eligibility at 18 000 requests a minute (Amendment 10), and compose mounts it read-only (Local Development › Upstream IdP: Kanidm).

clients:
  - client: canopy-portal
    enabled: true
    keys:
      - x: "<canonical base64url P-256 x>"
        y: "<canonical base64url P-256 y>"
    rate_limit_rpm: 6000   # optional
Field Note

client

A compiled confidential client id (Amendment 4): canopy-web, canopy-portal, or one of the 13 services that call another service, such as canopy-eligibility. Client ids are code, not configuration, so any other value is refused. A native client’s id (canopy-cli) is refused as an unknown client: a native client is public and has no registry keys.

enabled

Required, and a YAML boolean only: 1, yes, on and quoted strings are refused. false keeps the entry, and its keys stay registered so a duplicate is still caught, but refuses the client at every mint. The file is read only at boot, so a change takes effect at the next restart. A security administrator disables a client at runtime instead (Security Operations › Disabling a client at runtime).

keys

One or two public keys, the second for a rotation, each {x, y}: the canonical unpadded base64url coordinates of a P-256 JWK (RFC 7518 §6.2.1). A key’s kid is its RFC 7638 thumbprint, computed, never configured; a kid field is refused.

rate_limit_rpm

Optional: the client’s token requests a minute on each replica, a YAML integer from 1 to 600 000, with a burst of as many; 6 000 when absent. A token request of any grant spends one right after its client authenticates; past it, the request is answered 429 temporarily_unavailable with Retry-After and logged (client_rate_limited) before its form is judged. A revocation spends none. The budget is per replica, beside the token routes' per-IP limit (IDENTITY_TOKEN_RATE_LIMIT_RPM), so a client’s whole budget shrinks when a replica is lost. The default covers every client whose peak is under 100 token requests a second over one replica fewer than the deployment runs; set canopy-web’s entry to at least 60 × its peak rate / max(replicas − 1, 1), and the busiest onward caller’s (canopy-eligibility) likewise from the onward rate: at the design peak and two replicas, 60 000 and 18 000 (ADR-049 Amendment 10).

Boot refuses a defective registry. The error names where the defect is:

  • a file that exists but cannot be read: the file’s path;

  • a file that is not a YAML map holding a clients list: nothing more (the parser’s message follows as the cause);

  • a top-level key other than clients, named, its value not quoted (#2699). This covers a key written as a config path, such as clients[0] or clients.x. The file is read without the config crate’s path expansion, which would otherwise grow an array to an index postfix and panic the boot on clients[9223372036854775807]: 1;

  • an entry with a missing, unknown or mistyped field, a kid among them: its position only, clients[N], because its client was not read;

  • every other defect: the entry as clients[N] ("<client>"). These are an enabled that is not a YAML boolean; a rate_limit_rpm that is not a YAML integer from 1 to 600 000; an unknown client; zero or three keys; coordinates that are not a canonical P-256 point (also naming keys[K]); a key registered twice, in one entry or in two (also naming its kid and the entry that registered it first); and a client with two entries (also naming the first).

A client’s private key never appears in this file. Its loader, canopy_signing::load_provisioned_key, reads it as CANOPY_<SVC>__IDENTITY_CLIENT_PRIVATE_KEY through the secret provider with no file fallback (ADR-049 §10; Secrets). Rotating a key: Security Operations › canopy-identity client keys.

canopy-identity’s upstream identity profile (ADR-049 Amendment 5, #2692; ADR-050 §2). The deployment’s one upstream identity provider (ADR-049 §1), in <CANOPY_CONFIG_ROOT>/identity-upstream.yaml (the working directory when CANOPY_CONFIG_ROOT is unset). It sits at the config root itself, not under a service’s directory, because two services read the one file at boot: canopy-security and canopy-web. It is a file of its own: no {CANOPY_ENV}.yaml tier, jurisdiction or environment variable layers over it. It holds no secret; canopy-web’s upstream client secret stays in the secret provider (ADR-049 §10; canopy-web (worker portal BFF)). The repository ships none, and an absent file means no upstream is configured: canopy-security logs one warning and proceeds, serving no federation, and canopy-web refuses to boot. The devstack’s is generated too, for the upstream it runs (cargo xtask dev start --idp, Local Development › The devstack’s upstream): the kanidm, keycloak or zitadel profile naming that upstream’s issuer at https://idm.canopy.test:<P>;, and the devstack CA as identity-upstream-ca.pem. Both are mounted read-only at the config root, and the profile is rewritten from the upstream’s credentials at every bring-up. Boot reads and validates the file and makes no request to the upstream (ADR-049 §2). canopy-security’s federation grant reads the loaded profile: it verifies the upstream’s id_tokens, calls its userinfo and projects its claims under it, and is served only while a profile is configured (IdP integration › the federation grant). canopy-web’s relying party signs workers in under it (IdP integration › canopy-web’s sign-in).

Any profile's file may state required_amr, a list such as [mfa]: the authentication method references a sign-in's id_token must carry in amr, every one of them (ADR-049 Amendment 27). It is the deployment's choice and no profile presets it. State it only for an upstream that reports amr (ZITADEL does; Kanidm and Keycloak under canopy's realm do not), or every sign-in is refused. It is not applied to a renewal.

profile names a preset (ADR-049 Amendment 26, AL1). A vendor file (kanidm, keycloak or zitadel) states only the issuer, the client and the optional fields, plus a zitadel file’s project and organisation; the profile presets the rest. The three vendor profiles are the supported upstreams, each with its conformance suite (ADR-050, Amendments 3, 5 and 6):

profile: kanidm
issuer: https://idm.example.org/oauth2/openid/canopy-web
client_id: canopy-web
tls_trust_anchors: identity-upstream-ca.pem
profile: keycloak
issuer: https://idm.example.org/realms/canopy
client_id: canopy-web
profile: zitadel
issuer: https://idm.example.org
client_id: "312909075212468632"
project_id: "312909075212402200"
organization_id: "312909075212336664"

An oidc-generic file states every field but the optional ones:

profile: oidc-generic
issuer: https://accounts.example.org
client_id: canopy-web
algorithms: [RS256]
claims_from: id_token
refresh: reissues_id_token
client_auth_method: client_secret_basic
scopes: [openid, profile]
claims:
  roles: /groups
  programs: /primary_programs
  username: /preferred_username
Field In a vendor file Note

profile

required

kanidm, keycloak, zitadel or oidc-generic.

project_id, organization_id

zitadel only, required

The ZITADEL project canopy-web’s application sits in, and the organisation whose role grants count (AL3). Each is a string of 1 to 64 ASCII letters, digits, - or _. A YAML number is refused, so quote ZITADEL’s numeric ids. Any other profile stating either is refused as an unknown field.

issuer

required

The issuer identifier, compared byte for byte with an id_token’s iss and discovery’s issuer. An absolute https URL (http too under CANOPY_ENV=development) with no userinfo, query or fragment, and any path (Kanidm’s is /oauth2/openid/<client_id>). It must be written in canonical form, as url::Url serializes it (a lowercase host, no default port, no dot segment), with one exception: a bare origin may omit its trailing / (https://accounts.example.org) and is kept as written. https://accounts.example.org/ is accepted too, as itself: it is a different string.

client_id

required

canopy-web’s client id at the upstream, the audience an upstream id_token must name: 1 to 255 bytes of printable ASCII or the space (RFC 6749 Appendix A). A YAML number is refused, so quote a numeric id.

jwks_uri

optional

The JWKS endpoint, in place of discovery’s. An absolute https URL (http in development) with no userinfo or fragment. A query is allowed (?appid=…), and the spelling need not be canonical. Needed when the IdP publishes its JWKS on another origin than its issuer’s ([upstream-endpoints-elsewhere]).

userinfo_endpoint

optional

The userinfo endpoint, in place of discovery’s. The same rules as jwks_uri. Needed when the IdP publishes its userinfo endpoint on another origin than its issuer’s, even if canopy never calls it ([upstream-endpoints-elsewhere]).

authorization_endpoint, token_endpoint, revocation_endpoint, end_session_endpoint

optional

canopy-web’s relying-party endpoints, each in place of discovery’s (ADR-049 Amendment 17). The same rules as jwks_uri. A named one need not share the issuer’s origin. Needed when the IdP publishes one on another origin ([upstream-endpoints-elsewhere]).

tls_trust_anchors

optional

One bare file name, resolved against the config root, naming a PEM bundle of TLS trust anchors. When it is set, the upstream client trusts only the bundle, in place of the system's roots (ADR-049 Amendment 5; ADR-050 Amendment 2). A /, \, .., an absolute path or a control character is refused.

algorithms

preset: [ES256] (zitadel: [RS256])

The algorithms that may sign the upstream’s id_tokens: a non-empty list from ES256 (P-256 keys), ES384 (P-384), RS256 and PS256 (RSA of at least 2048 bits) and EdDSA (Ed25519), each named once and spelled as JOSE spells it. none and every HS* are refused as never accepted; any other name is refused as unsupported.

claims_from

preset: id_token

Where the roles, programs and username are read: id_token or userinfo.

refresh

preset: reissues_id_token

How a session renews its claims after an upstream refresh (ADR-049 §6): reissues_id_token or userinfo. It must name claims_from's source ([upstream-pairing]).

client_auth_method

preset: client_secret_basic

How canopy-web authenticates to the upstream’s token endpoint (RFC 6749 §2.3.1): client_secret_basic or client_secret_post.

scopes

preset: [openid, profile] (zitadel: below)

The scopes canopy-web’s authorization requests ask for (ADR-049 Amendment 17): a YAML list of RFC 6749 scope tokens holding openid, each once, to be sent space-separated in the file’s order. The kanidm and keycloak preset is the pair canopy’s provisioning grants canopy-web. The zitadel preset is openid profile offline_access urn:zitadel:iam:org:projects:roles urn:zitadel:iam:org:id:<organization_id>: the refresh token, the project’s roles, and the organisation’s. An oidc-generic file must state it.

claims.roles, claims.programs, claims.username

preset: /roles, /primary_programs, /preferred_username (zitadel: below)

RFC 6901 JSON pointers into the claims payload, each starting with /, such as /realm_access/roles (~1 escapes a / inside a claim name, ~0 a ~). Kanidm’s and Keycloak’s roles and programs claims are canopy’s provisioning convention for each product, not built-ins. The zitadel preset reads ZITADEL’s own project-roles claim, /urn:zitadel:iam:org:project:<project_id>:roles, an object keyed by role name: a key counts only when its value names organization_id, so a grant from another organisation grants nothing. The counted keys in canopy’s vocabulary are the roles, a service: key never, and the counted program_<wire id> keys the programs (program_snap); a program_ key with another suffix is malformed_primary_programs, and a claim that is not an object is no_role (#2701). No file can state that shape. What each must point at under every other profile (ADR-049 Amendment 5, #2697): roles an array of strings, of which only canopy’s vocabulary roles are granted (never a service: name), else no_role; programs a non-empty array of program wire ids (chip and medicaid distinct), else missing_primary_programs when absent or empty and malformed_primary_programs otherwise; username a string of 1 to 256 bytes with no control character, else no_username (Identity provider integration › canopy-identity’s upstream profile).

Endpoints on another origin. canopy-identity uses discovery’s jwks_uri or userinfo_endpoint only where the profile names none, and only when it passes the field’s rules above and shares the issuer’s origin (scheme, host and port). If either one fails, the whole discovery and key fetch fails, so canopy-identity has no upstream keys to verify with (a set it already holds serves until it is 720 s stale). That is true of userinfo_endpoint too, even for a profile that reads nothing from userinfo (claims_from: id_token and refresh: reissues_id_token). So name in the profile each endpoint your IdP publishes on another origin. Google, for example, has the issuer https://accounts.google.com but publishes its JWKS on www.googleapis.com and its userinfo endpoint on openidconnect.googleapis.com, so a Google profile names both jwks_uri and userinfo_endpoint.

canopy-web’s relying-party endpoints (authorization_endpoint, token_endpoint, revocation_endpoint, end_session_endpoint) follow the same rule, but none of them ever fails the key fetch (ADR-049 Amendment 17). Each is read apart from discovery’s other members and judged on its own, and a fault in one, off the issuer’s origin, null, not a string or repeated, refuses only that endpoint, at canopy-web’s relying party. Google’s token and revocation endpoints sit on oauth2.googleapis.com, so a Google profile names those too.

claims_from and refresh name one source (ADR-049 Amendment 6, #2713). A session renews its claims from where it opened them, so the two fields pair: claims_from: id_token with refresh: reissues_id_token, or claims_from: userinfo with refresh: userinfo. Either mixed pairing could never renew a session, and boot refuses it naming refresh, without quoting either value. Every vendor preset pairs id_token with reissues_id_token.

Every closed choice is a name, never a boolean, so the config crate’s lenient coercion of 1 or "yes" cannot apply, and a value of another YAML kind than its field takes (a number for a string) is refused, never coerced. An optional field written as null (~) is absent.

Boot refuses a defective profile. The error names the field and never quotes a value:

  • a file that exists but cannot be read, or is not UTF-8: the file’s path;

  • a file that is not one YAML document holding a map, a YAML syntax error and a duplicated key among them: nothing more, because the parser’s message can quote the file;

  • a missing profile, or one other than kanidm, keycloak, zitadel and oidc-generic;

  • a field the profile’s file may not state. A vendor file stating a preset field (algorithms, claims_from, refresh, client_auth_method, scopes or claims), even with the preset’s own value, is refused naming it as preset; project_id or organization_id outside a zitadel file, and any other unknown field, in any profile or inside claims, is named as written;

  • a required field missing or written as null: the field;

  • a field of the wrong kind, or a value its rule refuses: the field and the rule it breaks;

  • a refresh naming a source other than claims_from's ([upstream-pairing]): refresh.

The trust-anchor bundle (ADR-049 Amendment 5, #2693). The file tls_trust_anchors names is PEM, at most 1 MiB: one or more certificates (-----BEGIN CERTIFICATE-----), each a trust anchor, with any explanatory text around them, and \r\n line ends accepted. Boot reads it with the profile and refuses it, naming the file and never quoting it, when it is absent or cannot be read; is larger than 1 MiB; is malformed PEM; holds any other PEM object (a private key, a CRL, a CSR), named by its position; holds a -----BEGIN marker that yields no certificate (an ENCRYPTED PRIVATE KEY or OPENSSH PRIVATE KEY block, whose labels the parser skips, or a block that does not start its line); holds no certificate; or holds a certificate that does not parse as a trust anchor. Boot then builds the upstream client, making no request, and logs the anchor count and each anchor’s SHA-256 fingerprint in the form openssl x509 -noout -fingerprint -sha256 prints, so an operator can check what was mounted; with no bundle it logs that the client trusts the built-in roots. The client honours HTTPS_PROXY: TLS runs end to end through the proxy, so the bundle still decides whom the client trusts.

canopy-appeals, canopy-enrollment, canopy-renewals, canopy-verification

Variable Default Meaning

CANOPY_APPEALS__ASSESSMENT_POLL_MS

5000

Drain cadence of the continued-benefits assessment worker; domain 50..=60000, boot-validated. Devstack: 500.

CANOPY_ENROLLMENT__SETTLEMENT_TICK_MS

5000

Tick of the issuance-settlement loop; the aged-pending alert cadence derives from it. Domain 50..=60000. Devstack: 500.

CANOPY_ENROLLMENTAPPLICATIONS_URL, CANOPY_RENEWALS{ELIGIBILITY,PERSONS,ENROLLMENT}_URL, CANOPY_VERIFICATION{PERSONS,APPLICATIONS}_URL, CANOPY_APPEALS{ENROLLMENT,SNAP,APPLICATIONS,WIC}_URL

yaml: compose service names

Peer base URLs. The remaining tunables (renewals PR_TICK_BUDGET_SECS, UNIVERSE_SNAPSHOT_RETENTION_DAYS; verification IEVS_ADAPTER, SAVE_ADAPTER, *_SCRIPTS_PATH; the appeals clock and window days) are documented in each config.rs.

Receivers and admission

Each service’s receiver is built from the baseline IDENTITY_ISSUER / IDENTITY_INTERNAL_URL pair (Baseline variables (ServiceSettings, every axum service)), with the applicant claim’s verifying key, APPLICANT_VERIFYING_KEY, where the service reads the portal’s claim (Secrets). Nothing about which callers a route admits is configured. A route’s admission is a compiled canopy_auth::Admission its handler names (Security › The identity receiver), and each client’s edges are compiled too (IdP Integration › Registering canopy’s clients).

Identity (idp.toml)

The pack’s idp.toml holds only the [roles.*] composition role catalog (ADR-022), read through the configuration layers (Configuration source (CANOPY_CONFIG_SOURCE); IdpDocument, crates/canopy-composition/src/idp.rs, deny_unknown_fields, so the parser refuses any other table). A jurisdiction configures no identity provider: canopy-web signs in through canopy-identity at the deployment’s one upstream, whose profile is deployment configuration ([identity-upstream], canopy-web (worker portal BFF)).

canopy-web (worker portal BFF)

WebConfig (services/canopy-web/src/config.rs) is deny_unknown_fields; every key below is a field. canopy-web signs workers in through canopy-identity and boots only with all of these, each missing one refusing the boot by name:

  • the upstream profile identity-upstream.yaml and the trust anchors it names, under the config root (CANOPY_CONFIG_ROOT), mounted read-only as canopy-security mounts them (ADR-049 Amendment 5);

  • CANOPY_WEBUPSTREAM_CLIENT_SECRET, its client secret at that upstream, and CANOPY_WEBIDENTITY_CLIENT_PRIVATE_KEY, its canopy-identity client key: reserved keys read through the secret provider with no file fallback (Secrets);

  • the baseline CANOPY_WEBIDENTITY_ISSUER / IDENTITY_INTERNAL_URL pair (Baseline variables (ServiceSettings, every axum service));

  • the jurisdiction’s [sign_in] system_use_notice in jurisdiction.toml, the sign-in page’s AC-8 notice.

A jurisdiction’s idp.toml configures no sign-in (Identity (idp.toml)). The trusted-proxy rule canopy-web applies to the ingress in front of it: Deployment Guide › The proxy chain.

Variable Default Meaning

CANOPY_WEB__PUBLIC_ORIGIN

required

canopy-web’s public origin: an https URL naming a host and port, with no path, query or fragment; anything else refuses the boot. The upstream returns every flow to {origin}/auth/callback and a signed-out browser to {origin}/login, so both must be registered at the upstream. canopy-web’s three cookies always carry Secure and the Host- prefix: Host-canopy_session (the session, SameSite=Strict, no Max-Age), Host-canopy_login_flow (the flow in flight, SameSite=Lax, 900 s) and Host-canopy_reauth (prompt=login after a sign-out, SameSite=Lax, 30 days); all HttpOnly, Path=/, no Domain. Devstack: https://web.canopy.test:<port>;, the ingress TLS proxy’s port (web.canopy-xsite.test for the cross-site instance).

CANOPY_WEB__PAGE_DEADLINE_MS / FRAGMENT_DEADLINE_MS

yaml: 12000 / 8000

Aggregate SSR deadline budgets for full pages and htmx fragments; one absolute cutoff per top-level handler that every upstream call derives its residual from. Boot-validated to [1000, 14000] and [1000, 9000] ms unless CANOPY_WEB__DEADLINE_OVERRIDE is set.

CANOPY_WEB__DETERMINE_TIMEOUT_MS

yaml: 8000

The budget of the two POST /v1/eligibility/determine calls (approve and the per-application run), which wait for the orchestrator’s context reads and program dispatches; a call that outlives it answers the still-running alert, never a failure (#3199). Boot-validated to [1000, 9000] ms, the same htmx ceiling as the fragment deadline, and with PROJECTION_WAIT_MS to 9000 ms in all, unless CANOPY_WEB__DEADLINE_OVERRIDE is set.

CANOPY_WEB__PROJECTION_WAIT_MS

yaml: 1000

How long the approve, the per-application run and the quarantine promotion re-read the application for canopy-applications's projection of the determination they ran (#3202, Read after a determine); running out renders the pending copy, never a failure. An operator setting, not pack data. Boot-validated to [250, 8000] ms, and with DETERMINE_TIMEOUT_MS to 9000 ms in all, unless CANOPY_WEB__DEADLINE_OVERRIDE is set.

CANOPY_WEB__CONFIDENTIALITY_FAIL_OPEN

false

false = fail closed: when the household-confidentiality lookup fails, case-detail address surfaces withhold the street and the badge escalates. true restores the fail-open render for the lookup-failure state only and warns on every such render. The address editors' write gate follows the same setting (#1887): fail closed refuses an edit or remove of an existing address while the lookup fails, and true lets it through with the same warning.

CANOPY_WEB__PANEL_CACHE_MAX_ENTRIES / PANEL_CACHE_MAX_BODY_BYTES / PANEL_CACHE_MAX_TOTAL_BYTES

see config.rs

Bounds of the panel-data cache: entry count, per-entry body bytes (larger 2xx bodies bypass the cache) and the aggregate cached-body budget. Memory is bounded in bytes and entries, not TTL.

CANOPY_WEB__COMPOSITION_CACHE_MAX_ENTRIES / COMPOSITION_CACHE_TTL_SECS

10000 / 3600

Bounds of the composition cache (CompositionCache, crates/canopy-composition/src/cache.rs — a moka::future::Cache since #510): the entry cap moka enforces under its default TinyLFU policy, and the time-to-live from each entry’s insert — the backstop for a missed composition.* invalidation event (#1225). WebConfig::composition_cache_config validates both at boot against canopy_composition::cache::MAX_ENTRIES_BOUNDS ([1, 1000000]) and TTL_BOUNDS ([1, 86400] s in this form); out of range refuses to boot, with no override — zero disables caching silently and more lets stale content outlive a missed invalidation. The cache counts on the canopy_composition OpenTelemetry meter: composition_cache_hits and composition_cache_misses (one per get) and composition_cache_evictions{cause}, cause being moka’s RemovalCause in lowercase — expired (TTL), size (cap), explicit (invalidate, the scoped invalidations and clear) or replaced (an insert over a live key).

CANOPY_WEB__<SVC>_URL (15 keys)

required

One base URL per backend the BFF dials. None has a default: an unset key fails boot naming the field (#723). The devstack sets http://canopy-<svc>:<port>;: PERSONS (8002), APPLICATIONS (8003), ELIGIBILITY (8004), VERIFICATION (8005), ENROLLMENT (8006), RENEWALS (8007), NOTICES (8008), APPEALS (8010), REPORTING (8011), SECURITY (8012), SNAP (8013), TANF (8014), MEDICAID (8015), CAPS (8016), WIC (8017). SECURITY_URL is also the worker-directory sink’s base.

canopy-portal (applicant portal BFF)

The portal is not a bootstrap service — no database, no canopy-api chassis — so PortalConfig (services/canopy-portal/src/config.rs) is the whole schema, loaded with load_single("CANOPY_PORTAL", …) and deny_unknown_fields. Its config/canopy-portal/ is baked into the image, compose sets CANOPY_CONFIG_ROOT=/app/config, and CANOPY_ENV=development selects the baked development overlay, dev.yaml, the devstack portal’s only configuration source: it is read only under development, so the same image elsewhere boots with none until the deployment sets one (The configuration source is required, with no shipped default). The eight reserved keys (Secrets) are env-only; the six flags among them compare the raw string against one lowercase literal, so FALSE, 0 and no do not toggle them.

Variable Default Meaning

CANOPY_PORTAL__PORT

8090

Listener port; an unparseable value fails boot naming the key.

CANOPY_PORTAL__LOCALES_DIR

yaml: locales

Fluent locale bundles, one subdirectory per locale (ADR-008); resolved against the working directory (/app in the image).

CANOPY_PORTAL__CONFIG_SOURCE / POLICY_ROOT / CONFIG_ALLOW_UNVERIFIED

required outside development (dev: dev.yaml) / /app/policy / false

The layers the portal boots against (Configuration source (CANOPY_CONFIG_SOURCE)), declared by PortalConfig itself: the pack’s jurisdiction.toml — its ADR-041 logging redaction policy is read first, before telemetry starts (Rulesets › Logging redaction policy); [notices].agency_phone, [notices].agency_name, [jurisdiction].fips_state_code and [portal.accessibility].barrier_report_phone (#2235) are fatal at boot if missing. CONFIG_SOURCE is required, with no compiled-in fallback (#2213) and no shipped default (#2627); CANOPY_CONFIG_SOURCE also sets it. A host dx serve from the crate dir reads no YAML tier (the config root defaults to the working directory), so it needs a source with path: layers relative to that directory (e.g. CANOPY_CONFIG_SOURCE=test-federal=path:../../fixtures/config/test-federal,notices-neutral=path:../../fixtures/config/notices-neutral,default=path:../../fixtures/config/default with CANOPY_CONFIG_ALLOW_UNVERIFIED=true) and CANOPY_ENV=development: the [env] table in .cargo/config.toml does not reach the server dx serve launches, and unset is production, where the no-op CAPTCHA refuses boot (CAPTCHA_PROVIDER below).

CANOPY_PORTAL__<SVC>_URL (9 keys)

http://localhost:{port}

APPLICATIONS (8003), ELIGIBILITY (8004), VERIFICATION (8005), ENROLLMENT (8006), RENEWALS (8007), NOTICES (8008), PERSONS (8002), SECURITY (8012), SNAP (8013). Unset, each falls back to the devstack’s CANOPY_PORT_CANOPY_<SVC>_<port> and then the compiled-in port, for a dx serve on the host. With REQUIRE_DEPS=true there is no fallback: every unset key refuses the boot (#723).

CANOPY_PORTAL__REDIS_SESSIONS_URL

redis://localhost:6380

Redis backing the applicant sessions and the rate-limit cascade (one noeviction keyspace, ADR-026). Devstack: redis://redis-sessions:6379. The default is the host dx serve fallback; with REQUIRE_DEPS=true the key must be set.

CANOPY_PORTAL__IDENTITY_ISSUER

required

canopy-identity’s issuer identifier (ADR-049 Amendment 16): the sole aud of the client assertions the portal mints its system tokens with. Held to the same rules as the baseline’s (Baseline variables (ServiceSettings, every axum service); http only under CANOPY_ENV=development); a missing value or one outside them refuses the boot in every environment. Devstack: https://web.canopy.test:<port>/identity, on the TLS ingress’s port.

CANOPY_PORTAL__IDENTITY_INTERNAL_URL

required

The same issuer’s base URL inside the network, under which the portal asks {internal}/token. Devstack: http://canopy-security:8012/identity.

CANOPY_PORTAL__IDENTITY_CLIENT_PRIVATE_KEY

required

Reserved: the portal’s canopy-identity client key (ADR-049 Amendment 23; Secrets), read through the secret provider with no file fallback. It mints the portal’s system token for each of its nine targets, lazily, at the first call (or /readyz); without it the boot is refused in every environment. The portal holds no user token, and its applicant claim stays signed by the separate key below. A receiver’s refusal of a token re-mints it and resends the call once; a backend’s own 401 (a wrong applicant credential) is answered as it came.

CANOPY_PORTAL__COOKIE_SECURE

true

Reserved flag: Secure on the session and device cookies; only the literal false clears it. Devstack: false.

CANOPY_PORTAL__REQUIRE_DEPS

false

Reserved flag: refuse the boot (→ container restart) instead of serving degraded when the applicant signing key, the session store or the data-path HTTP client is unavailable at boot. It also requires the nine <SVC>_URL keys and REDIS_SESSIONS_URL to be set: the boot is refused naming every unset one, since localhost in a container is the portal itself (#723). Devstack: true.

CANOPY_PORTAL__RATELIMIT_ENABLED

true

Reserved flag: run the applicant rate-limit cascade; only the literal false turns it off. Devstack: false.

CANOPY_PORTAL__RATELIMIT_TRUST_FORWARDED_FOR

false

Reserved flag, fail-closed: trust X-Forwarded-For for the per-IP tier. Without a rewriting proxy in front, a client could pick its own tier.

CANOPY_PORTAL__RATELIMIT_CGNAT_SUBNETS

"" (RFC 6598 100.64.0.0/10)

Comma-separated CIDRs that get the higher per-IP allowance; an unparseable entry is skipped with a warning.

CANOPY_PORTAL__RATELIMIT_DEVICE_HOURLY / DEVICE_DAILY / CASE_DAILY / IP_HOURLY / IP_HOURLY_CGNAT

60 / 200 / 8 / 300 / 3000

The cascade’s volumetric tiers (ADR-026); an unparseable value fails boot naming the key.

CANOPY_PORTAL__CAPTCHA_PROVIDER

""

Provider for the /recover flow; empty and noop select the no-op provider, any other name warns and falls back to it. No provider that challenges ships yet (#663), so outside CANOPY_ENV=development (unset is production) the portal refuses to boot, naming this key, unless CANOPY_PORTAL__ALLOW_NOOP_CAPTCHA is set. The devstack sets development; a host dx serve must export CANOPY_ENV=development itself (see CONFIG_SOURCE above).

CANOPY_PORTAL__ALLOW_NOOP_CAPTCHA

unset

Reserved accountable override (Accountable overrides).

CANOPY_PORTAL__APPLICANT_SIGNING_KEY

unset (.keys/ fallback in development)

Reserved: the applicant ownership-claim signing key, a separate secret from the canopy-identity client key. Without it the boot is refused outside development and wherever REQUIRE_DEPS is set; a host dx serve in development serves with the applicant routes unmounted instead (#2489; Secrets).

CANOPY_PORTAL__ALLOW_CONFIDENTIAL_ADDRESS_LETTER_STREAMING

unset

Reserved accountable override (Accountable overrides).

Edit this page · default