[PR #733] [MERGED] docs(auth): clarify REQUIRE_AUTH_FOR_DOCKER_PROXY scope is 172.16/12 only #4753

Closed
opened 2026-10-22 04:10:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/733
Author: @Romuromylus
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Romuromylus

Base: main ← Head: fix/document-proxy-auth-network-scope


📝 Commits (1)

  • cd78658 docs(auth): clarify REQUIRE_AUTH_FOR_DOCKER_PROXY scope is 172.16/12 only

📊 Changes

3 files changed (+15 additions, -7 deletions)

View changed files

📝 .env.example (+12 -4)
📝 docs/CONFIGURATION.md (+2 -2)
📝 docs/REMOTE_ACCESS.md (+1 -1)

📄 Description

Linked issue

Closes #732

Why this change

REQUIRE_AUTH_FOR_DOCKER_PROXY (added in #724) is internally keyed on isDockerIp(request.ip) which matches 172.16.0.0/12 only — the same CIDR BYPASS_AUTH_DOCKER covers. On reverse-proxy deployments where the proxy container's IP is in a different RFC 1918 range — Docker Swarm overlays (10.0.0.0/8), Kubernetes pod networks, docker-compose with custom IPAM — the flag is a no-op because isDockerProxyForwardedRequest returns false for those source IPs.

The current docs describe the flag in terms of "Docker reverse proxy or tunnel container" without naming the underlying CIDR, so operators on the affected setups may believe the flag protects them when it doesn't.

This PR is docs-only. It clarifies the scope and points operators on other proxy CIDRs at the existing alternatives that actually work for them.

What changed

  • .env.example: expand the REQUIRE_AUTH_FOR_DOCKER_PROXY comment to name 172.16.0.0/12 explicitly and list the alternatives for non-matching proxies.
  • docs/CONFIGURATION.md: update both the env-var table entry and the prose mention in the "Trust Tailscale / Docker bypass" section with the same CIDR clarification and alternative pointers.
  • docs/REMOTE_ACCESS.md: update the prose mention with the same clarification.

No runtime change. REQUIRE_AUTH_FOR_DOCKER_PROXY behaves exactly as #724 shipped it.

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

Manual verification notes

Docs-only change — no runtime behavior is altered.

  • Manually verify the updated CIDR scope language reads cleanly in .env.example, docs/CONFIGURATION.md (both the env-var table and the prose in the Tailscale/Docker bypass section), and docs/REMOTE_ACCESS.md.
  • Manually verify the empirical scope claim by reading isDockerProxyForwardedRequest in packages/server/src/middleware/ip-allowlist.ts and isDockerIp (matches 172.16.0.0/12) — the docs' new CIDR matches the runtime check.

The original finding was reproduced on an EasyPanel Swarm deployment where the reverse-proxy IP presented as 10.11.0.4 to the Marinara container — REQUIRE_AUTH_FOR_DOCKER_PROXY=true did not change request handling, while ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=false (the alternative the new docs point at) did gate proxy-forwarded traffic correctly.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Updated: .env.example, docs/CONFIGURATION.md, docs/REMOTE_ACCESS.md. No CHANGELOG entry — this is a documentation clarification, not a behavior change.

UI evidence (if applicable)

No UI changes.


🔄 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/733 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 5/12/2026 **Status:** ✅ Merged **Merged:** 5/12/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `main` ← **Head:** `fix/document-proxy-auth-network-scope` --- ### 📝 Commits (1) - [`cd78658`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd78658bf0f2c6bf5a07de5b1fc103eb115c45bd) docs(auth): clarify REQUIRE_AUTH_FOR_DOCKER_PROXY scope is 172.16/12 only ### 📊 Changes **3 files changed** (+15 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+12 -4) 📝 `docs/CONFIGURATION.md` (+2 -2) 📝 `docs/REMOTE_ACCESS.md` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #732 ## Why this change `REQUIRE_AUTH_FOR_DOCKER_PROXY` (added in #724) is internally keyed on `isDockerIp(request.ip)` which matches **172.16.0.0/12 only** — the same CIDR `BYPASS_AUTH_DOCKER` covers. On reverse-proxy deployments where the proxy container's IP is in a different RFC 1918 range — Docker Swarm overlays (10.0.0.0/8), Kubernetes pod networks, docker-compose with custom IPAM — the flag is a no-op because `isDockerProxyForwardedRequest` returns `false` for those source IPs. The current docs describe the flag in terms of "Docker reverse proxy or tunnel container" without naming the underlying CIDR, so operators on the affected setups may believe the flag protects them when it doesn't. This PR is docs-only. It clarifies the scope and points operators on other proxy CIDRs at the existing alternatives that actually work for them. ## What changed - `.env.example`: expand the `REQUIRE_AUTH_FOR_DOCKER_PROXY` comment to name `172.16.0.0/12` explicitly and list the alternatives for non-matching proxies. - `docs/CONFIGURATION.md`: update both the env-var table entry and the prose mention in the "Trust Tailscale / Docker bypass" section with the same CIDR clarification and alternative pointers. - `docs/REMOTE_ACCESS.md`: update the prose mention with the same clarification. No runtime change. `REQUIRE_AUTH_FOR_DOCKER_PROXY` behaves exactly as #724 shipped it. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Docs-only change — no runtime behavior is altered. - Manually verify the updated CIDR scope language reads cleanly in `.env.example`, `docs/CONFIGURATION.md` (both the env-var table and the prose in the Tailscale/Docker bypass section), and `docs/REMOTE_ACCESS.md`. - Manually verify the empirical scope claim by reading `isDockerProxyForwardedRequest` in `packages/server/src/middleware/ip-allowlist.ts` and `isDockerIp` (matches `172.16.0.0/12`) — the docs' new CIDR matches the runtime check. The original finding was reproduced on an EasyPanel Swarm deployment where the reverse-proxy IP presented as `10.11.0.4` to the Marinara container — `REQUIRE_AUTH_FOR_DOCKER_PROXY=true` did not change request handling, while `ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=false` (the alternative the new docs point at) did gate proxy-forwarded traffic correctly. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Updated: `.env.example`, `docs/CONFIGURATION.md`, `docs/REMOTE_ACCESS.md`. No CHANGELOG entry — this is a documentation clarification, not a behavior change. ## UI evidence (if applicable) No UI changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10: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#4753
No description provided.