mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#8080
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8056
Author: @Gunterlie
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @Gunterlie
Base:
feat/7912-remote-login← Head:feat/trusted-auth-proxy-7912📝 Commits (5)
ed9d67cfeat(server): trust a forward-auth proxy by socket address (#7912)55d755adocs: explain login proxies (TRUSTED_AUTH_PROXY) for remote access (#7912)d885dd3chore(server): update the proxy lockout note for TRUSTED_AUTH_PROXY (#7912)28b1248fix(server): tighten TRUSTED_AUTH_PROXY ranges and Docker gateway guidance (#7912)8edce21fix(server): list a TRUSTED_AUTH_PROXY range in the owner's passwordless summary (#7912)📊 Changes
13 files changed (+237 additions, -33 deletions)
View changed files
📝
.env.example(+4 -0)📝
docs/CONFIGURATION.md(+1 -0)📝
docs/REMOTE_ACCESS.md(+51 -0)📝
packages/client/src/components/diagnostics/use-access-warning-banner.tsx(+2 -0)📝
packages/client/src/components/panels/settings/AccessStatusSettings.tsx(+1 -0)📝
packages/client/src/localization/locales/en.json(+2 -1)📝
packages/server/src/config/runtime-config.ts(+5 -0)📝
packages/server/src/middleware/access-policy.ts(+33 -24)📝
packages/server/src/middleware/basic-auth.ts(+3 -2)📝
packages/server/src/middleware/ip-allowlist.ts(+74 -4)📝
packages/server/src/routes/access-status.routes.ts(+8 -1)📝
scripts/regressions/access-policy.regression.ts(+39 -0)📝
scripts/regressions/access-status.regression.ts(+14 -1)📄 Description
Part of #7912. PR 2 of 4 into the #7912 integration branch
feat/7912-remote-login. All four PRs merge there; one PR takes the result tostaging. Assigned to @SpicyMarinara.Why
Many owners already run a forward-auth proxy on their home network (tinyauth, Authelia, Authentik, oauth2-proxy). That proxy asks every visitor to log in. Today Marinara then asks for a second login. With this PR the owner can name the proxy, and visitors who come through it log in only once.
What changed
TRUSTED_AUTH_PROXY(comma-separated IPs/CIDRs). A request whose socket peer address matches skips the Marinara login. Forwarding headers never decide the match. Unset means no change in behaviour.0.0.0.0/0,::/0,::ffff:0:0/96or a public IPv6/32, are refused with an error. A public proxy is listed by its single address. Every range logs a warning, because every device in it skips the login. Accepted entries are logged once as an[auth-bypass]warning.127.0.0.1legitimately arrives from the gateway, and the server cannot see how the port is published. The docs tell owners to publish127.0.0.1:7860:7860in that case.access-policy.ts). A trusted auth proxy is an explicit operator choice likeBYPASS_AUTH_TAILSCALE/BYPASS_AUTH_DOCKER, so its requests also passIP_ALLOWLIST: the proxy decides who gets in. They never count as local, so loopback-only and admin-secret rules for privileged APIs do not change. New reasontrusted-auth-proxy.TRUSTED_AUTH_PROXYis set, the same as when a login or an allowlist is set. Without this, other peers on the Docker network could skip the proxy.TRUSTED_HOSTSandCSRF_TRUSTED_ORIGINS./api/access/statusreturnstrustedAuthProxy. Settings → Advanced → Access shows a "Trusted login proxy" row (English key added; other locales fall back). The "open without a password" list showsproxywhen127.0.0.1is a trusted proxy, andprivateNetworkwhen an entry is a range. The English fix hint forproxynames both settings.ponytail:note now says this.docs/REMOTE_ACCESS.mdwith Caddy examples for tinyauth, Authelia and Authentik (Authentik in arouteblock so its outpost path does not loop), and warnings that the proxy must protect every path and that Marinara must not be reachable around it. A same-host proxy must dial127.0.0.1:7860, notlocalhost, because::1does not match a127.0.0.1entry (docs instead of extra matching code). The tinyauth endpoint/api/auth/caddywas checked against tinyauth source (internal/controller/proxy_controller.go, route/auth/:proxy,caddycase). The Authelia and Authentik values follow their Caddy guides; check them against the current docs. New row indocs/CONFIGURATION.md..env.examplehas only a pointer to the guide.Tests
scripts/regressions/access-policy.regression.ts: a proxy peer skips the login and the allowlist but is not local; an IPv4-mapped peer (::ffff:192.168.1.5) matches; a forwarded header that names the proxy is not trusted;0.0.0.0/0,::/0,::ffff:0:0/96, a public IPv6/32, a public IPv4/24and invalid entries open nothing; a single public address is allowed; a same-computer proxy (127.0.0.1) is trusted but not local; a configured proxy withholds automatic Docker trust.scripts/regressions/access-status.regression.ts: the owner status reportstrustedAuthProxy; a same-host trusted proxy is listed asproxy; a proxy range is listed asprivateNetwork; a single proxy address opens no network.Manual verification
TRUSTED_AUTH_PROXYto that host's address, and make sure that a browser that passed the proxy login opens Marinara without a second login.TRUSTED_AUTH_PROXY=0.0.0.0/0and make sure that the server log shows the refusal and that remote devices still need the login.Follow-ups
docs/change needs adocs-i18nupdate when the integration branch goes tostaging(together with the PR 4 docs).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.