Skip to content

[awf] agent: Azure CLI and ADO authentication not available inside sandbox #6686

Description

@lpcox

Problem

Azure CLI, Azure DevOps CLI, and Azure/ADO MCP servers are not usable inside the AWF agent sandbox even when OIDC login is completed in runner setup steps and relevant Azure/Microsoft domains are in the allowlist. The Azure CLI config directory (~/.azure) lands in the unwritable /home/runner path; ADO_MCP_AUTH_TOKEN is present but the MCP bridge cannot authenticate.

Context

Reported in github/gh-aw#47768. The user successfully worked around this with a re-login inside the agent using az login --federated-token and a fresh writable AZURE_CONFIG_DIR. Root cause spans both the bind-mount home restrictions and credential propagation into the sandbox.

Root Cause

Two related issues:

  1. Bind-mount restrictions: The agent container only whitelists specific $HOME subdirs (.cache, .config, .local, .anthropic, .copilot, etc.). .azure is not whitelisted, so the Azure CLI config written in the runner is invisible inside the sandbox.
  2. Token propagation: OIDC tokens and ADO_MCP_AUTH_TOKEN are not automatically forwarded into the agent environment when --enable-api-proxy is active.

Proposed Solution

  1. Add .azure to the whitelisted $HOME subdirectories in containers/agent/entrypoint.sh and src/docker-manager.ts (agent volume spec).
  2. Document the pattern for re-issuing OIDC tokens inside the agent, or add an azure preset to the API proxy sidecar to inject Azure credentials similarly to how Anthropic/OpenAI keys are handled.

Generated by Firewall Issue Dispatcher · sonnet46 · 32.7 AIC · ⊞ 6.4K ·

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions