Repository navigation
v1.8.1
Security
-
Agent execution roles could read every credential provider in the account (H1-3956464). Both credential-provider statements in an agent's execution role used a bare
.../{oauth2,apikey}credentialprovider/*, so any agent's role could read every credential provider in the account's token vault — other agents' OAuth tokens and API keys — while the workload-identity and Secrets Manager statements immediately around them were already scoped per agent. Both are now scoped toloom-{agent_name}-*, inbuild_base_policy()and in the equivalent policy inshared/iac/role.yaml, where the single statement holding all sevenbedrock-agentcoreactions was split so credential providers could be narrowed without touching workload-identity grants. (#81) -
The local-dev auth bypass is no longer reachable from a deployment. The bypass returns every scope with no authentication, and its precondition — neither Cognito nor an active external IdP configured — is also the state of a fresh deployment that intends to use an external IdP but has not registered it yet. The two remaining gates were all that separated such a deployment from an open admin panel, and neither held alone: the opt-in is a boolean that can be left in a task definition, and the loopback check reads
request.client, which uvicorn derives fromX-Forwarded-ForwheneverFORWARDED_ALLOW_IPSis widened past loopback — a common change behind a load balancer, made to recover real client IPs, and one that looks entirely unrelated to auth. Two defences: the application now refuses to start when the opt-in is set alongside a container-runtime signal (ECS_CONTAINER_METADATA_URI_V4,AWS_EXECUTION_ENV) or aFORWARDED_ALLOW_IPStrusting non-loopback peers; and the bypass is refused for any request carrying a proxy forwarding header, which the spoof cannot work without. (#80)
Tests
- The backend suite no longer depends on the machine it runs on. It was green for months and then 335 of 893 tests failed at once — not from a regression, but because an external IdP had been registered in a developer's local database. Auth's active-IdP lookup resolves through
LOOM_DATABASE_URL, which defaults to theloom.dbbeside the app, and overriding theget_dbdependency does not help: 18 call sites acrossapp/construct a session directly.LOOM_DATABASE_URLnow points at a throwaway file. (#78) - Fixing that exposed what it had been masking: agent-deletion background polling slept 5 to 150 real seconds inside TestClient requests, because FastAPI runs
BackgroundTaskswithin the request and auth had been rejecting those calls first. Sleeps are removed from the polling modules, halving suite runtime. An outbound-network guard now denies hostname resolution and connections so a new test cannot silently add egress. (#78) - The fail-closed auth guards asserted only
status_code == 401, which two different rejection paths produce — so an IdP leaking in would have left them green while the guard they protect was gone. They now assert which 401, and the configured-IdP path has coverage for the first time: an active IdP must take the bypass off the table even when both its preconditions hold. (#80) app/models/evaluation.pywas never registered inapp/models/__init__.py, where every other model is. It worked at runtime only because a router imports it, so importingapp.modelsstandalone raisedInvalidRequestErroron theAgentmapper. (#78)
Dependencies
urllib32.7.0 → 2.8.0 (backend) (#76)brace-expansion5.0.7 → 5.0.12,proxy-addr2.0.7 → 2.0.8,source-map-js1.2.1 → 1.2.2 (frontend) (#73, #74, #75)
Upgrade notes
- This release changes IAM grants for existing agents. Roles built by
build_base_policyare rewritten on agent create/update/redeploy, andshared/iac/role.yamlneeds a stack update. An agent whose credential providers don't follow theloom-{agent_name}-naming convention would lose access — every construction site in the codebase does follow it, but verifying one OAuth-backed agent before rolling out broadly is worthwhile. LOOM_ALLOW_UNAUTHENTICATED_LOCAL_DEVmust not be set in a deployed environment. The backend now refuses to start in that configuration rather than serving unauthenticated requests as super-admin.
Stats
14 files changed, 677 insertions(+), 83 deletions(-)