fix(auth): enforce tenant org roles; crates at 0.4.4
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m12s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m12s
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
This commit is contained in:
1 parent
77164c2050
commit
ff267e455c
44 files changed
+1139
-308
No files matched your search
@@ -28,6 +28,18 @@ vulnerabilities; **CRA-Stand je Prüfobjekt** (CRA status by target); and
|
||||
**Als Nächstes** (Next up), the most severe open findings. See
|
||||
[Dashboard Overview](/features/overview).
|
||||
|
||||
## Roles
|
||||
|
||||
What you can do in Prüfwerk depends on your role in the workspace:
|
||||
|
||||
| Role | Prüfwerk |
|
||||
| --- | --- |
|
||||
| `IT_ADMIN`, `USER` | everything: add targets, run scans, triage findings |
|
||||
| `CXO`, `LEGAL` | read only: view and export findings, reports, SBOM, evidence |
|
||||
| `FINANCE`, or none of these | no access |
|
||||
|
||||
Only `IT_ADMIN` can add or import findings by hand.
|
||||
|
||||
## Quick Walkthrough
|
||||
|
||||
### 0. Or start with the demo targets
|
||||
|
||||
@@ -34,6 +34,16 @@ Arbeitsbereich und wählen Sie **Prüfwerk**. Prüfwerk startet mit der
|
||||
Die Oberfläche ist auf Deutsch; über den Sprachschalter wechseln Sie auf
|
||||
Englisch.
|
||||
|
||||
Was Sie in Prüfwerk tun können, hängt von Ihrer Rolle im Arbeitsbereich ab:
|
||||
|
||||
| Rolle | Prüfwerk |
|
||||
| --- | --- |
|
||||
| IT-Administration (`IT_ADMIN`), Benutzer (`USER`) | alles: Prüfobjekte anlegen, prüfen, Befunde bewerten |
|
||||
| Geschäftsführung (`CXO`), Recht (`LEGAL`) | nur lesen: Befunde, Berichte, Stückliste, Nachweise ansehen und exportieren |
|
||||
| Finanzen (`FINANCE`) oder keine dieser Rollen | kein Zugriff |
|
||||
|
||||
Befunde von Hand anlegen oder importieren kann nur die IT-Administration.
|
||||
|
||||
## 2. Ein Prüfobjekt anlegen
|
||||
|
||||
Klicken Sie in der Seitenleiste auf **Neues Prüfobjekt**. Es öffnet sich
|
||||
|
||||
Reference in new issue
Block a user