feat(m7.1): wire compliance-agent to compliance-core auth + status gate #85
Reference in New Issue
Block a user
Delete Branch "feat/m7.1-agent-wire"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Supersedes #82.
Deletes the inline JWT middleware in
compliance-agent(now stale — missing JWKS refresh from #84 and tenant extraction from #83) and importsrequire_jwt_auth,require_tenant_status,JwksStatefromcompliance_core::auth. Wires the status gate into the server's layer stack:Adds the integration test from #82, retargeted to
compliance_core::auth::require_tenant_status.Net diff: +134 / -119 (vs #82's +674 / -13 — almost all of #82's content already shipped via #83 and #84).
Why this and not a rebase of #82
#82 was opened 2026-05-20 with the M7.1 stack inlined in
compliance-agent. #83 (2026-06-04) lifted that stack intocompliance-core, and #84 (2026-06-04) added JWKS refresh-on-failure there. Rebasing #82 onto main would have produced massive conflicts and, if accepted as-is, would have regressed JWKS refresh (#82's inlinerequire_jwt_authpredates #84). Replacing it with a thin wiring PR is cleaner.Test plan
cargo fmt --all -- --checkcleancargo clippy --workspace --exclude compliance-dashboard -- -D warningsclean (matches baseline)cargo test -p compliance-core --lib— 7 tests passcargo test -p compliance-agent --lib— 228 tests passcargo test -p compliance-agent --test tenant_status_middleware— 6 tests passscripts/smoke.shagainst livecertifairealm — 15/15 cells pass:Caveats
M7.1 only — status gate + claim extraction. Per-collection scoping (M7.2) is still pending.
compliance_core::db::tenant_filteris available but the ~38 query call-sites incompliance-agentdon't use it yet, so the agent will still serve any Active/Trial tenant's data to any caller. Don't conflate this PR landing with "multi-tenant isolation done."Closes
Closes #82 (superseded).
🤖 Generated with Claude Code