Repository navigation
Closed
Labels
priority: highHigh prioritytype flag: breaking changeProposed change breaks current APItype: securityRelated to securityworkload: daysLikely takes days to resolve
Milestone
Description
Problem
Secrets for app custom sections (backend credentials, client secrets, S3 keys) can't be referenced from config without app code, FOCA's own env variables can't come from mounted secret files, and secret values can show up in reprs and validation errors.
Proposal
${VAR}interpolation, Compose spec semantics:${VAR},${VAR:-default},${VAR:?message},$$for a literal$. Applies to YAML string scalars only (never keys), after YAML parsing and before overlay merging and pydantic validation, only to file content (not runtime values). An unset variable without default is an error naming the key.*_FILEvariables forMONGO_URI,MONGO_PASSWORD,MONGO_USERNAME,CELERY_BROKER_URL,CELERY_RESULT_BACKEND(Docker official-image convention): read the file, strip the final newline; setting bothXandX_FILEis an error.SecretStrfor FOCA's own secret-bearing fields; recommend it for apps'custommodels in the docs.- Not included: general
FOCA_<SECTION>__<KEY>env overrides.
Breaking (minor): a config string containing ${...} today changes meaning (escape as $${...}). Document it under "Breaking changes" in the release notes and in the migration guide. Code reading a secret field must call .get_secret_value().
Acceptance criteria
- Tests for every syntax form, errors,
$$, keys untouched, overlay order,*_FILE(set, both set, missing file),SecretStrreprs; 100% coverage. - Docs: configuration page section, migration guide entry.
Has to land by 1.0.0-rc1. Comes after the issues that add config fields to mark as SecretStr.
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype flag: breaking changeProposed change breaks current APItype: securityRelated to securityworkload: daysLikely takes days to resolve
Activity