Every member of a tenant could use Prüfwerk fully, whatever their org
role: nothing but manual findings checked org_roles. A FINANCE user
could create and delete targets, start scans and triage findings.
Now, as decided on 30.09.2026:
- IT_ADMIN, USER: read and write.
- CXO, LEGAL: read only. GET/HEAD/OPTIONS plus the POSTs that only
read (OSCAL assess, pentest report export, code chat, help chat).
- FINANCE or no role: no access.
- Agent: one middleware (api::role_gate) right after the JWT one
refuses with 403 {"error":"forbidden_role","access":...}. It is
classified by route template, so ids do not matter. Support sessions
(TenantContext.staff) and requests without a tenant context
(platform service API, Werkbank runner and admin APIs, health) are
unchanged. Manual findings stay IT_ADMIN-only.
- Core: ProductAccess and TenantContext::product_access.
- Dashboard: a role without access sees a "no access" page (DE/EN)
with a link back to the portal, and no server function runs for it.
Read-only roles get a read-only note, and write actions (add target,
scan, edit, delete, triage, tokens, MCP servers, pentest control,
graph/embedding builds, notification dismiss) are hidden. The direct
MCP server functions check the role, and access tokens are withheld
from read-only roles.
- MCP server: unchanged. Its tokens are tenant-bound and carry no
roles, its tools only read, and creating a token now needs write
access.
- Docs: the roles table in Getting Started.
- The crates are at version 0.4.4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
71 lines
2.1 KiB
TOML
71 lines
2.1 KiB
TOML
[package]
|
|
name = "compliance-core"
|
|
version = "0.4.4"
|
|
edition = "2021"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["mongodb"]
|
|
mongodb = ["dep:mongodb"]
|
|
telemetry = [
|
|
"dep:opentelemetry",
|
|
"dep:opentelemetry_sdk",
|
|
"dep:opentelemetry-otlp",
|
|
"dep:opentelemetry-appender-tracing",
|
|
"dep:tracing-opentelemetry",
|
|
"dep:tracing-subscriber",
|
|
"dep:tracing",
|
|
]
|
|
# Pulls in the M7.1 Axum middleware + extractor. Consumers that don't
|
|
# embed an HTTP server (e.g. the wasm dashboard frontend) leave it off.
|
|
# Sealing stored credentials (`secret_box`): the agent's tenant credentials and
|
|
# the dashboard's session records.
|
|
secrets = [
|
|
"dep:aes-gcm",
|
|
"dep:base64",
|
|
"dep:tracing",
|
|
]
|
|
# Connections to tenant-chosen addresses (`guarded_net`): a DNS resolver that
|
|
# only returns guard-approved addresses, and guarded redirects.
|
|
net = [
|
|
"dep:reqwest",
|
|
"dep:tokio",
|
|
]
|
|
axum = [
|
|
"net",
|
|
"dep:axum",
|
|
"dep:jsonwebtoken",
|
|
"dep:tracing",
|
|
]
|
|
|
|
[dependencies]
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
chrono = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
hex = { workspace = true }
|
|
uuid = { workspace = true }
|
|
secrecy = { workspace = true }
|
|
bson = { version = "2", features = ["chrono-0_4"] }
|
|
mongodb = { workspace = true, optional = true }
|
|
opentelemetry = { version = "0.29", optional = true }
|
|
opentelemetry_sdk = { version = "0.29", features = ["rt-tokio"], optional = true }
|
|
opentelemetry-otlp = { version = "0.29", features = ["http", "reqwest-rustls"], optional = true }
|
|
opentelemetry-appender-tracing = { version = "0.29", optional = true }
|
|
tracing-opentelemetry = { version = "0.30", optional = true }
|
|
tracing-subscriber = { workspace = true, optional = true }
|
|
tracing = { workspace = true, optional = true }
|
|
axum = { version = "0.8", optional = true }
|
|
jsonwebtoken = { version = "9", optional = true }
|
|
reqwest = { workspace = true, optional = true }
|
|
tokio = { workspace = true, optional = true }
|
|
aes-gcm = { workspace = true, optional = true }
|
|
base64 = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
# Parse the declarative TOML job specs in the Werkbank contract tests.
|
|
toml = "0.8"
|