Skip to content

feat(server): add runtime auth and namespace scoping#214

Open
abhinav-galileo wants to merge 5 commits intoabhi/controls-auth-frameworkfrom
abhi/runtime-auth-namespace-cutover
Open

feat(server): add runtime auth and namespace scoping#214
abhinav-galileo wants to merge 5 commits intoabhi/controls-auth-frameworkfrom
abhi/runtime-auth-namespace-cutover

Conversation

@abhinav-galileo
Copy link
Copy Markdown
Collaborator

@abhinav-galileo abhinav-galileo commented May 7, 2026

Summary

  • Add explicit runtime auth modes: none, api_key, and jwt.
  • Scope controls, bindings, policies, agents, and evaluation by the authenticated principal namespace.
  • Authorize runtime token exchange and runtime evaluation with target context.
  • Add configurable extra forwarded headers for HTTP upstream auth.

Stack

Testing

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 95.75758% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../src/agent_control_server/auth_framework/config.py 93.22% 4 Missing ⚠️
...r/src/agent_control_server/endpoints/evaluation.py 72.72% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@abhinav-galileo abhinav-galileo force-pushed the abhi/runtime-auth-namespace-cutover branch from 09cb289 to 19fa65c Compare May 7, 2026 18:24
@abhinav-galileo abhinav-galileo changed the title feat(server): add runtime auth namespace cutover feat(server): add runtime auth and namespace scoping May 8, 2026
@abhinav-galileo abhinav-galileo force-pushed the abhi/controls-auth-framework branch from ad586bb to 3a5b7e4 Compare May 8, 2026 15:28
@abhinav-galileo abhinav-galileo force-pushed the abhi/runtime-auth-namespace-cutover branch from 259397b to 097b42d Compare May 8, 2026 15:28
Add explicit none, api_key, and jwt runtime auth modes, including a generic no-auth provider.

Move controls, bindings, policies, agents, and evaluation storage lookups onto principal namespace scoping.

Cover auth mode selection and principal namespace isolation with server tests.
…stream

The default forward set (X-API-Key, Authorization, Cookie) only covers
credential headers Agent Control itself reads. Deployments whose
upstream authenticates against a different header name (e.g., a
deployer-specific API-key header) had no way to surface that
credential through HttpUpstreamAuthProvider — the inbound header
reached AC but never crossed the upstream call.

Add an extra_forward_headers config field on HttpUpstreamConfig
(defaulting to the empty tuple) that operators populate via the new
AGENT_CONTROL_AUTH_UPSTREAM_EXTRA_FORWARD_HEADERS env var (comma-
separated). The provider's _forward_headers iterates over the union
of the default set and the extras, deduplicating case-insensitively
so a duplicate name (cross-set or within extras) does not produce two
copies on the wire.

Tests:
- forwards a configured extra header alongside defaults
- default forward set unchanged when extras are empty
- extras dedupe against defaults case-insensitively
- _parse_extra_forward_headers parametric: None / empty / single /
  multiple / whitespace / empty-entries / case-folded duplicates
- configure_auth_from_env threads the parsed tuple onto the provider

Lint clean, typecheck clean, full server suite (747) green.
@abhinav-galileo abhinav-galileo force-pushed the abhi/runtime-auth-namespace-cutover branch from af54543 to 479ca86 Compare May 8, 2026 16:57
@abhinav-galileo abhinav-galileo marked this pull request as ready for review May 8, 2026 18:36
Sign up for free to 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.

1 participant