Skip to content

fix(foundry): prepare toolbox access before deployment - #10736

Closed
Travis Angevine (trangevi) wants to merge 1 commit into
mainfrom
trangevi/foundry-toolbox-deployment
Closed

Travis Angevine (trangevi) wants to merge 1 commit into
mainfrom
trangevi/foundry-toolbox-deployment

Conversation

@trangevi

Copy link
Copy Markdown
Member

Why

Toolbox deployment can run before an agent's predeploy hook grants the developer Foundry data-plane access. Subscription Owner or Contributor alone is not sufficient, and standalone toolbox writes never reach that hook.

Fixes: #10718

Approach

  • Prepare access before managed toolbox deployment and standalone write operations, after local validation but before remote connection resolution or mutation.
  • Share access policy and environment, project-scope, tenant, and credential helpers through core pkg/foundry, used by both agents and toolboxes. Keep only service-specific probes and output/error mapping in the extensions.
  • Probe effective access first, preserving custom or externally managed permissions without requiring role-assignment writes. On a confirmed authorization denial, inspect inherited roles, conditionally assign project-scoped Foundry User, and wait for bounded propagation.
  • Use user-access tenant credentials and resource-tenant principal resolution for guest users and service principals. Unrelated explicit endpoints never borrow the active environment's project scope or tenant.
  • Preserve opt-out precedence, hosted-agent permission checks, and stderr warnings for toolbox JSON output. Provisioning, read/delete operations, local authoring, and bring-your-own endpoint publication do not automatically grant developer roles.

Release sequencing

This draft includes both the core helpers and extension consumers for review. The new core SDK APIs must land and be released first, then the independently published extensions must update their SDK dependencies. Their current v1.37.0 pins do not include these APIs; cross-module validation used an external Go workspace, with no repository-local replacements.

Validation

  • Core Foundry tests, including an independent module run.
  • Full toolbox tests, agents project tests, and agents command short suite.
  • Both extension builds, targeted vet, lint, Go modernization, spelling, and diff checks.
  • Updated and statically validated the Tier 2 2.00-setup-deploy-shared-agent.yaml scenario. No live Azure scenario was run; live verification requires the foundry-extension-scenario-orchestrator and incurs Azure cost.

Share Foundry developer access preparation between agents and toolboxes. Probe effective access before conditional project-scoped grants, wait for propagation, and reuse environment, tenant, and credential helpers without granting roles during provisioning or read/delete operations.

Fixes: #10718

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
23 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@trangevi

Copy link
Copy Markdown
Member Author

Superseded by the requested three-PR draft stack: #10738 (core Foundry helpers), #10739 (targeted toolbox deploy/create fix for #10718), and #10740 (broader write coverage and agent consolidation). Native stack #10741 preserves that bottom-to-top order. The replacement layers include injected access-propagation feedback and retain the probe-first, endpoint-bound access policy. Core release and real extension SDK dependency bumps remain required before publishing consumers. Original branch retained for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension ext-toolboxes azure.ai.toolboxes extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Foundry toolbox deployment can fail before agent predeploy grants developer access

1 participant