Portal Modules and Role Access

For an auditor or UAT facilitator checking which screens a role can open and what it can do there: this page lists the modules of canopy-web (worker portal) and canopy-portal (applicant portal) with the gate that enforces each row. Endpoint admissions are in RBAC Matrix; the role inventories — the role vocabulary, the clients and the worker portal’s WorkerRole set — are defined in its first section. The columns below are the WorkerRole arms.

Stack

canopy-web is a server-rendered Askama + htmx + Alpine.js BFF (services/canopy-web/templates/base.html loads alpine-csp.min.js; the fragments swap with hx-*). Every route in api::routes(), the Studio wizard, the security-administration pages and device approval sits behind middleware::require_auth and the CSRF layer (services/canopy-web/src/main.rs); a module’s POST actions take the WritePermission extractor, which is WorkerRole::can_write (services/canopy-web/src/session.rs). canopy-portal is a Dioxus 0.7 fullstack app on container port 8090 (CANOPY_PORTAL__PORT), Postgres-free, whose applicant sessions are opaque Redis tokens minted by POST /lookup/submit (services/canopy-portal/src/lookup.rs; session.rs SessionStore) per ADR-008 / ADR-026.

Worker portal (canopy-web)

View = the page renders for the role; Write = the module’s POST actions (WritePermission); — = 403 or not rendered. Every read is additionally filtered by the worker’s program scope (READ_SCOPE_POLICY, xtask/src/cmd/route_authz.rs; ADR-044).

Module (routes) Caseworker Eligibility Specialist Supervisor Analyst Auditor Studio Admin Admin Gate

Dashboard (/, /dashboard/panel/{slug}, /dashboard/customize)

View

View

View (supervisor surface)

View (analyst surface)

redirected to /audit-log

View (worker surface)

View

surface_for_role and the Auditor redirect in api/dashboard.rs; per-panel roles pinned by the PANEL_SCOPE_POLICY census in the dashboard/panels/mod.rs tests

Case search, command palette (/cases, /cases/search, /command-palette/search)

View

View

View

View

View

View

View

require_auth; each candidate household passes the program-participation check before its row is built

Case detail (/cases/{household_id}, its tabs and fact history)

View + Write

View + Write

View + Write

View

View

View

View + Write

participation gate on the household; an unassigned household’s reads pass for the supervisor class (assignment_view_gate, api/participation.rs)

Intake and applications (/applications, /applications/{id}/intake/{program}, /cases/{household_id}/file-application)

View + Write

View + Write

View + Write

View

View

View

View + Write

WritePermission on actions_intake.rs (file_application) and the section writes

Determination (/applications/{id}/run-determination, Approve / Deny)

Run + Approve / Deny

same + operator-only actions

same + operator-only actions

View

View

View

Run + Approve / Deny + operator-only actions

WritePermission; operator-only = is_determination_operator (actions_snap_adverse_action.rs) — the SNAP advance-notice exemption

Verifications and documents (request, accept / reject, IEVS accept / reject, scan override)

Write

Write

Write + release quarantined

View

View

View

Write + release quarantined

WritePermission; /actions/documents/scan-override additionally requires Supervisor | Admin (actions.rs (scan_override_document))

Authorized representatives (designate, disqualify, cancel)

designate

designate

designate + disqualify / cancel

View

View

View

designate + disqualify / cancel

WritePermission; disqualify / cancel = is_supervisor_class (representatives_shared.rs, representatives.rs)

Notices (/notices, /notices/{id}/pdf)

View

View

View

View

View

View

View

the PDF is authorized by its owning case (actions.rs (download_notice_pdf)), not by possession of the id

Appeals (/appeals; file, record decision)

View + Write

View + Write

View + Write

View

View

View

View + Write

WritePermission (actions_snap_appeal.rs, actions_snap_appeal_decision.rs)

Renewals (/renewals, /renewals/list; renewal actions)

View + Write

View + Write

View + Write

View

View

View

View + Write

WritePermission; the writes ride actions.rs (renewals_write_client)

Team queue (/team-queue)

—

—

View

—

—

—

View

Supervisor | Admin match in api/team_queue.rs

Ops pages (/ops/day30-shadow, /ops/scheduler)

—

—

View + trigger

—

—

—

View + trigger

is_day30_operator / is_scheduler_operator = Supervisor | Admin (api/ops_day30.rs, api/ops_scheduler.rs)

Quarantined determinations worklist (/ops/quarantined-determinations, its resolve)

—

View + resolve

View + resolve

—

—

—

View + resolve

is_determination_operator (api/ops_quarantine.rs); the resolve adds WritePermission and an all-of proof on the envelope’s program (#2061)

Audit log (/audit-log, /audit-log/export.csv, the citation PDF)

—

—

—

—

View + Export + Cite

View + Export + Cite

View + Export + Cite

Admin | StudioAdmin | Auditor match in each of the three audit-log handlers (api/audit_log.rs and the modules under api/audit_log/)

Studio (/studio, /studio/onboarding*)

—

—

—

—

—

Full

Full

StudioAdminOnly (studio/extractor.rs) = Admin | StudioAdmin

Security administration (/admin/security*: subjects, links, suspensions, sessions, signing keys, clients)

with security_admin

with security_admin

with security_admin

with security_admin

with security_admin

with security_admin

with security_admin

admin_security::SecurityAdminOnly reads the session’s security_admin role, whatever its WorkerRole; a write canopy-security answers insufficient_user_authentication sends the worker through /auth/step-up and back (admin_security.rs)

Device approval (/device, /device/sessions)

View + approve

View + approve

View + approve

View + approve

View + approve

View + approve

View + approve

device::ApproverSession, any admitted session; a worker revokes only their own devices (device.rs)

  • No worker role signs a determination: the program service’s key does (ADR-002).

  • Analyst is the portal’s QC persona: quality_control has no WorkerRole arm, so qc.reviewer (quality_control + analyst) resolves to Analyst, and jane.qc carries analyst alone.

  • A session holding only security_admin resolves to WorkerRole::SecurityAdmin, the lowest recognized arm: it writes no case data, and its dashboard redirects to /admin/security (api/dashboard.rs). A worker holding a case role and security_admin keeps the case role’s surface and gains the "Security administration" link.

  • A session whose roles match no arm is Unprivileged and sign-in is refused (WorkerRole::from_roles).

  • Accounts and roles are provisioned at the upstream identity provider (IdP Integration); security administration manages canopy-identity’s subjects, links, suspensions, sessions, keys and clients, not accounts or roles.

  • Supervisor verbs that do not exist in canopy-web — federal report generation (FNS-388, QC universe), case reassignment, IPV and disqualification approvals, the TANF personal-responsibility actions — are listed in Capabilities Not Yet in the Portal.

Applicant portal (canopy-portal)

The screens are the Route enum in services/canopy-portal/src/routes.rs. A server-side request to an authed path without a valid Redis session is redirected to /lookup (AUTHED_PATHS and its middleware in services/canopy-portal/src/lookup.rs), and every data proxy behind an authed screen reads the application id from the session, never from the client (services/canopy-portal/src/main.rs, the session_ops router).

Screen (route) Applicant can Gate

Welcome, Apply, Submitted (/, /apply, /submitted)

start an application, autosave each step client-encrypted, finalize and receive the HH-… code and passcode

public (PublicLayout); the /apply/* proxies are rate-limited (ratelimit::rate_limit_mw)

Lookup, Recover (/lookup, /recover, /recover/kill/{token})

sign in with code + passcode; recover access or kill a session from the emailed link

public; POST /lookup/submit verifies against canopy-applications POST /v1/applicants/verify-credential and mints the session; a kill-switch token that is not unpadded base64url is the unknown-token 404 before the upstream path is built (recover::is_kill_token, #2539)

Safety (/safety)

read the safety guidance without signing in

public

Accessibility statement (/accessibility)

read the accessibility statement and the barrier-report number without signing in

public

Home (/home)

see the case-state hero and the open-verification count

session (/home/state, /shell/persona)

Letters (/letters)

list notices, open a PDF, mark it read

session-owned household (notices.rs); the notice id is a typed path id, a malformed one 400 (#2539)

Documents (/documents)

list and upload documents for the pending request

session-owned application (documents.rs); upload body limit 11 MiB

Verifications (/verifications)

respond to an open verification

session-owned application (verifications.rs); the verification id is a typed path id, a malformed one 400 (#2539)

Help (/help)

read help content

session (AUTHED_PATHS)

Any other path

NotFound

—

An applicant holds no role and no canopy-identity token. Outbound, the portal calls each service with its own canopy-identity system token for that service (canopy_auth::PortalSender), carrying every portal:* scope of its purpose, which the route’s portal arm checks, plus the signed X-Canopy-Applicant ownership claim on resource-keyed calls (services/canopy-portal/src/ownership.rs; canopy_auth::APPLICANT_HEADER), which the receiver verifies fail-closed and the route’s ownership check binds to the resource. There is no renewals or appeals screen.

Cross-references

Edit this page · default