[GH-ISSUE #7909] [Feature]: Prevent accidental public access with guided setup and access warnings #4341

Closed
opened 2026-10-22 04:05:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Gunterlie on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7909

Originally assigned to: @Gunterlie on GitHub.

What problem does this solve?

Marinara holds private chats, files, provider connections, and tools that can act on the host. Users need a clear way to keep this data private when they install the app, enable access from another device, or change a reverse proxy or Docker deployment.

The product should prevent accidental unauthenticated access and make unsafe settings visible to the owner. A warning in documentation alone is not sufficient. A public login page is also different from public access to the user's data.

This is a request for preventive product controls. It does not report a verified authentication bypass.

Proposed solution

Build on the existing access controls. Deliver the work in separate, reviewable steps.

1. Make the effective access policy visible

  • Add an owner-only access status in Settings and a startup summary. Show the bind address, whether authentication is configured, active allowlists, trusted-interface bypasses, and unsafe overrides. Never return passwords, tokens, or other secrets.
  • Explain which requests can enter without authentication and why. Use the same policy calculation as the request middleware so the status cannot drift from enforcement.
  • Show a persistent warning when the configuration permits unauthenticated remote access or broad trust. Link to the exact setting and its safer replacement.
  • Distinguish configuration facts from network reachability. Listening on 0.0.0.0 does not prove internet exposure. A private socket address, HTTPS, a domain name, or forwarding headers do not prove that an upstream proxy authenticates visitors. Show unknown external protection as unknown.

2. Guide users through remote access

  • Offer clear setup paths for this device only, a private network such as Tailscale, and authenticated remote access. Explain that every allowed user gets access to a single-user installation.
  • Keep local-only access as the simplest path. Keep Docker's internal listener separate from the host port publication; a container may need a wildcard listener while its published port stays on loopback.
  • Recommend private access for personal installations. For public remote access, guide the owner through authentication and HTTPS. Explain that TLS protects transport but does not restrict who can enter.
  • Show the consequences before an owner enables unauthenticated remote access, broad network trust, or a compatibility bypass. Any acknowledgement must use an existing protected owner/admin path. It must never be available to an unauthenticated visitor or serve as a replacement for authentication.
  • Keep external authentication compatible, but require explicit configuration of the trusted proxy boundary. Do not automatically trust all loopback, Docker, LAN, or forwarded requests as proof of upstream authentication.

3. Preserve safe defaults through installs and updates

  • Review launchers, installers, environment examples, Docker examples, and remote-access instructions together. Make their access defaults consistent where the deployment allows it.
  • Keep remote access denied when authentication or trust configuration is incomplete or invalid. An unsafe override must remain an explicit owner decision.
  • Give existing installations a clear explanation of unsafe settings and a recovery path through local administration. Do not silently overwrite credentials, firewall rules, proxy settings, or deployment files during updates.
  • Add X-Robots-Tag: noindex, nofollow and appropriate page metadata as a secondary measure against indexing. State clearly that crawler directives do not provide access control or remove existing search results.

Acceptance and regression coverage

  • A fresh local installation works without opening unauthenticated remote access.
  • Unauthenticated clients cannot read chats, files, settings, or provider data, and cannot trigger generation or host actions. Verify direct API and streaming/socket paths where applicable, not only the page shell.
  • Tests cover direct public access, IPv4/IPv6, host and container proxies/tunnels, Docker gateway traffic, spoofed forwarding headers, and the documented Tailscale path.
  • Configured Basic Auth and allowlists remain enforced across those deployment paths. Invalid or partial configuration does not broaden access.
  • Unsafe overrides produce an owner-visible warning. A remote visitor cannot dismiss that warning, acknowledge a risk, or change access settings without authorization.
  • Access status matches the effective policy and never claims that an installation is internet-safe from local network information alone.
  • Existing local, private-network, authenticated remote, Android, and PWA flows have upgrade and recovery checks.
  • Setup instructions and localized UI copy explain the same behavior. Include release guidance for existing installations and the required documentation translation follow-up.

Alternatives considered

  • Documentation alone: useful, but users can miss it when they change a deployment later.
  • Search and contact exposed installations: reactive and incomplete; it does not prevent new exposure.
  • Hide the product name or rely on robots.txt: discovery becomes harder, but access remains possible.
  • Add a new account system immediately: first improve the existing Basic Auth, allowlist, and deployment controls. A larger identity system needs a separate design.
  • Automatic external scanning or a central registry of installations: outside this scope. Any future external reachability check should require explicit owner consent and a separate privacy/security design.

Additional context

Existing controls verified in staging at 32499a440f715c08177983c439baf75f4396bb4a:

These references establish the current baseline. They are not a live deployment audit. Keep instance addresses, user data, and any future vulnerability details out of this public planning issue.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Gunterlie on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7909 Originally assigned to: @Gunterlie on GitHub. ## What problem does this solve? Marinara holds private chats, files, provider connections, and tools that can act on the host. Users need a clear way to keep this data private when they install the app, enable access from another device, or change a reverse proxy or Docker deployment. The product should prevent accidental unauthenticated access and make unsafe settings visible to the owner. A warning in documentation alone is not sufficient. A public login page is also different from public access to the user's data. This is a request for preventive product controls. It does not report a verified authentication bypass. ## Proposed solution Build on the existing access controls. Deliver the work in separate, reviewable steps. ### 1. Make the effective access policy visible - Add an owner-only access status in Settings and a startup summary. Show the bind address, whether authentication is configured, active allowlists, trusted-interface bypasses, and unsafe overrides. Never return passwords, tokens, or other secrets. - Explain which requests can enter without authentication and why. Use the same policy calculation as the request middleware so the status cannot drift from enforcement. - Show a persistent warning when the configuration permits unauthenticated remote access or broad trust. Link to the exact setting and its safer replacement. - Distinguish configuration facts from network reachability. Listening on `0.0.0.0` does not prove internet exposure. A private socket address, HTTPS, a domain name, or forwarding headers do not prove that an upstream proxy authenticates visitors. Show unknown external protection as unknown. ### 2. Guide users through remote access - Offer clear setup paths for this device only, a private network such as Tailscale, and authenticated remote access. Explain that every allowed user gets access to a single-user installation. - Keep local-only access as the simplest path. Keep Docker's internal listener separate from the host port publication; a container may need a wildcard listener while its published port stays on loopback. - Recommend private access for personal installations. For public remote access, guide the owner through authentication and HTTPS. Explain that TLS protects transport but does not restrict who can enter. - Show the consequences before an owner enables unauthenticated remote access, broad network trust, or a compatibility bypass. Any acknowledgement must use an existing protected owner/admin path. It must never be available to an unauthenticated visitor or serve as a replacement for authentication. - Keep external authentication compatible, but require explicit configuration of the trusted proxy boundary. Do not automatically trust all loopback, Docker, LAN, or forwarded requests as proof of upstream authentication. ### 3. Preserve safe defaults through installs and updates - Review launchers, installers, environment examples, Docker examples, and remote-access instructions together. Make their access defaults consistent where the deployment allows it. - Keep remote access denied when authentication or trust configuration is incomplete or invalid. An unsafe override must remain an explicit owner decision. - Give existing installations a clear explanation of unsafe settings and a recovery path through local administration. Do not silently overwrite credentials, firewall rules, proxy settings, or deployment files during updates. - Add `X-Robots-Tag: noindex, nofollow` and appropriate page metadata as a secondary measure against indexing. State clearly that crawler directives do not provide access control or remove existing search results. ### Acceptance and regression coverage - [ ] A fresh local installation works without opening unauthenticated remote access. - [ ] Unauthenticated clients cannot read chats, files, settings, or provider data, and cannot trigger generation or host actions. Verify direct API and streaming/socket paths where applicable, not only the page shell. - [ ] Tests cover direct public access, IPv4/IPv6, host and container proxies/tunnels, Docker gateway traffic, spoofed forwarding headers, and the documented Tailscale path. - [ ] Configured Basic Auth and allowlists remain enforced across those deployment paths. Invalid or partial configuration does not broaden access. - [ ] Unsafe overrides produce an owner-visible warning. A remote visitor cannot dismiss that warning, acknowledge a risk, or change access settings without authorization. - [ ] Access status matches the effective policy and never claims that an installation is internet-safe from local network information alone. - [ ] Existing local, private-network, authenticated remote, Android, and PWA flows have upgrade and recovery checks. - [ ] Setup instructions and localized UI copy explain the same behavior. Include release guidance for existing installations and the required documentation translation follow-up. ## Alternatives considered - Documentation alone: useful, but users can miss it when they change a deployment later. - Search and contact exposed installations: reactive and incomplete; it does not prevent new exposure. - Hide the product name or rely on `robots.txt`: discovery becomes harder, but access remains possible. - Add a new account system immediately: first improve the existing Basic Auth, allowlist, and deployment controls. A larger identity system needs a separate design. - Automatic external scanning or a central registry of installations: outside this scope. Any future external reachability check should require explicit owner consent and a separate privacy/security design. ## Additional context Existing controls verified in `staging` at `32499a440f715c08177983c439baf75f4396bb4a`: - [Environment and access controls](https://github.com/Pasta-Devs/Marinara-Engine/blob/32499a440f715c08177983c439baf75f4396bb4a/.env.example): Basic Auth, allowlists, unauthenticated-access flags defaulting to false, and Docker proxy enforcement. - [Docker Compose](https://github.com/Pasta-Devs/Marinara-Engine/blob/32499a440f715c08177983c439baf75f4396bb4a/docker-compose.yml): the published host port already binds to `127.0.0.1`. - [Remote access guide](https://github.com/Pasta-Devs/Marinara-Engine/blob/32499a440f715c08177983c439baf75f4396bb4a/docs/REMOTE_ACCESS.md): existing setup, bypass, proxy, and authentication behavior. These references establish the current baseline. They are not a live deployment audit. Keep instance addresses, user data, and any future vulnerability details out of this public planning issue. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@Gunterlie commented on GitHub (Oct 21, 2026):

@Gunterlie is taking this, with agents. Done: #7920 (same-host proxy Host check), #7924 (noindex, closes #7910 on release), #7927 (translations). Next: a shared access-policy function and a shared top banner, then #7911, #7914 and #7923; #7912 after a short design.

<!-- gh-comment-id:6310507783 --> @Gunterlie commented on GitHub (Oct 21, 2026): @Gunterlie is taking this, with agents. Done: #7920 (same-host proxy Host check), #7924 (noindex, closes #7910 on release), #7927 (translations). Next: a shared access-policy function and a shared top banner, then #7911, #7914 and #7923; #7912 after a short design.
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#4341
No description provided.