[PR #8553] [MERGED] feat(server): warn when Docker gateway trust admits devices without a login (#8512) #8668

Closed
opened 2026-11-07 16:46:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8553
Author: @Gunterlie
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @Gunterlie

Base: staging ← Head: feat/docker-trust-warning-8512


📝 Commits (4)

  • d3a816f feat(server): warn when Docker gateway trust admits devices without a login (#8512)
  • 5afa561 fix(server): scope the Docker trust warning to gateway-rewriting runtimes (#8512)
  • b6f902b fix(server): do not advise a login when BYPASS_AUTH_DOCKER=true forces the trust (#8512)
  • 13ce53b fix(server): ask for a login too when removing BYPASS_AUTH_DOCKER=true is not enough (#8512)

📊 Changes

5 files changed (+35 additions, -2 deletions)

View changed files

📝 docs/REMOTE_ACCESS.md (+2 -0)
📝 docs/installation/containers.md (+2 -0)
📝 packages/server/src/index.ts (+3 -1)
📝 packages/server/src/middleware/ip-allowlist.ts (+14 -0)
📝 scripts/regressions/access-status.regression.ts (+14 -1)

📄 Description

Linked issue

Closes #8512

Why this change

Split from #7914. Inside Docker, Marinara trusts the container gateway while no login is set. The default Compose file publishes on 127.0.0.1:7860, so only the host can reach it. On Docker Desktop, OrbStack and rootless Docker, a port published on all interfaces (-p 7860:7860) makes every LAN device arrive from that gateway, so they get in without a login. The server cannot see the host port mapping. Maintainer decision on #8512: keep the trust, warn louder. Who gets in does not change.

What changed

  • packages/server/src/middleware/ip-allowlist.ts: dockerTrustWarning(peers), built on the existing getPasswordlessPeers, so it follows the real policy (off once a login, IP_ALLOWLIST or TRUSTED_AUTH_PROXY is set, when Docker bypass is off, or when the server binds to loopback).
  • packages/server/src/index.ts: logs it once at startup with logger.warn, next to the existing "These visitors get in without a password" line. No request path calls the new code.
  • docs/REMOTE_ACCESS.md (Tailscale and Docker bypass) and docs/installation/containers.md (Exposing Marinara to your LAN): one short paragraph each.
  • scripts/regressions/access-status.regression.ts: the warning appears with Docker trust and no login, and is null with a login.

Warning text:

[access] Marinara trusts the Docker gateway without a login. On Docker Desktop, OrbStack and rootless Docker, every device that reaches a published port arrives from that gateway. Keep the port on 127.0.0.1 (the default Compose setup) or set a login before you publish it to your network.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent runs: pnpm check exit 0 (first commit); node ./scripts/run-regressions.mjs --filter access-status 1/1 passed; server tsc --noEmit exit 0 after the wording fix. Bite test: with dockerTrustWarning returning null, the regression fails. An Opus review found the first wording too broad (rootful Linux Docker keeps the LAN source IP, so those clients get 403); the second commit scopes it.

Manual verification notes

  • Manually verify that a default docker compose up prints the new warning once at startup and that it disappears after setting a login.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable (server log and docs).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8553 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/docker-trust-warning-8512` --- ### 📝 Commits (4) - [`d3a816f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d3a816f203ae612ff76aa2446f31b9087fc173da) feat(server): warn when Docker gateway trust admits devices without a login (#8512) - [`5afa561`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5afa5610870080fb7b93bdbfaed6e8e017460bd6) fix(server): scope the Docker trust warning to gateway-rewriting runtimes (#8512) - [`b6f902b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b6f902b7ef3a49d3dc60bca75be7c528f086a78a) fix(server): do not advise a login when BYPASS_AUTH_DOCKER=true forces the trust (#8512) - [`13ce53b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/13ce53be80da3e31984a79ed5a17ebd49136e44f) fix(server): ask for a login too when removing BYPASS_AUTH_DOCKER=true is not enough (#8512) ### 📊 Changes **5 files changed** (+35 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/REMOTE_ACCESS.md` (+2 -0) 📝 `docs/installation/containers.md` (+2 -0) 📝 `packages/server/src/index.ts` (+3 -1) 📝 `packages/server/src/middleware/ip-allowlist.ts` (+14 -0) 📝 `scripts/regressions/access-status.regression.ts` (+14 -1) </details> ### 📄 Description ## Linked issue Closes #8512 ## Why this change Split from #7914. Inside Docker, Marinara trusts the container gateway while no login is set. The default Compose file publishes on `127.0.0.1:7860`, so only the host can reach it. On Docker Desktop, OrbStack and rootless Docker, a port published on all interfaces (`-p 7860:7860`) makes every LAN device arrive from that gateway, so they get in without a login. The server cannot see the host port mapping. Maintainer decision on #8512: keep the trust, warn louder. Who gets in does not change. ## What changed - `packages/server/src/middleware/ip-allowlist.ts`: `dockerTrustWarning(peers)`, built on the existing `getPasswordlessPeers`, so it follows the real policy (off once a login, `IP_ALLOWLIST` or `TRUSTED_AUTH_PROXY` is set, when Docker bypass is off, or when the server binds to loopback). - `packages/server/src/index.ts`: logs it once at startup with `logger.warn`, next to the existing "These visitors get in without a password" line. No request path calls the new code. - `docs/REMOTE_ACCESS.md` (Tailscale and Docker bypass) and `docs/installation/containers.md` (Exposing Marinara to your LAN): one short paragraph each. - `scripts/regressions/access-status.regression.ts`: the warning appears with Docker trust and no login, and is `null` with a login. Warning text: > [access] Marinara trusts the Docker gateway without a login. On Docker Desktop, OrbStack and rootless Docker, every device that reaches a published port arrives from that gateway. Keep the port on 127.0.0.1 (the default Compose setup) or set a login before you publish it to your network. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent runs: `pnpm check` exit 0 (first commit); `node ./scripts/run-regressions.mjs --filter access-status` 1/1 passed; server `tsc --noEmit` exit 0 after the wording fix. Bite test: with `dockerTrustWarning` returning `null`, the regression fails. An Opus review found the first wording too broad (rootful Linux Docker keeps the LAN source IP, so those clients get 403); the second commit scopes it. ### Manual verification notes - Manually verify that a default `docker compose up` prints the new warning once at startup and that it disappears after setting a login. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable (server log and docs). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:46:22 +07:00
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#8668
No description provided.