security(compose): loopback-bind control-center in release configs - #45
Merged
Merged
Conversation
Follow-up to PR #44's release-compose hardening. SECURITY-COMPOSE-HARDENING.md already claimed control-center was loopback-only alongside lims and nginx-router -- a re-audit of the remaining ${HOST_IP:-0.0.0.0} bindings found that was only true of docker-compose.yml (dev); both release files had drifted to ${HOST_IP:-0.0.0.0}:7070:7070. Not a live authentication bypass: control-center's /docker, /services, /summary, /config routes are independently gated by require_permission("platform.manage_infra") at the FastAPI app level (omnibioai-control-center@8720377) regardless of this binding. This restores the documented/intended defense-in-depth binding and closes the doc/code inaccuracy. The broader question -- whether workbench/tes/auth-service/rag/model-registry should also move off ${HOST_IP:-0.0.0.0} -- remains open per SECURITY-COMPOSE-HARDENING.md SS7 item 1: it requires a product/deployment decision (would remove the direct-LAN-access path HOST_IP exists for) and is explicitly not made in this change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 tasks
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
Follow-up audit to PR #44's release-compose hardening (
${HOST_IP:-0.0.0.0}exposure review).SECURITY-COMPOSE-HARDENING.md§7 item 1 already claimedcontrol-centerwas loopback-only alongsidelimsandnginx-router. Re-verified against current code and found that claim was only true ofdocker-compose.yml(dev, hardcoded127.0.0.1:7070:7070with an explicit comment) — both release files (docker-compose.release.yml,docker-compose-release.yml) had drifted to${HOST_IP:-0.0.0.0}:7070:7070.127.0.0.1:7070:7070, matching the dev file and the doc's own description.control-center's/docker,/services,/summary,/configroutes are independently gated byrequire_permission("platform.manage_infra")at the FastAPI app level (omnibioai-control-center, commit8720377, already merged) regardless of this host-port binding — confirmed by readingmain.py'sinclude_router(..., dependencies=[Depends(require_permission(...))])wiring andcore/auth.py's independent JWT verification. This closes an unintended defense-in-depth gap and a doc/code inaccuracy, not a live exposure.upstream control { server control-center:7070; }) is untouched — internal Docker networking never depended on the host port binding.workbench/tes/auth-service/rag/model-registryshould also move off${HOST_IP:-0.0.0.0}— remains open and explicitly not addressed here. It's a materially larger change (removes the direct-LAN-access pathHOST_IPexists to support) that needs a product/deployment decision, perSECURITY-COMPOSE-HARDENING.md§7 item 1's own existing text.docker-compose-release.yml'slimsblock runsDJANGO_DEBUG: "true"while publishing on${HOST_IP:-0.0.0.0}:7000:7000(the dot-named shipped file correctly usesDJANGO_DEBUG: "false"+127.0.0.1:7000:7000). Flagging for a future LIMS-focused task.Test plan
tests/test_compose_network_exposure.py: 2 new tests (test_control_center_is_loopback_bound_in_release_configsparametrized over both release files,test_dev_compose_control_center_still_loopback_bound) — pin the binding so it can't silently drift again in either directiontests/test_compose_release_config.py+tests/test_compose_network_exposure.pytogether: 71/71 passeddocker compose config(both release files, dummy secrets): resolvescontrol-centertohost_ip: '127.0.0.1'as expectedorigin/main(diffexit 0), all pre-existing live-service integration tests unrelated to this change🤖 Generated with Claude Code