mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #723] [Issue]: Docker reverse proxy traffic can inherit Docker bridge trust #345
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NeoKazuya on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/723
Summary
When Marinara is behind a Docker reverse-proxy container, the proxy's Docker bridge IP triggers the Docker auth bypass before Basic Auth runs, so clients reaching Marinara through the proxy can skip the password check the operator configured.
Expected behavior
Users should be able to keep passwordless trusted Docker container traffic, while also having a way to make Marinara-side Basic Auth/IP allowlist apply to Docker reverse-proxy traffic.
Actual behavior
Docker bridge peers are treated as trusted before Basic Auth/IP allowlist checks. When the peer is a reverse proxy container, clients behind that proxy can inherit the proxy container's trusted source IP unless the proxy enforces auth itself or Docker bypass is disabled.
Steps to reproduce
BASIC_AUTH_USERandBASIC_AUTH_PASSin Marinara.BYPASS_AUTH_DOCKERat its default enabled state.172.17.x.x, and applies Docker bypass before Basic Auth.In that setup, the outer client does not need to be on the Docker network. They only need to reach the proxy endpoint.
Environment
mainat1b65a201986845b817accce455c663ebf9a375f8before this patch10.0.26200host with Docker Desktop28.5.1X-Forwarded-For. A browser behind Caddy/nginx/Traefik/Cloudflare Tunnel would hit the same server-side path.Additional context
This is not asking to remove the existing Docker bridge bypass. The goal is to handle the reverse-proxy case when Marinara, not the proxy, is intended to enforce auth.
Suggested approach: add documentation and a targeted mode for Docker proxy traffic. In that mode, Docker bridge traffic carrying forwarding headers such as
X-Forwarded-For,Forwarded, orX-Real-IPwould not receive the Docker auth bypass.This preserves existing default behavior while giving proxy/tunnel users a targeted control.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: