fix(security): bind publish port 8000 to loopback only#120
Merged
JanZachmann merged 1 commit intoomnect:mainfrom Apr 22, 2026
Merged
fix(security): bind publish port 8000 to loopback only#120JanZachmann merged 1 commit intoomnect:mainfrom
JanZachmann merged 1 commit intoomnect:mainfrom
Conversation
The internal publish endpoint (port 8000) is plain HTTP and must not be reachable from outside the device. The local dev script previously published it on 0.0.0.0, exposing it to the LAN. Add an explicit 127.0.0.1 host-IP to the port mapping. ods on the host continues to reach the endpoint via localhost; external clients no longer can. Bump version 1.2.2 -> 1.2.3. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
mlilien
approved these changes
Apr 22, 2026
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
Restrict the internal publish endpoint (port 8000) to host loopback in the local Docker dev script and bump the workspace version to 1.2.3.
Reason
The internal publish endpoint carries ods → omnect-ui event publications over plain HTTP, protected only by a per-instance
X-API-Key. It is meant to be reached viahttp://localhost:8000/...from omnect-device-service on the host — never from the LAN.scripts/build-and-run-image.shpreviously mapped the port as-p 8000:8000, which Docker publishes on0.0.0.0. The README already stated that the endpoint "must not be exposed outside the device network namespace", but the dev script contradicted that.Adding an explicit
127.0.0.1host-IP to the port mapping limits reachability to host loopback without changing the ods → omnect-ui code path (ods useslocalhost, which resolves to127.0.0.1).Paired with the matching change in the edge deployment template (omnect/concourse-pipelines#304) that applies the same restriction to production devices.