`cargo audit` in CI started failing on every branch: RUSTSEC-2026-0285 was
published on 2026-09-14 against rustls ≤0.23.44 (TLS 1.3 handshake messages
accepted across encryption-level boundaries, medium). rustls is a transitive
dependency through reqwest's rustls-tls, so this is a lockfile-only bump to
the advisory's fixed version, pulling rustls-webpki 0.103.15 with it.
Unrelated to the fail-closed work in this branch — it is here so the branch
can go green and merge.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
The scanner degraded quietly when auth configuration was absent: no Keycloak
meant no JWT check and a synthetic `dev` tenant for every request, an unset
CORS_ALLOWED_ORIGINS meant permissive CORS, no registry meant entitlements
were never checked, and a registry outage sent the scheduler at `<prefix>_dev`
with no ladder filter. Convenient on a laptop, unacceptable anywhere with
customer data.
`APP_ENV` (dev | staging | production) now decides. Everything but `dev` is
hardened:
- `AgentConfig::validate_deployment` runs at load and lists *every* missing
setting at once (KEYCLOAK_URL/REALM/AUDIENCE, CORS_ALLOWED_ORIGINS,
TENANT_REGISTRY_URL + client id/secret, PLATFORM_ALLOWED_CLIENTS), so one
corrected deploy is enough.
- The dev-tenant injector, the permissive-CORS fallback, the skip-entitlement
path and the open platform endpoints are all unreachable when hardened —
each keeps a second check that denies rather than widens access.
- The built-in PLATFORM_ALLOWED_CLIENTS defaults apply in dev only, so a prod
agent never accepts a staging service token.
- The scheduler treats the registry as authoritative: an empty list or a failed
call skips the tick.
- The dashboard refuses to start hardened without its five Keycloak variables
(a partial config silently served every page), and the MCP server refuses
stdio, whose synthetic tenant has no bearer check.
- The JWKS fetch gets a 5 s timeout; it holds the cache write lock, so an
unreachable Keycloak used to queue every authenticated request behind it.
`AgentConfig` gains a `Default` impl with the loader's dev defaults, which the
two test constructors now use instead of listing 45 fields.
First issue of the MVP-0 safety baseline; part of #253.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p