05c01ea547
CI / Check (pull_request) Successful in 10m50s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Lays the platform-wide multi-tenancy infrastructure on top of the existing Keycloak signature validation. JWTs now carry tenant_id, tenant_slug, org_roles, products, plan, and tenant_status; the middleware decodes them into a TenantContext and attaches it to the request extensions. A TenantCtx Axum extractor exposes the context to handlers, and a tenant_status middleware enforces the §5c lifecycle (frozen tenants are 402 on writes; archived tenants are 410 on every method). A db::tenant_filter helper in compliance-core gives every future collection a single grep-able pattern for tenant-scoped queries. Per-collection wiring (adding tenant_id to each model + threading the filter through every find/update/delete call) lands in a follow-up. Tests: 6 inline unit tests for claims→context mapping, 2 for the extractor, 6 integration tests for status middleware, 3 for db filter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57 lines
1.6 KiB
TOML
57 lines
1.6 KiB
TOML
[package]
|
|
name = "compliance-agent"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
compliance-core = { workspace = true, features = ["mongodb", "telemetry"] }
|
|
compliance-graph = { path = "../compliance-graph" }
|
|
compliance-dast = { path = "../compliance-dast" }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
tokio = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
chrono = { workspace = true }
|
|
mongodb = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
hex = { workspace = true }
|
|
uuid = { workspace = true }
|
|
secrecy = { workspace = true }
|
|
regex = { workspace = true }
|
|
axum = "0.8"
|
|
tower-http = { version = "0.6", features = ["cors", "trace", "set-header"] }
|
|
git2 = "0.20"
|
|
octocrab = "0.44"
|
|
tokio-cron-scheduler = "0.13"
|
|
dotenvy = "0.15"
|
|
hmac = "0.12"
|
|
walkdir = "2"
|
|
base64 = "0.22"
|
|
urlencoding = "2"
|
|
futures-util = "0.3"
|
|
jsonwebtoken = "9"
|
|
zip = { workspace = true }
|
|
aes-gcm = { workspace = true }
|
|
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] }
|
|
futures-core = "0.3"
|
|
dashmap = { workspace = true }
|
|
tokio-stream = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
compliance-core = { workspace = true, features = ["mongodb"] }
|
|
reqwest = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
tokio = { workspace = true }
|
|
mongodb = { workspace = true }
|
|
uuid = { workspace = true }
|
|
secrecy = { workspace = true }
|
|
axum = "0.8"
|
|
tower = { version = "0.5", features = ["util"] }
|
|
tower-http = { version = "0.6", features = ["cors"] }
|