EDFI-2813 Harden Admin App config and fix the Docker compose SQL Server path - #262
Open
analiliagutierrez wants to merge 3 commits into
Open
EDFI-2813 Harden Admin App config and fix the Docker compose SQL Server path#262analiliagutierrez wants to merge 3 commits into
analiliagutierrez wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request hardens Admin App configuration defaults and cleans up unused configuration values, while fixing a Docker Compose SQL Server startup footgun where the selected Compose profile could diverge from the API’s .env DB engine configuration.
Changes:
- Removed unused
MANAGEMENT_*secrets from the sample config templates and Compose documentation. - Defaulted
SSL_VERIFICATIONtotrueinproduction.js-edfiwith updated guidance. - Added a guard warning in
compose/start-services.ps1when-MSSQLis used but.envDB_ENGINEdoes not match, and updated Compose docs for SQL Server usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/api/config/production.js-edfi | Removes unused management-client secrets and enables TLS verification by default. |
| packages/api/config/local.js-edfi | Removes unused management-client secrets from local sample config. |
| compose/start-services.ps1 | Warns when selected Compose DB profile and .env DB_ENGINE are inconsistent. |
| compose/readme.md | Updates SQL Server instructions (DB secret value swap, removes stale manual depends_on step) and removes unused management-client secret example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
analiliagutierrez
marked this pull request as ready for review
July 28, 2026 17:08
The MANAGEMENT_DOMAIN / MANAGEMENT_CLIENT_ID / MANAGEMENT_CLIENT_SECRET fields are dead: absent from IAuth0Secret, dropped by the AWS config loader, and read by no consumer in packages/api/src. Removing them stops shipping a default secret. Split out from EDFI-2776 so it survives the windows-install repo migration.
Default SSL_VERIFICATION to true so the API validates TLS certificates on its outbound HTTPS calls (ODS/API, AdminApi, Yopass). The previous false default exposed those calls to man-in-the-middle when the API runs off the loopback. Split out from EDFI-2776 so it survives the windows-install repo migration.
Warn when start-services.ps1 -MSSQL is used but .env still selects a different DB_ENGINE, so the API no longer starts silently against the wrong or a stopped database. Document the required DB_SECRET_VALUE swap for SQL Server and drop the now-stale manual depends_on edit (the compose file already waits for whichever database profile is active).
analiliagutierrez
force-pushed
the
EDFI-2813-harden-api-config-defaults
branch
from
July 28, 2026 17:48
596422c to
25c89c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Config cleanup carried out of EDFI-2776 (its
windows-install/folder is moving to a dedicated repo) plus a small fix to the Docker Compose SQL Server path.What Changed
MANAGEMENT_DOMAIN/MANAGEMENT_CLIENT_ID/MANAGEMENT_CLIENT_SECRET) fromproduction.js-edfi,local.js-edfi, and thecompose/readme.mdexample — unconsumed inpackages/api/src, so it only shipped a default secret.SSL_VERIFICATIONtotrueinproduction.js-edfi(installer-neutral comment). It gates TLS-certificate verification on the API's outbound calls (ODS/API, Admin API, Yopass); the previousfalseaccepted any certificate, exposing those calls to MITM off loopback. Self-signed upstreams should be trusted viaNODE_EXTRA_CA_CERTSrather than by disabling verification globally. Transparent for CA-issued upstreams and the self-contained Docker stack (which mounts its own cert); against a self-signed upstream, registering an Environment now fails explicitly with a guided cert error instead of trusting it silently.compose/):start-services.ps1 -MSSQLonly switches the container profile, so a mismatchedDB_ENGINEin.envhad the API start against the wrong/stopped DB. The script now warns on that mismatch (no env mutation —.envstays authoritative).readme.mdgains the requiredDB_SECRET_VALUEswap and drops the stale manualdepends_onstep (the compose already waits for the active engine).Testing
Config/script/docs only — no app runtime path changes.
MANAGEMENT_*verified unconsumed;SSL_VERIFICATIONhonored (self-signed upstream rejected ontrue, accepted onfalse); the-MSSQLguard validated across the engine-match / mismatch / no-.envcases (default PostgreSQL path unchanged).