[GH-ISSUE #732] [Issue]: REQUIRE_AUTH_FOR_DOCKER_PROXY scope is unclear for non-172.16/12 deployments #346

Closed
opened 2026-10-20 17:27:52 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/732

Summary

REQUIRE_AUTH_FOR_DOCKER_PROXY (added in #724) is internally keyed on isDockerIp(request.ip) which matches 172.16.0.0/12 only. On setups where the reverse-proxy container's IP is in a different RFC 1918 range — Docker Swarm overlays (10.0.0.0/8), docker-compose with custom networks: blocks, Kubernetes pod IPs (10.x), or any IPAM override that doesn't use the legacy default bridge — the flag is a no-op. Current docs don't make that scope explicit, so operators on those setups may believe the flag protects them when it doesn't.

Expected behavior

Docs for REQUIRE_AUTH_FOR_DOCKER_PROXY make the targeted CIDR explicit (172.16.0.0/12) and point operators on other proxy CIDRs at the existing alternatives that work for their setup (BASIC_AUTH_USER/PASS + ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=false, or IP_ALLOWLIST of the specific proxy IP).

Actual behavior

Both .env.example and docs/CONFIGURATION.md / docs/REMOTE_ACCESS.md describe the flag in terms of "Docker reverse-proxy / tunnel container" without naming the underlying CIDR. The runtime check is isDockerIp(request.ip) in packages/server/src/middleware/ip-allowlist.ts, which matches 172.16.0.0/12 only.

Steps to reproduce

  1. Deploy Marinara on EasyPanel (Docker Swarm overlay) or docker-compose with a custom user-defined network in 10.x.
  2. Place Traefik / nginx / Caddy in front as a reverse proxy.
  3. Configure BASIC_AUTH_USER/BASIC_AUTH_PASS and set REQUIRE_AUTH_FOR_DOCKER_PROXY=true.
  4. Observe that the flag does not change request handling — isDockerProxyForwardedRequest returns false for the proxy's 10.x IP, so isTrustedInterfaceRequest falls straight through to the unchanged isTrustedInterfaceIp path.

Confirmed empirically against me.romyromulus.com (EasyPanel Swarm), where the reverse-proxy IP presents as 10.11.0.4 to the Marinara container.

Environment

  • Marinara Engine version: post-#724 merge (main at 7d75993)
  • Install type: Docker (EasyPanel Swarm overlay)
  • OS + version: not relevant — issue is in the upstream code path
  • Browser or app shell: not browser-specific

Logs, screenshots, or video

Not applicable — observable as missing behavior on a proxy IP outside 172.16/12.

Additional context

The PR's threat model in #723 was correctly scoped to the legacy Docker bridge, so this is not a regression. The fix is purely documentation: name the targeted CIDR explicitly so operators on other proxy ranges don't enable the flag expecting coverage it doesn't provide.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (May 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/732 ## Summary `REQUIRE_AUTH_FOR_DOCKER_PROXY` (added in #724) is internally keyed on `isDockerIp(request.ip)` which matches **172.16.0.0/12 only**. On setups where the reverse-proxy container's IP is in a different RFC 1918 range — Docker Swarm overlays (10.0.0.0/8), docker-compose with custom `networks:` blocks, Kubernetes pod IPs (10.x), or any IPAM override that doesn't use the legacy default bridge — the flag is a no-op. Current docs don't make that scope explicit, so operators on those setups may believe the flag protects them when it doesn't. ## Expected behavior Docs for `REQUIRE_AUTH_FOR_DOCKER_PROXY` make the targeted CIDR explicit (172.16.0.0/12) and point operators on other proxy CIDRs at the existing alternatives that work for their setup (`BASIC_AUTH_USER/PASS` + `ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=false`, or `IP_ALLOWLIST` of the specific proxy IP). ## Actual behavior Both `.env.example` and `docs/CONFIGURATION.md` / `docs/REMOTE_ACCESS.md` describe the flag in terms of "Docker reverse-proxy / tunnel container" without naming the underlying CIDR. The runtime check is `isDockerIp(request.ip)` in [`packages/server/src/middleware/ip-allowlist.ts`](https://github.com/Pasta-Devs/Marinara-Engine/blob/main/packages/server/src/middleware/ip-allowlist.ts), which matches 172.16.0.0/12 only. ## Steps to reproduce 1. Deploy Marinara on EasyPanel (Docker Swarm overlay) or docker-compose with a custom user-defined network in 10.x. 2. Place Traefik / nginx / Caddy in front as a reverse proxy. 3. Configure `BASIC_AUTH_USER/BASIC_AUTH_PASS` and set `REQUIRE_AUTH_FOR_DOCKER_PROXY=true`. 4. Observe that the flag does not change request handling — `isDockerProxyForwardedRequest` returns `false` for the proxy's 10.x IP, so `isTrustedInterfaceRequest` falls straight through to the unchanged `isTrustedInterfaceIp` path. Confirmed empirically against me.romyromulus.com (EasyPanel Swarm), where the reverse-proxy IP presents as 10.11.0.4 to the Marinara container. ## Environment - Marinara Engine version: post-#724 merge (`main` at `7d75993`) - Install type: Docker (EasyPanel Swarm overlay) - OS + version: not relevant — issue is in the upstream code path - Browser or app shell: not browser-specific ## Logs, screenshots, or video Not applicable — observable as missing behavior on a proxy IP outside 172.16/12. ## Additional context The PR's threat model in #723 was correctly scoped to the legacy Docker bridge, so this is not a regression. The fix is purely documentation: name the targeted CIDR explicitly so operators on other proxy ranges don't enable the flag expecting coverage it doesn't provide. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:27:52 +07:00
  • closed this issue
  • added the
    docs
    bug
    labels
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#346
No description provided.