Repository navigation
Closed
Labels
Description
Follow-up from epic #40 / PR #57. A full credential env-var audit was
explicitly deferred when the narrow 12-factor scope landed.
Scope
Audit every place flapi reads a credential from the environment, plus
every `{{env.VAR}}` substitution path through YAML, and produce one
canonical inventory.
Specifically:
- Read every credential code path:
- AWS: `credential_manager.cpp` (`AWS_ACCESS_KEY_ID`,
`AWS_SECRET_ACCESS_KEY`, `AWS_REGION`, `AWS_SESSION_TOKEN`,
`AWS_PROFILE`, ...) - GCS: `GOOGLE_APPLICATION_CREDENTIALS`,
`GOOGLE_CLOUD_PROJECT` - Azure: `AZURE_STORAGE_CONNECTION_STRING`,
`AZURE_STORAGE_ACCOUNT`, `AZURE_STORAGE_KEY` - flapi-specific: `FLAPI_CONFIG_SERVICE_TOKEN`,
`FLAPI_NO_TELEMETRY`, `FLAPI_CONFIG`, `FLAPI_LOG_LEVEL` - YAML interpolation: `{{env.VAR}}` against
`environment-whitelist`
- AWS: `credential_manager.cpp` (`AWS_ACCESS_KEY_ID`,
- Cross-reference against the AWS / GCP / Azure SDK docs to find
credentials we don't read but ought to (e.g. `AWS_ROLE_ARN` for
IRSA, `GCE_METADATA_HOST` for VMs). - Document the inventory in
`docs/CONFIG_REFERENCE.md` § "12-factor checklist" + the
landing-page `docs/tools/server-cli.md` env-vars table. - Decide whether to read any additional env vars (or surface
warnings when a likely-mistyped variant is set — e.g.
`AWS_ACCESS_KEY` without the `_ID` suffix).
Why
The "secrets stay out of the bundle" invariant from self-packaging
relies on env-var credential delivery. Today the surface is partly
implicit (DuckDB extensions read their own env vars; flapi doesn't
gatekeep). A single authoritative inventory makes the contract
auditable for security review.
Acceptance
- Inventory table in `docs/CONFIG_REFERENCE.md`.
- Mirror in `flapi-landingpage` server-cli + deployment env-vars
tables. - Optional: warnings for common typos at startup.
References
- PR feat(self-packaging #47): 12-factor env vars FLAPI_CONFIG + FLAPI_LOG_LEVEL #57 "Out of scope (deferred)" section
- v26.05.23 release notes "Out of scope" section
- `docs/spec/components/security.md` § "Secrets and the bundle"
Activity
jrosskopf commentedon May 25, 2026
Closing — the in-repo deliverable is already done.
docs/CONFIG_REFERENCE.md:145-166contains the "12-factor checklist (environment variables)" table covering:AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION,AWS_DEFAULT_REGION,AWS_SESSION_TOKEN,AWS_ENDPOINT_URLGOOGLE_APPLICATION_CREDENTIALS,GOOGLE_CLOUD_PROJECT,GCLOUD_PROJECT,GCP_PROJECTAZURE_STORAGE_CONNECTION_STRING,AZURE_STORAGE_ACCOUNT,AZURE_STORAGE_KEY,AZURE_TENANT_ID,AZURE_CLIENT_IDFLAPI_CONFIG,FLAPI_LOG_LEVEL,FLAPI_CONFIG_SERVICE_TOKEN,FLAPI_NO_TELEMETRY{{env.VAR}}interpolation contract andenvironment-whitelistenforcement requirementThe list cross-references the actual code paths in
src/credential_manager.cpp:10-31, 64-131and the whitelist enforcement insrc/config_manager.cpp:155-156.The landing-page mirror (server-cli + deployment env-vars tables) lives in the separate
flapi-landingpagerepo and should be tracked there, not here. The optional startup-warning-for-typo'd env vars (item 4 in the original scope) is not required by anything we ship today; if we want it, a fresh issue scoped just to that is the right shape.