Repository navigation
atomic-proxy: URLs for plugins, resolved to the delegated connection on the configured proxy (#1700, answer 4) - #1725
michielbdejong wants to merge 2 commits into
Conversation
…red proxy (#1700) Answer 4 of #1700. A manifest declares proxy: ["clockify"] and operations on atomic-proxy:/clockify/... URLs. The host resolves a ctx.http request to atomic-proxy:/clockify/<path>?<query> as {--integration-proxy-url}/proxy/{connection_id}/clockify/<path>?<query> (integration-proxy's route), with the connection from the Installation's integrationConnections, then signs it as in #1702. It refuses an undeclared platform, a platform with no delegated connection, a node with no proxy configured, no matching operation, and dot segments. Absolute proxy URLs keep working and log a deprecation warning. The browser manifest validator mirrors the rules, and shared fixtures check both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pre-commit hook's oxlint padding rule was skipped when this branch was committed with --no-verify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge-risk triage (2026-09-28). This is a read-only review of this PR's own diff. The rule it applies: nothing that works today may break for existing users or clients, and new behaviour is added alongside the old. The stack is being rebased onto Verdict: SAFE
🤖 Generated with Claude Code |
|
Closing as part of the plugin-host stack cleanup (Q-101): not needed by atomic-plugins now. See the inventory at #1726 (comment). The branch is kept, and pin candidates are unaffected. Closed by Claude (VPS coordinator) on behalf of Michiel. |
Answer 4 of #1700. Stacked on #1710, which adds the Installation's
integrationConnections.What changes
proxy: ["clockify"], accepted in schema versions 1 and 2. Platforms must be unique identifiers of[A-Za-z0-9_-]. Operations may name proxy-relative URLs such asatomic-proxy:/clockify/api/v1/user, but only for a declared platform. As with other operation URLs, they can't carry a query.proxyisn't serialized, so existing release ids don't change.validateManifest, plus the newparseProxyRelative) follows the same rules, and the shared fixtures intestdata/plugin-manifest/check both sides.HostCore::fetch):ctx.httprequest toatomic-proxy:/<platform>/<path>?<query>resolves to{--integration-proxy-url}/proxy/{connection_id}/<platform>/<path>?<query>. That is integration-proxy's/proxy/:connection_id/:platform/*pathroute (atomic-plugins#122,integration-proxy/src/lib.rs).connection_idcomes from the Installation'sintegrationConnections[platform], and must be a path-safe id.Manifest::allows_proxy_effect), matching id, method, effect, platform and path, with{number}/{uuid}placeholders as usual.proxy;%2e),%2f, a backslash, a fragment, or an empty path.A deviation to confirm
The coordinator's description only says the platform must be declared. This PR also requires a declared operation on the
atomic-proxy:URL. It's the same rule every otherctx.httprequest follows: a preview fetch needs a declared read operation, and writes go through approved intents. Without it, declaringproxywould let a plugin make any request, including writes, through that connection. Soproxyis what an operation needs before it can name that platform. Ifproxyalone should be enough, the change is one match arm inauthorize.Tests (written first)
shared_manifest_conformanceandplugin-manifest.test.ts):manifest::proxy_relative_tests: parsing, and 11 malformed forms.host_core:a_proxy_relative_request_reaches_the_delegated_connection_signed: a one-shot loopback proxy receivesGET /proxy/conn-1/clockify/api/v1/user?page=2, signed v2 by the node's agent over the resolved URL; a forgedx-atomic-agentis dropped;a_proxy_relative_request_is_refused_without_what_it_needs: undeclared, undelegated, unconfigured, no operation, and traversal cases.cargo test -p atomic-server --lib: 286 passed;browser/libvitest: 972 passed;No UI changes. The install review screen doesn't list
proxyplatforms yet. That's worth doing when the page-side delegation lands.Docs:
docs/src/plugins/creating-plugins.md(Manifest v2). Refs #1700, ontola/atomic-plugins#54, ontola/atomic-plugins#122.🤖 Generated with Claude Code