security: enforce model-registry auth in release compose - #50
Merged
Conversation
CRITICAL: both production/release compose files (docker-compose.release.yml
and docker-compose-release.yml) shipped model-registry with no
AUTH_ENABLED/JWT_SECRET/IAM_URL/AUDIT_URL at all. omnibioai-model-registry's
config.py defaults AUTH_ENABLED to false when unset, so every route's auth
dependency silently returned a synthetic unauthenticated identity -- no
token required, no permission check -- while the service was published on
${HOST_IP:-0.0.0.0}:8095 by default. The real Phase 2A-2E organization-
ownership enforcement in that repo never ran in a release deployment.
Reproduced live: an unauthenticated POST /v1/register (zero Authorization
header, AUTH_ENABLED unset) returned 200 and registered a model.
Fix mirrors the exact wiring docker-compose.yml (dev) already had for this
same service, and the established release-file convention already used by
control-center/dev-hub/security-audit (AUTH_ENABLED as a hardcoded "true"
literal, JWT_SECRET as ${AUTH_SECRET_KEY:?...} required-guard, IAM_URL/
AUDIT_URL as fixed internal-network URLs) -- no new pattern invented.
Changed:
- docker-compose.release.yml, docker-compose-release.yml: add
IAM_URL/AUDIT_URL/JWT_SECRET/AUTH_ENABLED to model-registry's environment
block. Verified via `docker compose config` that (a) the merged config
now carries all four correctly and (b) omitting AUTH_SECRET_KEY makes
compose refuse to start with "AUTH_SECRET_KEY must be set", naming
model-registry's own JWT_SECRET line -- confirms this fails closed
rather than silently reverting to open mode.
- tests/test_compose_release_config.py: add model-registry to
EXPECTED_SECRET_WIRING (JWT_SECRET-sourcing regression coverage, same
mechanism already protecting control-center/security-audit) and a new
SERVICES_REQUIRING_AUTH_ENABLED set + test asserting AUTH_ENABLED is the
literal "true" in both release files. Scoped to model-registry only --
running the new AUTH_ENABLED test against dev-hub too surfaced an
independent, pre-existing gap (docker-compose-release.yml's dev-hub
block is missing JWT_SECRET/AUTH_ENABLED entirely) which is out of
scope for this change and is flagged separately, not fixed here.
- SECURITY-COMPOSE-HARDENING.md: corrects the document's own prior claim
that model-registry "does enforce IAM authorization" on its default
0.0.0.0 binding -- that was false until this fix; documents the finding
and marks the equivalent claim for workbench/tes/auth-service/rag as
unverified pending the same audit.
release/linux-arm64-unpacked/ (gitignored local Electron build output, not
tracked in this repo) still contains a stale pre-fix compose copy on this
machine; it is not the repo's source of truth and will pick up this fix on
the next `npm run build:*`. Not hand-edited.
No changes to omnibioai-model-registry itself -- its Phase 2A-2E
organization-ownership enforcement was already correct; this was purely a
release deployment-configuration gap.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Fix a critical HIPAA security gap where the model-registry service was deployed without authentication and organization enforcement in the release Compose configuration.
The model-registry application already had the required Phase 2A–2E organization-ownership enforcement, but the release deployment did not enable it.
Before this fix,
AUTH_ENABLEDwas unset in the release configuration and therefore defaulted tofalse.The vulnerability was independently reproduced:
POST /v1/register→200Fix
Added the existing repository-standard authentication wiring to the model-registry service in both release Compose variants:
AUTH_ENABLED: "true"JWT_SECRET: ${AUTH_SECRET_KEY:?AUTH_SECRET_KEY must be set}IAM_URL: http://auth-service:8001AUDIT_URL: http://security-audit:8004Also:
EXPECTED_SECRET_WIRING.AUTH_ENABLED == "true"in both release files.Verification
Pre-fix vulnerability reproduced:
POST /v1/register→200Post-fix verification:
GET /v1/models→401POST /v1/register→401401200Configuration verification:
docker compose configconfirms all required model-registry authentication variables.AUTH_SECRET_KEYcauses Compose configuration to fail closed.Tests:
75 passed— release/network configuration tests101 passed— non-integration Studio tests95.76%coverageScope
This PR intentionally does not modify:
omnibioai-model-registrySeparate follow-up investigations are recommended for the release-auth configuration observed in dev-hub, RAG, and TES.
Review request
Please review specifically for:
AUTH_SECRET_KEYis missing.If CI is green and there are no substantive review concerns, this PR is GO for merge.
🤖 Generated with Claude Code