Repository navigation
[AuthZ: 2/N] Add external agent authorizer - #585
Conversation
|
d652eb9 to
92e4ed3
Compare
95e23a9 to
5c9e9f4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 466aeeb. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
68aa805 to
6277550
Compare

Note
Medium Risk
Adds authorization plumbing and a new ServiceFoundry permissions dependency; behavior is not yet enforced on routes, but mistakes in permission mapping will affect agent access once hooked up.
Overview
Introduces an
Authorizerdependency on the server for agent read vs manage decisions, selected at startup by deployment mode.TrueForgeAuthorizer(standalone/OIDC) treats list as unrestricted and allows manage only when the caller is the agent creator.TrueFoundryAuthorizercalls ServiceFoundryGET v1/authorize/permissions(via newgetAgentPermissionsonTrueFoundryServiceFoundryServerClient) to resolve allowed agent external IDs or per-agent grants (READ_AGENT/MANAGE_AGENT), requiring a bearer token on those checks.main.tsshares one ServiceFoundry client for auth + authorizer in TrueFoundry mode;write-openapi.tssupplies a stand-in authorizer when building the OpenAPI app. The authorizer is onServerDepsbut is not yet wired into agent HTTP handlers in this diff (AuthZ 2/N).Reviewed by Cursor Bugbot for commit 6277550. Bugbot is set up for automated code reviews on this repo. Configure here.