Security acceptance matrix (#262)¶
This page is the access matrix for the hosted console and the submission
gateway: which identity may reach which route, the layers that enforce it, and
the test that proves each part. The adversaries and trust boundaries are
described in the “Threat model” section of SECURITY.md; report
vulnerabilities privately as that file describes.
The matrix is not a description of intent. tests/test_security_access_matrix_262.py
calls every registered route directly as each identity, with no page or link
in between. A route that is added without a class fails that test until it is
classified there and here.
Identities¶
Identity |
What it holds |
|---|---|
Anonymous |
Nothing, or a cookie that no longer verifies. |
Password-only |
The right password, but no second factor yet. |
Submitter |
An MFA session and an explicit authority/project/principal binding. |
Viewer |
An MFA session and read grants on exact queue hosts. |
Operator |
An MFA session, read grants and control grants on exact queue hosts. |
Administrator |
An MFA session with the |
A password-only session is treated exactly like an anonymous one: outside the sign-in pages it gets 401. A signup applicant (#257) has no account at all until an administrator approves the request, and then still needs an authenticator, so pending and rejected applicants are anonymous here. Disabled accounts, unknown roles and sessions issued before a grant change do not verify at all.
Console access classes¶
Class |
Who passes |
Routes |
|---|---|---|
Public |
everyone |
|
Credential |
everyone, but the request body must carry a valid credential |
|
Signed in |
any account with an MFA session |
|
Submitter |
submitter accounts only |
|
Reader |
viewers, operators and administrators, limited to granted hosts |
|
Controller |
operators with a control grant on the host, and administrators |
|
Administrator |
administrators only |
|
A refused identity gets 401 if it is not signed in, 403 if it is, and never
any data. The one exception is a submitter opening /fleet, which is sent to
/my. Administrators do not reach /my: a submitter workspace belongs to an
explicit submitter binding, not to a higher role. No route answers any
identity with a server error, other than 503 where a local daemon is
unavailable.
Being let through a class is only the first check. Reader and controller
routes then apply the per-host grants, and submitter routes the gateway’s
ownership checks, so a viewer of one lane still gets 404 for a job on another.
Those checks are proved by the cross-host tests in
tests/test_web_staff_hosts_237.py and the cross-project and cross-owner tests
in tests/test_web_own_jobs_237.py.
Layers¶
The hosted console checks a request in this order:
Hosted guard (
src/vq/web/hosted.py). It requires the canonical HTTPS origin and refuses anyAuthorizationheader. APOST,PUT,PATCHorDELETEmust carry exactly this console’sOrigin; one from another origin, or with noOriginat all, is refused before any handler runs. Outside the public pages it requires a verified MFA session, and it confines submitters to/myand their account pages.Staff dispatch (
src/vq/web/staff_workspace.py). Every verified identity except an administrator or a submitter is served by a separate allowlisted router, so viewers and operators never reach the administrator’s routes at all. This dispatch is deny-by-default: a role it does not name is restricted, not let through.Route checks. Administrator pages call
user_admin.authorize, which requires theadminrole (and recent MFA before account changes). Reader and controller routes apply the host grants. Submitter routes apply the gateway principal binding and ownership.
The administrator-only status of the management host’s own queue and of the fleet-wide views rests on the staff dispatch. Behind it, those routes only check the role thresholds of the local console (viewer to read, operator to control). The matrix test pins this layer, and a unit test proves that a role the dispatch does not recognise gets the restricted router.
Gateway access classes¶
The gateway is a separate service with its own credentials. It never accepts a browser cookie.
Class |
Routes |
Without a valid credential |
|---|---|---|
Public |
|
answered |
Bearer key |
|
401 |
Sign-in flow |
|
refused until an identity provider is configured, then only with a valid flow state |
Connector token |
|
refused |
The matrix test runs these routes in both local and relay modes, with no credential, a bogus key and a forged cookie.
Acceptance coverage¶
#262 acceptance item |
Status |
Evidence |
|---|---|---|
Anonymous, pending, submitter, viewer, operator and administrator access on every direct route |
Covered |
|
Cross-host and cross-lane denial |
Covered |
|
Cross-project and cross-owner denial |
Covered |
|
Cross-partner denial |
Not applicable yet |
Federation (#255) is not implemented. |
Pending and rejected applicants get no access, keys or jobs |
Covered |
An application is not an account; |
CSRF on every unsafe route |
Covered |
the origin test in |
Replay of TOTP codes, sessions and gateway admissions |
Covered |
|
Quotas under concurrent admission |
Covered |
|
Output escaping (XSS) |
Covered per page |
escaping tests in |
SSRF |
By design |
The server fetches only identity-provider URLs that the operator configured, over verified HTTPS with redirects refused ( |
Secret redaction |
Covered |
security checks and the setup overview tests |
Session inventory and revocation |
Covered |
|
Credential rotation |
Covered |
Authenticator key rotation without a sign-in outage and session secret rotation: rotation, |
Backup and restore |
Covered |
|
Audit tamper evidence and retention controls |
Covered |
Hash-linked journal, anchored by backup manifests and by checkpoints signed with an off-host key, and archiving prune: audit integrity, |
Adding a route¶
Decide its class from the table above. If none fits, the route needs a design decision first, not a new exception.
Add it to
CONSOLE(or the gateway classes) intests/test_security_access_matrix_262.py, and to this page.Run that test. It fails until every identity gets the expected answer.