Skip to content

v1.8.1

Choose a tag to compare

@heeki heeki released this 06 Oct 03:23
· 105 commits to main since this release

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 to loom-{agent_name}-*, in build_base_policy() and in the equivalent policy in shared/iac/role.yaml, where the single statement holding all seven bedrock-agentcore actions 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 from X-Forwarded-For whenever FORWARDED_ALLOW_IPS is 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 a FORWARDED_ALLOW_IPS trusting 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 the loom.db beside the app, and overriding the get_db dependency does not help: 18 call sites across app/ construct a session directly. LOOM_DATABASE_URL now 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 BackgroundTasks within 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.py was never registered in app/models/__init__.py, where every other model is. It worked at runtime only because a router imports it, so importing app.models standalone raised InvalidRequestError on the Agent mapper. (#78)

Dependencies

  • urllib3 2.7.0 → 2.8.0 (backend) (#76)
  • brace-expansion 5.0.7 → 5.0.12, proxy-addr 2.0.7 → 2.0.8, source-map-js 1.2.1 → 1.2.2 (frontend) (#73, #74, #75)

Upgrade notes

  • This release changes IAM grants for existing agents. Roles built by build_base_policy are rewritten on agent create/update/redeploy, and shared/iac/role.yaml needs a stack update. An agent whose credential providers don't follow the loom-{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_DEV must 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(-)