Skip to content

feat(apps): restrict app-owned upstream targets before manage-owned becomes approvable #660

Backlog

Description

@RentnerKev

Context

Docker Discovery as an app (#627) needs proxy.hosts.manage-owned. Today the capability is not approvable (core/src/app_install/grants.rs:37-43), so nothing below is reachable by apps yet. These checks have to land before it is.

Problem

  • Upstream validation is syntax only. normalizeForwardHost (web/src/lib/Admin/ProxyHostManagement/proxyHostValidation.ts:29-46), the app contract (web/src/server/AppRuntime/contract.ts:119) and is_valid_forward_host (core/src/proxy/mod.rs:566-579) accept loopback, link-local and unspecified addresses on any port.
  • For admins this is intended: the manual proxy host form uses the same validator. App upserts reuse it too (web/src/server/AppRuntime/hosts.server.ts:298, :306-310), so an app with manage-owned could publish a route to services that only listen inside the appliance container.
  • App upstream probes block link-local but not loopback (core/src/runtime/domain_diagnostics/upstream.rs:11-42).
  • Operation receipts are keyed by (installationId, keyHash) (web/src/db/Schema/appRuntimeOperations.ts:85). The payload hash includes the actor, so no data crosses users, but one app reusing a key across users gets 409 conflicts. Messages and incidents already scope by actor.

Proposal

  • For app-owned hosts, reject loopback, link-local, unspecified and container-internal targets (including the appliance's own listener ports). Admin-created hosts keep today's behaviour.
  • Apply the same policy to Class::App upstream probes.
  • Add the actor to the operation receipt key.

Acceptance

  • Tests: app-owned upserts with 127.0.0.1, ::1, localhost, 169.254.169.254 and 0.0.0.0 are refused; the same values still work for admins.
  • Test: two users with the same app key get independent receipts.

Found in the app platform audit of 2026-11-30.

Activity

  1. added
    enhancement
    security
    area: proxy
    area: runtime
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: proxyarea: runtimeenhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions