Repository navigation
feat(dawarich): keep managed Dawarich off the shared Docker network - #683
Merged
Merged
Conversation
Dawarich fetches URLs its users choose (geofencing webhooks, Immich and PhotoPrism imports and the thumbnail proxy) and, in self-hosted mode, accepts private addresses. Move its four containers onto private networks: one for the bundle and internet access, one through which only Traefik and app-api reach the web app. A new first-party manifest capability, privateNetworks with platformNetwork: false, renders them.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What changed and why
This is the follow-up to #681: the managed Dawarich containers leave the shared
openmapxDocker network. URLs that Dawarich users configure can then no longer reach OpenMapX's internal services.Dawarich fetches URLs its users choose:
send_data(upstream.body)for any 2xx answer).The managed app runs with
SELF_HOSTED=true, so Dawarich accepts private addresses and Docker service names. Onopenmapx, a Dawarich user could reach any OpenMapX service. Through the thumbnail proxy they could also read the body of any GET that answered 2xx.The four Dawarich containers now use two private networks instead:
openmapx-private-dawarichopenmapx-private-dawarich-ingresstraefik(public route) andapp-api(timeline reads viahttp://dawarich-app:3000)Manifest capability
This needed a new first-party manifest capability:
privateNetworksnames theopenmapx-private-<name>networks a service joins.platformNetwork: falsekeeps a service offopenmapx, and requires at least one private network.openmapxand lists a private network, like Traefik and app-api, joins it only while an enabled member that leftopenmapxdeclares it. Installs without Dawarich render no extra network.openmapx, with a stable IPv6 /64 derived from its name insidefd4d:5058::/48, so IPv6 webhook egress keeps working. The renderer fails if two names derive the same /64.openmapx, network aliases go on its private networks.The JSON schema, OpenAPI document and generated SDK model are regenerated.
@openmapx/extension-contractsgets a minor changeset, and the extension CLI a patch to rebuild against it.Reach that remains
/api/internal/metricscounters, which contain no personal data, and its public routes.OPENMAPX_PROXY_NETWORK, the web app also joins the operator's proxy network, as before.Docs
managed-dawarich-1-19fragment now describes the isolation instead of the reach. Its required action now covers operators' own services that called Dawarich overopenmapx.Verification
openmapx.openmapx-only peers. Only theopenmapxstand-in moved to another ULA, because a local stack already holdsfd4d:5058::/64.::on the dual-stack private network.dawarich-app:3000/api/v1/health; anopenmapx-only peer cannot resolve it.openmapxnames don't resolve, and direct IPv4 and IPv6 connections to their addresses time out.Webhook#resolved_url_ip!fails fordata-managerandapp-apiwithBlockedUrlErrorand resolvesexample.com.https://example.com(200).openmapxpeer.pnpm lint,pnpm check-types,pnpm check:policy,pnpm check-openapi,pnpm check-service-filesand the contract schema check pass. The full Vitest suite passes: 1,950 files, 24,062 tests.Release and upgrade impact
Product impact: security, operator-action
The next stack update recreates the four Dawarich containers on the private networks and adds Traefik and app-api to the ingress network; volumes are untouched. If you added your own service that calls
dawarich-appor the Dawarich database by name overopenmapx, it loses that reach.