research: remote agent auth forwarding plan#608
Draft
AndrewBarba wants to merge 2 commits into
Draft
Conversation
Signed-off-by: Andrew Barba <barba@hey.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…eset) Signed-off-by: Andrew Barba <barba@hey.com>
Collaborator
Author
|
Pushed a hardening pass after an end-to-end review of the plan (5431813):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Research plan for forwarding end-user identity across
defineRemoteAgenthops, so a per-user principal (and therefore per-user Vercel Connect) survives a cross-deployment delegation.Closes nothing yet — design doc for #604; implementation PR to follow.
Design at a glance
defineRemoteAgent({ forwardAuth: true })serializes the dispatching turn'sauth.current/auth.initiatorinto a strict-validatedforwardedAuthfield on the create-session body.OutboundAuthFnalso gains anOutboundAuthContextargument so custom schemes can mint per-user credentials at dispatch time.eveChannel({ forwardedAuth: AuthFn | AuthFn[] })gates which transport-authenticated callers may assert a forwarded principal, reusing the existingAuthFn/routeAuthprimitive. Accepted identities become the session principal, so Connect, local subagents, and chained remote hops work unchanged.Notes
pnpm docs:checkpasses.