[AuthZ: 3/N] enforce external authorizer on agent access - #586
Merged
Conversation
chiragjn
requested review from
bhaveshpatel640,
debajyoti-truefoundry,
heerambavi1998,
sr07asthana and
thesujai
as code owners
September 4, 2026 04:17
🦋 Changeset detectedLatest commit: 509b177 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
chiragjn
force-pushed
the
cj/use-external-authorizer
branch
from
September 4, 2026 04:24
e8b7088 to
85f62c3
Compare
debajyoti-truefoundry
approved these changes
Sep 4, 2026
chiragjn
force-pushed
the
cj/add-external-authorizer
branch
2 times, most recently
from
September 4, 2026 09:15
68aa805 to
6277550
Compare
chiragjn
force-pushed
the
cj/use-external-authorizer
branch
from
September 4, 2026 09:30
372e8b3 to
ee7dd0f
Compare
chiragjn
force-pushed
the
cj/use-external-authorizer
branch
from
September 4, 2026 14:32
bac8fd0 to
fea0c5f
Compare
Gate agent list/get/manage and named-agent session, schedule, and turn use through ExternalAuthorizer so TrueFoundry revocation is not bypassed by created_by. Co-authored-by: Cursor <cursoragent@cursor.com>
chiragjn
force-pushed
the
cj/use-external-authorizer
branch
from
September 4, 2026 16:37
d58e898 to
209650e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 209650e. Configure here.
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.

Note
High Risk
Authorization behavior changes across agents, sessions, schedules, and turns—including 404 vs idempotent delete and schedule status codes—which can break clients and leak less information to unauthorized callers in TrueFoundry mode.
Overview
Enforces the process
Authorizeron agent reads and management across list/get/snippets/update/delete, named-agent session creation, schedule create/run-now, and turn creation when the session references a stored agent. NewagentAccesshelpers filter or hide agents the caller cannot access, returning 404 for both missing and forbidden agents.API contract tweaks: agent delete is no longer documented as idempotent (repeat delete → 404); schedule create returns 404 (not 400) when the named agent is missing or inaccessible; turn/create paths distinguish missing agent (422) vs unauthorized (404).
TrueFoundry / config: renames
TrueForgeMode→TrueForgeAuthMode; limits TrueFoundry ServiceFoundry integration to non-standalone distributed config; per-request model/MCP/agent stores now require a requestContext(schedule manual runs resolve turn deps from the HTTP context for caller tokens). OpenAPI, Fern YAML quote style, SDK clients, and wire tests updated for new 404 responses.Reviewed by Cursor Bugbot for commit 509b177. Bugbot is set up for automated code reviews on this repo. Configure here.