Skip to content

fix(aca): harden agent runner transport security - #426

Merged
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/396-harden-agent-runner
Aug 13, 2026
Merged

fix(aca): harden agent runner transport security#426
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/396-harden-agent-runner

Conversation

@jrob5756

Copy link
Copy Markdown
Collaborator

Summary

Hardens the ACA agent runner's transport surface: opt-in token auth on /execute, an allowlist for inner_provider_settings, an optional base_url allowlist, and loopback-only binding by default.

Closes#396

Jason Robert added 2 commits August 13, 2026 09:07
Add opt-in transport-token auth gate on the ACA runner's /execute
endpoint (X-Conductor-Runner-Token), narrow inner_provider_settings to
an explicit allowlist, add an optional base_url allowlist, and default
the runner to bind loopback only. Health endpoint reports auth status
without requiring auth itself.
Blocking:
- A non-string inner_provider_settings.base_url crashed
check_inner_provider_settings with an unhandled AttributeError,
returning a retryable 500 instead of a clean 400. Add an explicit
type check (unconditional, not gated behind the allowlist) and
correct the _unwrap docstring's false assumption that base_url
always arrives as a str.
- execute_endpoint's docstring falsely claimed the token gate runs
"before any request parsing" — FastAPI validates the request body
before the handler runs. Reworded to state the actual contract: the
gate protects execution, not the parser, and a malformed body from
an unauthenticated caller still gets FastAPI's 422.
Recommendations applied:
- R1: moved RUNNER_TOKEN_HEADER to providers/aca_protocol.py (a
genuine leaf both sides already import), removing providers/aca.py's
import of conductor.aca_runner.auth — that import pulled FastAPI,
Starlette and the Copilot SDK onto every host process (822 -> 1054
modules) and created a latent import cycle. auth.py now re-exports
the constant for backward compatibility.
- R8 (partial): corrected "401/400" -> "400" for the allowlist
rejection (it's always 400) in three docstrings, and fixed the
/interrupt-endpoint description in providers/aca.py and the
"/execute is chosen over Authorization" sentence in AGENTS.md (the
intended subject was the header name, not the endpoint).
Added regression tests for both blockers (non-string base_url with an
allowlist configured -> 400 not 500; malformed body + no token ->
422 not 401).
Skipped recommendations R2-R7, R9-R13: real and well-argued, but each
grows the diff (new ProviderError raises changing startup behavior,
new logging, restructured tests, a new shared type/dataclass) beyond
what a review-response pass should carry without its own review.
@jrob5756
Jason Robert (jrob5756) marked this pull request as ready for review August 13, 2026 13:30
@jrob5756
Jason Robert (jrob5756) merged commit d9299a9 into mainAug 13, 2026
10 of 11 checks passed
@jrob5756
Jason Robert (jrob5756) deleted the fix/396-harden-agent-runner branch August 13, 2026 13:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden conductor-agent-runner: don't depend solely on network isolation

1 participant

@jrob5756