You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(apps): restrict app-owned upstream targets before manage-owned becomes approvable #660
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.
Activity