Skip to content

Commit 59630d9

Browse files
committed
fix(runtime): the connector connection door's HTTP mount hands the begin leg its body
The begin leg reads the installer's OAuth client from the request body, but the route mounted for /automation/connectors/:name/connection dispatched every verb with no body, so over HTTP a clientSource: 'installer' instance could never be connected. The POST leg now defers its body to the domain, which reads it once the floor has admitted the caller. Claude-Session: https://claude.ai/code/session_01ADHkmSB1MQ9Npyv1kGL3DV Co-authored-by: Claude <noreply@anthropic.com>
1 parent a12d046 commit 59630d9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/runtime/src/dispatcher-plugin.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,11 @@ export function createDispatcherPlugin(config: DispatcherPluginConfig = {}): Plu
17891789
const result = await dispatcher.dispatch(
17901790
verb.toUpperCase(),
17911791
`/automation/connectors/${encodeURIComponent(req.params.name)}/connection`,
1792-
undefined,
1792+
// Only the begin leg reads a body: the OAuth client an
1793+
// administrator entered for an instance declaring
1794+
// `clientSource: 'installer'` (ADR-0143 D2.1). Read once
1795+
// the floor has admitted the caller, never ahead of it.
1796+
verb === 'post' ? deferRequestBody(req) : undefined,
17931797
req.query,
17941798
{ request: req },
17951799
);

0 commit comments

Comments
 (0)