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
86 lines
3.0 KiB
TOML
86 lines
3.0 KiB
TOML
[package]
|
|
name = "compliance-dashboard"
|
|
version = "0.4.4"
|
|
edition = "2021"
|
|
default-run = "compliance-dashboard"
|
|
|
|
[[bin]]
|
|
name = "compliance-dashboard"
|
|
path = "../bin/main.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
web = ["dioxus/web", "dioxus/router", "dioxus/fullstack", "dep:web-sys", "dep:js-sys", "dep:wasm-bindgen", "dep:wasm-bindgen-futures", "dep:gloo-timers"]
|
|
server = [
|
|
"dioxus/server",
|
|
"dioxus/router",
|
|
"dioxus/fullstack",
|
|
"compliance-core/mongodb",
|
|
"compliance-core/telemetry",
|
|
"compliance-core/secrets",
|
|
"dep:axum",
|
|
"dep:mongodb",
|
|
"dep:reqwest",
|
|
"dep:tower-http",
|
|
"dep:secrecy",
|
|
"dep:dotenvy",
|
|
"dep:dioxus-cli-config",
|
|
"dep:dioxus-fullstack",
|
|
"dep:tokio",
|
|
"dep:tower-sessions",
|
|
"dep:time",
|
|
"dep:rand",
|
|
"dep:url",
|
|
"dep:sha2",
|
|
"dep:base64",
|
|
"dep:uuid",
|
|
"dep:bson",
|
|
"dep:hex",
|
|
"dep:async-trait",
|
|
]
|
|
|
|
[dependencies]
|
|
compliance-core = { workspace = true, default-features = false }
|
|
dioxus = "=0.7.3"
|
|
dioxus-free-icons = { version = "0.10", features = ["bootstrap"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
chrono = { workspace = true }
|
|
tracing = { workspace = true }
|
|
dioxus-logger = "0.6"
|
|
thiserror = { workspace = true }
|
|
# Renders the help assistant's markdown answers; no raw HTML passes through.
|
|
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
|
|
|
|
# Web-only
|
|
reqwest = { workspace = true, optional = true }
|
|
web-sys = { version = "0.3", optional = true, features = ["Blob", "BlobPropertyBag", "HtmlAnchorElement", "Url", "Document", "Element", "Window", "Storage", "MediaQueryList", "Location", "Request", "RequestInit", "Response", "Headers"] }
|
|
js-sys = { version = "0.3", optional = true }
|
|
wasm-bindgen = { version = "0.2", optional = true }
|
|
# Awaiting the browser's fetch for downloads that must report failures.
|
|
wasm-bindgen-futures = { version = "0.4", optional = true }
|
|
gloo-timers = { version = "0.3", features = ["futures"], optional = true }
|
|
|
|
# Server-only
|
|
axum = { version = "0.8", optional = true }
|
|
mongodb = { workspace = true, optional = true }
|
|
tower-http = { version = "0.6", features = ["cors", "trace", "set-header"], optional = true }
|
|
secrecy = { workspace = true, optional = true }
|
|
dotenvy = { version = "0.15", optional = true }
|
|
tokio = { workspace = true, optional = true }
|
|
dioxus-cli-config = { version = "=0.7.3", optional = true }
|
|
dioxus-fullstack = { version = "=0.7.3", optional = true }
|
|
tower-sessions = { version = "0.15", default-features = false, features = ["axum-core", "signed"], optional = true }
|
|
# Session store trait impls (`MongoSessionStore`).
|
|
async-trait = { version = "0.1", optional = true }
|
|
hex = { workspace = true, optional = true }
|
|
time = { version = "0.3", default-features = false, optional = true }
|
|
rand = { version = "0.9", optional = true }
|
|
url = { version = "2", optional = true }
|
|
sha2 = { workspace = true, optional = true }
|
|
base64 = { version = "0.22", optional = true }
|
|
uuid = { workspace = true, optional = true }
|
|
bson = { version = "2", features = ["chrono-0_4"], optional = true }
|