Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Console and workspaces

Binding design for the console at /console, and for the workspaces, members, roles, invitations, sign-in and sessions behind it. It implements FR-CON-1 to FR-CON-7, FR-CON-16, NFR-CON-1, build plan milestone M21, and the edge-case rows W9–W10, W15–W18, W40 and W43 in the edge-case register; and the console parts of agent signing keys (FR-IDN-6, M25), of notifications (FR-CON-14, FR-CON-15, M26; rows O17–O19), of the workspace policy page (FR-TEN-4, Workspace policy) and of the service sign-up ledger (FR-IDN-10, M27, Service sign-up ledger); and the console parts of the parity features of ADR 0017: Drafts § 16, Event feed § 14, Screening hold § 21, Calendar invitations § 13, Deliverability metrics § 9, Agent self-sign-up § 19, SDKs, skills and agent tooling § 15 and Parity additions (webhook headers and identity-scope lists). The plan and usage page and everything about money is in Plans, metering and billing. Self-serve sign-up, Google and GitHub sign-in, two-step verification, the landing rules and the Overview (FR-CON-8 to FR-CON-13) are in Cloud sign-up, sign-in and first run, which extends this design.

Codecrates/worker/src/console/{mod.rs, router.rs, session.rs, signin.rs, csrf.rs, layout.rs, pages/*.rs} (pages/notifications.rs for the settings screen), crates/worker/src/members/{mod.rs, invitations.rs, roles.rs}, handlers/members.rs, crates/worker/src/notify/unsubscribe.rs
TablesD1 users, members, invitations, login_tokens, sessions (Data model); oauth_identities, oauth_states, pending_auth, waitlist (Cloud sign-up §11); notification_prefs (Notifications §2); identity_keys (Agent signing keys §8)
ConfigurationPM_CONSOLE, PM_SIGNUP, PM_NOTIFICATIONS (Configuration); also PM_CONSOLE_HOST and PM_SYSTEM_FROM, which are top-level settings read with the console off; binding RL_SIGNIN (Bindings)
ContractsMembers and invitations endpoints and the members:read and members:manage permissions (REST API); member.* events (Webhook events); 409 owner_required, 402 billing_limit (Errors)
LimitsLimits › Console
External facts verified on 2026-10-09The Fetch Standard’s “append a request Origin header” algorithm (fetch.spec.whatwg.org)

What the console is

The console is for the people who run the agents. Agents keep using the REST API and MCP. The console holds the views a person needs to check on them, and the actions that should need a person: keys, domains, members, quarantine release, draft approval and billing (PRD §4). It is not a webmail client: it has no compose or reply form.

  • Same Worker. fetch routes /console and /console/* to console::router. With PM_CONSOLE=off those routes are not registered and answer 404 with the standard envelope (FR-CON-7), except two pairs that mail links to: the invitation-accept pair (Invitations) and the unsubscribe pair, GET and POST /console/notifications/unsubscribe (Unsubscribe links), so the List-Unsubscribe header of every notification works. The members API, invitation emails and notifications keep working.

  • Its own host, if configured. The console is served on PM_CONSOLE_HOST, which defaults to PM_API_HOST. When the two differ, console paths answer only on the console host and API paths (REST /v1/* with signed links /v1/links/*, MCP /mcp, /openapi.json, /health, /.well-known/*, /hooks/* and /billing/stripe/webhook) only on the API host; anything else gets 404, and no cookie is set or read on the API host (Cloud sign-up §2).

  • Rendered on the server in Rust with maud templates (layout.rs, pages/*.rs). Pages are HTML and one stylesheet, /console/assets/console.css. There is no JavaScript, no web font, and no request to another origin (FR-CON-1). maud is pinned at =0.27.0 in Rust workspace.

  • Forms only. Every state change is a POST from a <form> with a CSRF token (CSRF). A GET never changes state. Lists paginate with links that carry the API’s cursor.

  • Same services as the API. A console handler calls the same internal service functions as the REST handler for that action, with a session principal instead of an API key:

    pub enum Principal {
        Key(ResolvedKey),                                     // REST and MCP
        Session { user_id: String, tenant_id: String, role: Role, permissions: PermissionSet },
    }

    The permissions come from the member’s role (Roles). For every level check a session acts as a tenant-level principal of its workspace (level = tenant, tenant_id the session’s): it may do what a tenant key holding the same permissions may do (tenant search, resume of an abuse pause, tenant-scope erasure, nameservers when policy allows it), and never what needs a platform key. Unlike a key it is a person, so it may take the decisions reserved for people (release, loosening a guard field, approving a service sign-up, approving a draft) whatever PM_QUARANTINE_KEY_RELEASE says (Workspace policy §3). Validation, error codes, idempotency, metering and audit are therefore identical to the API’s.

  • Budget. Server render time p95 ≤ 300 ms (NFR-CON-1). A page makes at most one D1 query for the session, then the same calls the API would make.

Workspaces

A workspace is a tenant (FR-CON-2). Everything in it (identities, domains, keys, webhooks, plan) belongs to that tenant, and its scope always comes from the session, never from a form field (W18).

  • A workspace has exactly one owner and any number of members up to its seat limit. The unique partial index members_one_owner (ON members(tenant_id) WHERE role = 'owner') makes a second owner impossible at the database level.
  • A person (users row) can belong to several workspaces. The session’s tenant_id is the active one; /console/workspaces lists the others and switches with a POST.
  • Workspaces are created by POST /v1/tenants with owner (a platform key), which creates the users row if needed, adds the owner and emails a sign-in link. A self-hosted deployment creates its first owner on the default tenant with idvy setup --owner-email (FR-CON-7). Where PM_SIGNUP is waitlist or open (Pylota Identity Cloud), people also create their own workspace at /console/workspaces/new (Cloud sign-up §6).
  • Test tenants are workspaces too. Their mail goes to the simulator as usual; the console marks them with a “Test” badge.
  • There is no cross-workspace administration view in v1.0. Platform operators use platform keys and the CLI.

Roles

Four roles, with these permissions in the console. The second table lists the API permissions that each role’s session principal holds, so the same checks run as for an API key.

ActionOwnerAdminMemberViewer
Read inboxes, threads, messages and attachments; keyword, semantic and hybrid searchYesYesYesYes
Agentic searchYesYesYesNo
Labels, read state, re-run triage; report on a screening verdictYesYesYesNo
See quarantined mail and release it (sensitive)YesYesYesNo
See the screening summary and the mail being screenedYesYesYesNo
See drafts, their approvals and schedulesYesYesYesNo
Approve a draft (sensitive); reject or cancel oneYesYesNoNo
Create, pause and resume identitiesYesYesNoNo
See an identity’s signing keys and its JWKS linkYesYesYesYes
Create, rotate and revoke an identity’s signing keys (sensitive)YesYesNoNo
See domains, their health and DNS recordsYesYesYesYes
Add, verify and remove domains (add and remove are sensitive)YesYesNoNo
Webhook endpoints: create, edit, rotate the secret, replay; their custom delivery headersYesYesNoNo
See event consumers and streams; delete a consumerYesYesNoNo
See deliverability: pause windows, headroom and event countsYesYesYesYes
API keys: list, create (sensitive), revokeYesYesNoNo
Erasure and legal holds (sensitive): message, thread, counterparty and identity scopeYesYesNoNo
Delete the workspace (tenant-scope erasure, sensitive)YesNoNoNo
See members and pending invitationsYesYesYesYes
Invite, revoke invitations, change roles, remove members (sensitive)YesYes, except anything that touches the ownerNoNo
Transfer ownership to an admin (sensitive)YesNoNoNo
See plan and usageYesYesYesYes
Upgrade, buy top-ups, open the Customer Portal (sensitive)YesNoNoNo
See the audit logYesYesNoNo
See the workspace policyYesYesYesYes
Change the workspace policy (sensitive), within its ceilings (Workspace policy)YesYesNoNo
See service sign-up requests and their decisionsYesYesYesNo
Approve a service sign-up (sensitive); reject, close or delete oneYesYesNoNo
Your own notification settings for this workspaceYesYesYesYes
Leave the workspaceNo: transfer ownership firstYesYesYes
RolePermission set of the session principal
ownerEvery tenant-level permission: identities:read, identities:write, identities:sign, domains:read, domains:write, messages:read, messages:send, messages:write, attachments:read, search:read, search:agentic, quarantine:review, webhooks:read, webhooks:manage, keys:manage, erasure:manage, tenants:erase, suppressions:manage, usage:read, audit:read, members:read, members:manage, policy:write, accounts:request, accounts:approve, drafts:read, drafts:write, drafts:approve, events:read, metrics:read; plus the console-only owner rights: billing, ownership transfer, deleting the workspace, and the workspace settings below
adminThe owner’s tenant-level permissions (identities:sign included) except tenants:erase, without the console-only owner rights. Its erasure:manage covers every scope except tenant, which needs tenants:erase in the console’s tenant-erasure route as in the API, so neither an admin nor a key an admin mints can delete the workspace (W35)
memberidentities:read, domains:read, messages:read, messages:write, attachments:read, search:read, search:agentic, quarantine:review, usage:read, members:read, accounts:request (the console offers it only the accounts list), drafts:read, metrics:read
vieweridentities:read, domains:read, messages:read, attachments:read, search:read, usage:read, members:read, metrics:read

Rules:

  • One owner. The owner cannot leave, be removed, or have their role changed; each attempt returns 409 owner_required (W10). Ownership moves only by a transfer to an existing admin (Members).
  • Admins and the owner. An admin can manage admins, members and viewers, but cannot change the owner or make anyone owner.
  • Keys from the console are tenant-level or identity-level, never partner- or platform-level, and can never hold a permission the session lacks (FR-KEY-1). Owners and admins hold identities:sign, so they can create API keys that sign as an identity; members and viewers cannot. The level rules of Security §4.6 apply as in the API: an identity-level key never carries a tenant-only permission (members:read, members:manage, suppressions:manage, audit:read, usage:read), so the key form does not offer them for that level. Each key minted here records the person and their role (api_keys.created_by_user_id and created_by_role); only the owner’s form offers tenants:erase, on tenant-level keys (Security › Who minted a key).
  • Tenant policy is changed by owners and admins on /console/settings/policy, which calls the same policy::write service as PATCH /v1/tenants/{tenant_id}/policy with the session as a person (Workspace policy §6): free fields, lower-only fields up to their ceilings (the deployment’s, the platform operator’s and, for a partner’s workspace, the partner’s), and the guard fields. Platform-only fields, quarantine.key_release and drafts.key_approval are shown read-only to every role; members and viewers see the whole policy read-only. Each save is a sensitive action, and a change that deletes mail (shorter retention) asks for a second, confirmed POST.
  • Workspace settings (name, time zone, require_two_factor) are console-only owner rights, like billing: the settings form posts to a console handler that checks role = owner and updates exactly those three columns of tenants, with an audit row. It never calls PATCH /v1/tenants/{tenant_id} and never touches the fields that need a key with tenants:manage (status, mode, slug, address_suffix, billing); the policy has its own page, above.
  • Members list. Every role can see members and pending invitations, through GET /v1/tenants/{tenant_id}/members, which needs members:read (included in members:manage).
  • Quarantine release is possible for a signed-in person with the role above. On Pylota Identity Cloud (PM_QUARANTINE_KEY_RELEASE=off) no API key can release, except in a workspace whose policy has quarantine.key_release: true, which only a platform key or the workspace’s partner key can set (so a partner such as Pylota can release from its own review screen); a self-hosted deployment can also allow keys with quarantine:review everywhere (on, its default) (FR-CON-6).
  • Draft approval follows the same rule with its own field: a signed-in owner or admin approves a draft (re-authentication, Drafts § 16). Where people decide, no API key approves, except in a workspace whose policy has drafts.key_approval: true, and there only a platform key or the partner key of the workspace’s own partner, never a tenant key (Drafts § 4.6). quarantine.key_release does not open draft approval, and drafts.key_approval does not open release.
  • Every handler checks the role, through the console’s route table, which registers each route with its required permission exactly like the API’s deny-by-default table (Security). A viewer’s POST to a write route gets 403, and a resource ID from another workspace gets the same 404 as a missing one (W18).

Sign-in

Sign-in is passwordless (FR-CON-3). One request sends one email with both a magic link and a six-digit code; either signs the person in, once.

Two more ways are designed in Cloud sign-up:

  • Continue with Google or GitHub (FR-CON-9), on when the deployment has that provider’s client ID and secret. Only a verified email is accepted, and it links to an existing person with the same address (Cloud sign-up §4).
  • Two-step verification with an authenticator app (FR-CON-10), optional per person and required by a workspace that sets require_two_factor. It is asked for after any first factor, before the session is created (Cloud sign-up §5).

Every method ends in the same session creation (Sessions), and the landing page is chosen by Cloud sign-up §7.

LimitValue
Link or code requests3 per 10 minutes per address
Code verification attempts10 per code; the token is burned after 10 failures
Failed codes per address30 per UTC day across all of the address’s tokens; then sign-in by code is locked for that address until the next UTC day, links keep working, and the person is told once (W43)
Requests per client networkRL_SIGNIN: 10 per 60 seconds, keyed by CF-Connecting-IP (an IPv6 address by its /64 prefix), on POST /console/sign-in, /console/sign-in/link, /console/sign-in/code, /console/sign-in/verify, /console/sign-up and /console/waitlist, and GET /console/oauth/{provider}/start
Two-step verification codes5 attempts a minute per person; 10 failures in a row lock two-step sign-in for 15 minutes
Link and code lifetime10 minutes, single use (using one burns the other)
Session lifetime7 days rolling, 30 days absolute
Re-authentication for sensitive actionsSigned in within the last 10 minutes

POST /console/sign-in with email:

  1. Normalise the address (lower case, IDNA A-label domain) and validate it.
  2. If login_tokens already has 3 rows for this address created in the last 10 minutes, answer the “too many requests, wait 10 minutes” page. The page is the same whether the address is known or not.
  3. Insert a login_tokens row with purpose = 'sign_in': a 32-byte random link token and a six-digit code from the platform RNG (uniform, by rejection sampling), stored only as token_hash and code_hash, keyed hashes under the current link signing key, whose kid goes in key_kid (Keyed hashes), with expires_at = now + 10 minutes. The row is written for every address, known or not, so the limits behave the same.
  4. Answer 200 with the “check your email” page, which holds the code form.
  5. After the response (wait_until), send the email only if the address belongs to an active user (with or without a workspace: a person who signed up and has not created a workspace yet must be able to come back, Cloud sign-up §7), or has a pending invitation, and only within the system-mail budgets (Cloud sign-up §10.2). Otherwise send nothing. The request form carries the form ticket of Cloud sign-up §6.2; a request without a valid one sends nothing.

The email goes through the normal outbound pipeline from the system identity (Identities and domains › The system identity), whose address is PM_SYSTEM_FROM (default Pylota Identity <no-reply@{PM_PLATFORM_DOMAIN}>) and whose tenant is the default tenant (billing disabled or exempt, so it is never metered), with Idempotency-Key: signin:{login_token_id}; tests use the simulator (build plan M21). It contains the link https://{PM_CONSOLE_HOST}/console/sign-in/link?t=<token>, the code, and the request time. It never says whether the address has an account.

Doing the lookup and the send after the response keeps the response identical in content and timing for registered and unregistered addresses (W15).

GET /console/sign-in/link?t=… changes nothing. It shows a page with one Sign in button, which POSTs the token. Mail security scanners often open links in email; because the GET does not consume the token, a scanner cannot burn it.

The POST hashes the token and looks for a row that is unexpired, unused and has fewer than 10 attempts. What success does depends on the row’s purpose (Sign-up and waitlist tokens). For sign_in it sets used_at, creates the users row if the address only had a pending invitation, and sets last_login_at. When the person is enrolled in two-step verification it starts the pending step (Cloud sign-up §5.1) and creates no session; otherwise it creates a session. Either way the person ends at the page chosen by Cloud sign-up §7 (normally /console). Signing in never accepts an invitation by itself (Invitations).

Using the code

POST /console/sign-in/code with email and code computes HMAC(link key {key_kid}, email || code) for each unexpired, unused token of the address (at most three) and compares it in constant time with that row’s code_hash. A failure increments attempts on each of them; a token reaching 10 is burned. Success continues as for the link.

Each token allows 10 attempts, and each address 30 failed codes per UTC day: before comparing, the handler reads SUM(attempts) over the address’s login_tokens rows created since 00:00 UTC (rows are kept 24 hours after they expire, so the day is complete). At 30 it refuses every code for that address until the next UTC day, with a page that says to use the link in the email instead, and compares nothing. The failure that reaches 30 also sends the account email sign_in_codes_locked when the address belongs to an active user (nothing is sent for an unknown address, so the lock reveals nothing) (W43). Without this, one client network could try about 4,300 codes a day (RL_SIGNIN × 3 tokens × 10 attempts) against one address. On top of the per-address limits, the Workers rate-limiting binding RL_SIGNIN (Configuration › Bindings) allows 10 requests per 60 seconds per client network, keyed by CF-Connecting-IP with an IPv6 address counted by its /64 prefix, on POST /console/sign-in, /console/sign-in/link, /console/sign-in/code, /console/sign-in/verify, /console/sign-up and /console/waitlist, and on GET /console/oauth/{provider}/start, whose every hit writes an oauth_states row (Cloud sign-up §10).

Sign-up and waitlist tokens

Sign-up and the waitlist use the same login_tokens machinery, limits and email, with another purpose (Cloud sign-up §6):

purposeWritten bySent to an address with no accountUsing the link or code
sign_inPOST /console/sign-in, and /console/reauthNever (step 5 above)Signs in
sign_upPOST /console/sign-up, with plan, the validated next (next_path) and terms_version = PM_TERMS_VERSION from the required checkboxYes, when PM_SIGNUP=open, or when the request carries a valid waitlist invite for that address (Cloud sign-up §6.1); otherwise nothing is sentCreates the users row, copying terms_version and setting terms_accepted_at to the token’s created_at, then signs in and lands as Cloud sign-up §7 says, carrying plan. An address that already has an account is signed in and its accepted terms are updated
waitlistPOST /console/waitlist, with the plan of interest in planYes (double opt-in)Writes the waitlist row with confirmed_at = now; no account, no session
oauth_linkThe Google or GitHub callback, when the verified address belongs to an existing person not yet linked to that provider identity (Cloud sign-up §4)Never: the address has an accountOnly through POST /console/sign-in/verify with the matching pending_auth row: links the identity. The link in the email only opens that page

The response of POST /console/sign-up and POST /console/waitlist is the same page whatever happens to the address, as for sign-in (W15), and the send happens after the response. The link and code routes (/console/sign-in/link, /console/sign-in/code) serve all three purposes.

Keyed hashes

Link tokens, codes, invitation tokens, session cookies, pending-step cookies (__Host-pm_pending) and OAuth state values (with their __Host-pm_oauth cookie values) are never stored. Each table keeps HMAC-SHA256(link key {kid}, value) and the key_kid it used, where the link key is the Worker-generated signing_keys key of purpose link (Configuration › Thread and link keys). Tokens and cookie values start with that one-character kid, so the Worker knows which key to hash with. For OAuth, oauth_states.state_hash and cookie_hash are hashed this way, with oauth_states.key_kid (Cloud sign-up §4).

After POST /v1/platform/keys/link/rotate, the old kid keeps verifying for 7 days. Codes and sign-in links live 10 minutes, OAuth flows 10 minutes and invitations 7 days, so they are unaffected. A session whose key_kid is not the current one is re-hashed under the current key on its next request (new id_hash and key_kid in one UPDATE), so active sessions survive a rotation; a session idle for the whole 7 days ends, as its rolling lifetime would. With ?revoke_previous=true the old kid is deleted at once: every sign-in token, invitation, OAuth flow and session hashed under it stops working, and people sign in again (Security › Rotation procedures).

login_tokens rows hold a clear address, so the daily maintenance deletes them 24 hours after they expire.

Sessions

PropertyValue
Cookie__Host-pm_session=<value>; Path=/; Secure; HttpOnly; SameSite=Lax (W16)
ValueThe link key’s kid, then 32 random bytes in base64url. Only id_hash and key_kid are stored (Keyed hashes)
Lifetimeexpires_at = min(last_seen_at + 7 days, authenticated_at + 30 days)
last_seen_atUpdated at most once a minute, which also moves expires_at
csrf_secret32 random bytes per session
user_agent_hintBrowser family only (for the “your sessions” list), never the full header

The REST API and /mcp never read this cookie; they authenticate API keys only. The cookie is set by PM_CONSOLE_HOST; when that differs from PM_API_HOST, no cookie is set or read on the API host.

Every console request loads the session, the user and the member row for the active workspace in one D1 query:

SELECT s.user_id, s.tenant_id, s.csrf_secret, s.authenticated_at, s.last_seen_at, u.email, m.role,
       u.totp_enabled_at, t.require_two_factor
FROM sessions s
JOIN users u ON u.id = s.user_id AND u.status = 'active'
LEFT JOIN members m ON m.tenant_id = s.tenant_id AND m.user_id = s.user_id
LEFT JOIN tenants t ON t.id = s.tenant_id
WHERE s.id_hash = ?1 AND s.revoked_at IS NULL AND s.expires_at > ?2;

No row: redirect to /console/sign-in. A session whose active workspace has no member row (the person was removed) is sent to the workspace picker, so a removed member can never act in that workspace, even in a request that was already in flight. When require_two_factor is 1 and totp_enabled_at is NULL, only enrolment, the workspace picker, /console/settings and sign-out answer, on every request, and every other route redirects to enrolment (Cloud sign-up §5). A session is created only by the last step of a sign-in, so no session ever exists for an enrolled person who has not passed the second factor (Cloud sign-up §5.1).

Sign-out sets revoked_at and clears the cookie. Sign out everywhere (settings) revokes every session of the user. Revoked and expired rows are deleted 30 days later.

Re-authentication

Sensitive actions require a sign-in within the last 10 minutes and write an audit row (FR-CON-5): creating keys, creating, rotating or revoking an identity’s signing keys, inviting or removing members, changing roles, transferring ownership, adding or removing domains, releasing quarantine, approving a draft, erasure and legal holds, saving the workspace policy, approving a service sign-up, claiming an agent’s inbox (Agent self-sign-up § 8), and billing (Checkout and the Customer Portal). Confirming your address after a notification bounce is audited but needs no recent sign-in, because the re-authentication code would go to the suppressed address (Notification settings).

If authenticated_at is older, the POST answers 303 to /console/reauth?next=<path>. That page sends a code to the signed-in address (a new login_tokens row, counted in the same limits), and also asks for a two-step verification code when the person is enrolled. A correct code creates a new session (new cookie, authenticated_at = now) and revokes the old one, then answers 303 to next, which must be a path under /console/. The person submits the action again; the console never replays a form on its own.

CSRF

Three layers, all required (W16):

  1. Token. Every form has a hidden _csrf field: base64url(HMAC-SHA256(csrf_secret, "console-form")). A POST without it, or with a different value (constant-time comparison), gets 403.
  2. Origin. Every POST must carry an Origin header equal to https://{PM_CONSOLE_HOST} (which is https://{PM_API_HOST} by default). A missing header, null, or any other value gets 403. The rule has no exception, also not in tests: the local harness serves the console over HTTPS with PM_CONSOLE_HOST = "console.localhost:8799", so the browser’s Origin is https://console.localhost:8799 and matches (Testing › What cargo xtask itest does). Chromium is reported not to keep __Host- cookies set over plain http://localhost (httpwg/http-extensions issue 2605, seen 2026-10-10; not tested here), so the harness uses HTTPS rather than a relaxed rule.
  3. Cookie. SameSite=Lax, so cross-site POSTs carry no session at all.

The forms used before a session exists (sign-in, code, link, the pending step at /console/sign-in/verify, invitation acceptance, sign-up, waitlist, and the agent sign-up confirmation at /console/agent-signup/verify) are checked by Origin alone; they cannot act as a signed-in person. The OAuth callback is a GET from the provider and is bound to the browser by its state and __Host-pm_oauth cookie instead (Cloud sign-up §4).

The unsubscribe pair (GET and POST /console/notifications/unsubscribe) is exempt from all three layers: it needs no session, and its POST is checked by neither the CSRF token nor Origin, because a mail provider sends the RFC 8058 one-click POST with neither (W16). The token in the URL is its only authority, and it can only turn one notification kind off for one person in one workspace (Unsubscribe links). The agent sign-up refuse pair (GET and POST /console/agent-signup/refuse) is exempt in the same way and for the same reason: its token is its only authority, and it can only put one address on the refusal list (Agent self-sign-up § 9).

Console pages are served with Referrer-Policy: same-origin, not the API’s no-referrer. The Fetch Standard sets the Origin header of a non-CORS POST to null when the page’s referrer policy is no-referrer, which would make every legitimate form submission fail the check above.

Other console response headers: Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; form-action 'self'; frame-ancestors 'none'; base-uri 'none', Cache-Control: no-store, X-Content-Type-Options: nosniff and Strict-Transport-Security: max-age=31536000. There is no script source at all. 'unsafe-inline' for styles is there for sanitised mail, which uses inline styles and inherits the page’s policy inside its srcdoc frame.

Showing untrusted mail

Mail content is untrusted (Security). The console shows it so that it cannot act (W17):

  • The default view is text: extracted_text, or the full text, HTML-escaped.
  • The HTML view puts the sanitised HTML (sanitised at ingest) in <iframe sandbox srcdoc="…">. The sandbox attribute has no tokens, so the frame runs no scripts, has no same-origin access, submits no forms, opens no pop-ups and cannot navigate the page.
  • Remote images are not loaded: the policy allows images only from the console itself and data:. cid: images are embedded as data: URIs when the message is rendered: an inline part whose sniffed type is image/png, image/jpeg, image/gif or image/webp, at most 2 MiB each and 8 MiB per message, read through the same service as the API’s attachment route. Others show a placeholder that links to the attachment route below. They are not fetched from a console URL, because the token-less sandboxed srcdoc frame has an opaque origin, so its requests may count as cross-site and carry no SameSite=Lax session cookie (RFC 6265bis draft §5.2.1, read 2026-10-10; not tested in a browser here). A Load remote images link re-renders that one message with img-src https: after a warning that the sender may learn the mail was opened.
  • Attachments are downloaded from the console host, never the API host (the API needs a key and answers Cross-Origin-Resource-Policy: same-origin): GET /console/inboxes/{idn}/messages/{msg}/attachments/{att}, session-authenticated, with the attachments:read permission (every role), the workspace from the session and the same 404 for a foreign ID (W18). It calls the same service function as GET …/attachments/{attachment_id} and answers with the serving headers of Security § 8.5 (Content-Disposition: attachment, Content-Security-Policy: sandbox, X-Content-Type-Options: nosniff, Cache-Control: private, no-store). A message in quarantine serves none of its attachments.
  • Quarantined and screening messages show the text view and the quarantine reason only (Screening hold § 21). Risky attachments are never offered for preview.
  • A message with a calendar object shows a read-only Calendar panel (Calendar invitations §13); it offers no answer buttons. A quarantined message’s panel shows only the method and the verified badge.
  • Display names, subjects and filenames are always escaped; links in text view are not made clickable.

Invitations

Members are invited by email (FR-CON-4). The owner and admins can invite, from the console or with POST /v1/tenants/{id}/invitations (members:manage).

  1. Validate the address and the role (admin, member or viewer). An address that is already a member is refused with 400 invalid_request, and so is an address this deployment hosts (path email; Cloud sign-up §10, W45). The workspace’s invitation budget comes next: at most 50 invitation emails (new and re-sent) per tenant per UTC day, counted by the system-mail budgets; past it the request gets 429 daily_cap_reached with details.cap: "invitations" and details.resets_at, before anything is written (Cloud sign-up §10.2, W44).
  2. If a pending invitation for the address exists (invitations_pending is unique per workspace and address), it is re-sent instead: new token, expires_at restarted, no new seat.
  3. Take a seats hold in TenantQuota (ref = the new inv_ ID). With no seat left the request fails with 402 billing_limit and details.feature: "seats", before anything is written (W8, Billing).
  4. Insert the invitation (token_hash and key_kid as in Keyed hashes, expires_at = now + 7 days) with its audit row and member.invited event in one D1 batch, then settle the hold.
  5. Email the link https://{PM_CONSOLE_HOST}/console/invitations/accept?t=<token> from the system identity, as for sign-in. The email says who invited the person: the inviter’s name from invitations.invited_by (the signed-in user; NULL when an API key created the invitation, and then the workspace name alone). This works with PM_CONSOLE=off too: PM_CONSOLE_HOST and PM_SYSTEM_FROM are top-level settings, and with the console off the router still registers the two invitation routes (GET and POST /console/invitations/accept). Accepting there creates the user and the membership and shows “You are now a member of {workspace}”; no session is created, because the deployment has no console to sign in to.

A pending invitation counts as a seat until it is accepted, revoked or expires.

Accepting is always an explicit click, and it never creates a session that skips a factor (FR-CON-16, W40). The link was sent to the invited address, so it proves control of that address, which is a first factor and nothing more:

  • GET /console/invitations/accept?t=… changes nothing. It shows the workspace name and the role with an Accept button (a form POST of the token) and, where enabled, Accept with Google and Accept with GitHub (Cloud sign-up §4).
  • The POST checks the token (pending, unexpired). When the browser already has a session of the invited person, the invitation is accepted in that session. When it has a session of another person, the page says whose session it is and offers sign-out; nothing is accepted. Otherwise:
    • No users row, or a person without two-step verification: one D1 batch creates the users row if needed, inserts the members row with the invited role, marks the invitation accepted and creates a session with the new workspace active, as an email sign-in link would.
    • A person enrolled in two-step verification: nothing is accepted yet. The handler starts the pending step with invitation_id set (Cloud sign-up §5.1); only when the second factor passes are the membership inserted, the invitation marked accepted and the session created, in one batch. An abandoned step leaves the invitation pending, so its link still works until expires_at.
  • Signing in never accepts. A person who signs in another way with a pending invitation lands on /console/invitations when they have no workspace, or sees it in the workspace picker and as an Overview banner otherwise; each invitation there has its own Accept form (POST /console/invitations/{invitation_id}/accept, session and CSRF token, the invitation’s address equal to the session’s), which inserts the membership in the current session.

The seat taken by the invitation becomes the member’s seat; TenantQuota does not change. Event member.joined. With PM_CONSOLE=off, the POST creates the user and the membership and creates no session in any case, so no second factor is involved.

Revoking (DELETE /v1/tenants/{id}/invitations/{inv} or the console) sets revoked and releases the seat (Adjust −1). Expiry: the hourly roll-up sets expired on pending invitations past expires_at and releases their seats; acceptance also checks expires_at, so a late click never works.

Members

Changing a role (owner or admin, sensitive) updates members.role and emits member.role_changed. It takes effect on the person’s next request, because the role is read on every request. In the same D1 batch, every key of the workspace whose created_by_user_id is that person and that holds a permission the new role lacks is revoked (key.revoke, details.reason = "creator_role_changed"); their other keys get the new created_by_role (W36). When the new role’s session principal lacks webhooks:manage, the batch also disables the webhook endpoints the person created (disabled_reason = 'creator_removed', W47).

Removing a member (owner or admin, sensitive; DELETE /v1/tenants/{id}/members/{user_id}) and leaving run one D1 batch: delete the members row, delete the person’s notification_prefs rows for this workspace, revoke every session of that user whose active workspace is this one, revoke every key of the workspace whose created_by_user_id is that user (a key.revoke audit row each, details.reason = "creator_removed", W36), disable every enabled webhook endpoint of the workspace whose created_by_user_id is that user (disabled_reason = 'creator_removed', a webhook.disable audit row each, W47), revoke every pending invitation of the workspace whose invited_by is that user (a member.invite_revoke audit row each, details.reason = "inviter_removed"), so an address the person invited cannot bring them back, write the audit row and the member.removed event. Then the seat is released with Adjust −1; if that call is lost, the hourly reconciliation corrects the count. After the batch the handler calls NotifierRequest::MemberRemoved { user_id } on the workspace’s Notifier, which drops the person’s pending notifications in this workspace, so nothing more is sent to them about it (O19, Notifications §2). The person’s next request redirects to sign-in (W9). The owner cannot be removed and cannot leave (409 owner_required, W10).

Transferring ownership (owner only, sensitive) to an existing admin. One D1 batch, in this order, because the unique index on the owner is checked statement by statement:

-- ?1 tenant, ?2 current owner, ?3 target admin
UPDATE members SET role = 'admin'
WHERE tenant_id = ?1 AND user_id = ?2 AND role = 'owner'
  AND EXISTS (SELECT 1 FROM members WHERE tenant_id = ?1 AND user_id = ?3 AND role = 'admin');
UPDATE members SET role = 'owner'
WHERE tenant_id = ?1 AND user_id = ?3 AND role = 'admin'
  AND NOT EXISTS (SELECT 1 FROM members WHERE tenant_id = ?1 AND role = 'owner');

Both statements change one row, or neither does (the target is not an admin): then the request returns 400 invalid_request (“the new owner must be an admin of this workspace”) and the workspace still has its owner. The batch also writes the audit row member.ownership_transfer and two member.role_changed events, and applies the role-change rule above to the former owner, now an admin: their keys holding tenants:erase are revoked. Stripe’s customer email does not change; the new owner can update it in the Customer Portal. After the batch commits, the handler sends the account email (Account emails).

Identity signing keys

The identity page /console/inboxes/{idn} has a Signing keys section for the identity’s agent signing keys (Agent signing keys). It calls the same service functions as the API’s identity-key routes:

ActionWhoSame as
List every key (kid, status, created_at, verify_until, retired_at) and show the JWKS link https://{PM_API_HOST}/.well-known/jwks/{identity_id}.jsonAll roles (identities:read)GET /v1/identities/{identity_id}/keys
Create the first keyOwner, admin (identities:write); sensitivePOST /v1/identities/{identity_id}/keys
Rotate: a new active key, the previous one retiring until verify_untilOwner, admin; sensitivePOST /v1/identities/{identity_id}/keys/rotate
Revoke one key at onceOwner, admin; sensitivePOST /v1/identities/{identity_id}/keys/{kid}/revoke
  • Each change needs a recent sign-in (Re-authentication), writes the audit row identity_key.create, identity_key.rotate or identity_key.revoke (the actions the API writes) and emits the matching identity.key_* event. A create that finds an active key, or a revoke of a key that is already retired, changes nothing and writes no audit row or event.
  • Key management stays available while the identity is paused, so a suspected leak can be handled before it resumes; the page says that a paused identity’s JWKS is withdrawn and that it cannot sign.
  • The page shows public data only. No private key is ever displayed, and the console has no form that mints an assertion or a signed request: agents sign through the API and MCP.

Notifications

People get email about their workspace: usage alerts, new mail in inboxes they follow, the daily list of things that need a person, and account emails (Notifications). The console owns the preferences, the unsubscribe links and the account emails its own handlers trigger.

Notification settings

/console/settings/notifications sets the signed-in person’s own preferences for the active workspace, one notification_prefs row per kind (Notifications §2). Every role can open it. Nobody can change another person’s preferences, and there is no API for them: API keys are not people.

KindChoices on the pageDefault (no row)
usageoff or instantinstant for owner and admin; off for member and viewer
new_mailoff, instant, hourly or daily; the inboxes to follow (every inbox, or chosen ones); the filter (all, or only messages triage marks needs_reply)off
needs_personoff or dailydaily for owner and admin; off for member and viewer
accountAlways on, shown read-onlyOn
  • Saving is a POST with the CSRF token; it is not a sensitive action. It upserts the row for (user_id, tenant_id, kind) with the user and workspace taken from the session, never from the form (W18). A mode the kind does not accept, or an inbox ID outside the workspace, is refused like any invalid or foreign value; the system identity is never offered. A kind with no row follows the default of the person’s current role.
  • Bounce banner. A hard bounce or complaint on a notification sets paused_reason on every preference of the person in every workspace (O17). Every console page then shows a banner, and this page explains it with a Confirm my address button. Confirming needs the session but not a recent sign-in: re-authentication codes, like every message from the system identity, are not delivered to the suppressed address. One D1 batch clears paused_reason on all of the person’s rows, removes the system identity’s suppression of their address (the default tenant’s suppressions row for it) and writes the audit row user.notifications_resume.
  • Cap notice. When the person’s daily cap (50) or the workspace’s (200) has been reached, the page says so: further notifications that day go into the next daily digest (O24).
  • When notifications are off. With PM_NOTIFICATIONS=off, or while the workspace is suspended, the page says that only account emails are sent (O26). With PM_BILLING=off, it says that no usage alerts are sent and hides the usage choice (O23).

Every usage, new_mail, needs_person and digest email carries List-Unsubscribe: <https://{PM_CONSOLE_HOST}/console/notifications/unsubscribe?t={token}> and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058). The token (a MAC under the current link key with its kid, binding the person, the workspace and the kind, valid 90 days) is defined in Notifications §5.

RouteDoes
GET /console/notifications/unsubscribe?t=…Changes nothing. With a valid token it shows the workspace and the kind with one Unsubscribe button, a form that POSTs to the same URL. A mail scanner that opens the link unsubscribes no one
POST /console/notifications/unsubscribe?t=…Verifies the token and sets that kind to off for that person and workspace (an upsert of the notification_prefs row), then shows a confirmation page with a link to the settings page. A digest token performs three upserts, setting usage, new_mail and needs_person to off, because the digest has no row of its own: the notification_prefs kind CHECK stays those three kinds. This is the request a mail provider sends for a one-click unsubscribe
  • No session is needed and none is created. Both routes are exempt from the CSRF token and Origin check (CSRF), and both are served even with PM_CONSOLE=off.
  • An expired, altered or foreign token (another person’s, another workspace’s, or one whose link key has left its 7-day verify window after a rotation) changes nothing and gets the same page, linking to /console/settings/notifications, whichever check failed (O18).
  • It is not a sensitive action and writes no audit row: it only turns a notification off, as the person asked. account emails have no unsubscribe header.

Account emails

account emails cannot be turned off (Notifications §1). The code that performs one of these actions calls NotifierRequest::Account { user_id, event } after its D1 batch commits, on the Notifier chosen by the one rule of Notifications § 3: the person’s last-used workspace (users.last_tenant_id); when that is unset or gone, the workspace where the event happened; for an event in no workspace, the default tenant.

Event (AccountEvent)Called bySent to
two_factor_disabled/console/settings/security, in console/totp.rs (Cloud sign-up §5)The person
sign_in_method_linkedThe pending step, in console/pending.rs, when the emailed code links a Google or GitHub identity to an existing person (Cloud sign-up §5.1)The person
ownership_transferredThe ownership transfer in members/mod.rs (Members)The previous owner and the new owner
payment_failedThe billing webhook, in billing/webhook.rs, when the status becomes past_due (Billing › Applying state)The owner
sign_in_codes_lockedThe code route, in console/signin.rs, when an address reaches 30 failed codes in a UTC day (Using the code)The person, once per lock
agent_signup_verifiedsignup/verify.rs, when an agent sign-up is verified by code, link or claim (Agent self-sign-up)The new owner

account emails are sent with PM_NOTIFICATIONS=off, to a suspended workspace, past the daily caps and while a person’s other preferences are paused.

Screens

PathScreenWho
/console/sign-inEmail form, plus “Continue with Google” and “Continue with GitHub” where enabled; then the “check your email” page with the code formAnyone
/console/sign-in/linkConfirm sign-in from the email linkAnyone with a link
/console/sign-in/verifyThe pending step: the second factor, or the code that confirms linking a Google or GitHub identity (Cloud sign-up §5.1)Anyone with a __Host-pm_pending cookie
/console/sign-upSign-up with Google, GitHub or an email address, and the terms checkbox (PM_SIGNUP=open, or ?invite={token} from a waitlist invite while PM_SIGNUP=waitlist; Cloud sign-up §6)Anyone
/console/waitlistJoin the waitlist, with double opt-in (PM_SIGNUP=waitlist; Cloud sign-up §6.1)Anyone
/console/oauth/{provider}/start, /console/oauth/{provider}/callbackRedirects to and from Google or GitHub; no page of their own (Cloud sign-up §4)Anyone
/console/invitations/acceptAccept an invitation: the Accept button, or Accept with Google or GitHubAnyone with a link
/console/invitationsThe signed-in person’s pending invitations, each with its own Accept formSigned in
/console/notifications/unsubscribeConfirm and apply a one-click unsubscribe from a notification kind (Unsubscribe links)Anyone with a link; no session
/console/reauthConfirm it is you, with a code (and a two-step code when enrolled)Signed in
/console/workspacesWorkspace picker and switcherSigned in
/console/workspaces/newCreate your workspace: name, address suffix, time zone (Cloud sign-up §6.2)Signed in, with no workspace or pending invitation, when sign-up is open or the person has a valid waitlist invite
/consoleOverview, the workspace home: banners, the first-run checklist, “Needs a person”, usage meters, inboxes and recent activity (Cloud sign-up §8). M21 builds a plain home first (the workspace name, the frame and its navigation, and a link to each screen), which M24 replaces with the OverviewAll roles (viewers without action buttons)
/console/connectConnect your agent: the claude mcp add line, .mcp.json, a curl request and idvy login, with a key ID filled in, never a secret; the Codex, Cursor and Claude Desktop bridge blocks, the Agent SDK snippet and idvy skills generate (SDKs, skills and agent tooling § 5.5)Owner, admin
/console/inboxes, /console/inboxes/{idn}Identities with their addresses and status; one identity’s threads with triage, and its signing keys with the JWKS link (Identity signing keys); their pause windows (Deliverability metrics § 9); the identity’s message retention (owners and admins change it; shortening needs the confirmation step of the policy page) and its own allow and block list entries, read-only (Parity additions § 7, § 3.8)All roles. Create, rotate and revoke signing keys: owner, admin
/console/inboxes/{idn}/threads/{thr}A thread; each message in text view, HTML on request (Showing untrusted mail), with the Calendar panel when it has one, and the screening line and feedback form (owner, admin, member); arc_rescued messages say “Authenticated by the forwarder {sealer} (ARC)”All roles
/console/draftsThe workspace’s drafts that need attention: Awaiting approval, Scheduled and Failed (Drafts § 16)View: owner, admin, member
/console/inboxes/{idn}/draftsOne inbox’s drafts in every statusView: owner, admin, member
/console/inboxes/{idn}/drafts/{drf}One draft: recipients, subject, text view, HTML on request, attachments, approval, send, rejection and failure details; Approve (re-authentication; hidden revision and digest), Reject with a reason, CancelView: owner, admin, member. Approve, reject, cancel: owner, admin
/console/inboxes/{idn}/messages/{msg}/attachments/{att}Download one attachment, with the API’s serving headers (Showing untrusted mail)All roles
/console/searchSearch one identity or the whole workspace, with facets; agentic answers with citationsAll roles (agentic: not viewers)
/console/quarantineQuarantined mail with reasons and screening signals; mail being screened; release; for auth_failed mail with an ARC chain, why it was not rescuedOwner, admin, member
/console/screeningScreening summary: verdicts, reasons, feedback, precision and recall, per inbox (Screening hold §21)Owner, admin, member
/console/deliverabilityPauses in effect, the tenant’s, each domain’s and each identity’s pause windows with headroom, and daily event counts (Deliverability metrics § 9)All roles
/console/keysKeys with scope and last use; create (the secret is shown once), with an optional MCP tools fieldset (SDKs, skills and agent tooling § 5.3); revokeOwner, admin
/console/domains, /console/domains/{dom}Domains, health and issues, DNS records read from the provider API; add, verify, remove; their pause windows; Download zone file (/console/domains/{dom}/records.zone)View: all roles. Change: owner, admin
/console/webhooksEndpoints, recent deliveries, rotate secret, replay; event consumers and streams (Event feed § 14); custom delivery header names, add (write-only value) or removeOwner, admin
/console/membersMembers, pending invitations, seats used; invite, resend, revoke, change role, remove, transfer ownership, leaveView: all roles. Change: owner, admin. Transfer: owner
/console/planPlan, a meter per allowance, upgrade, a downgrade scheduled for the period end, top-ups, manage billing (Billing, Plan changes)View: all roles. Buy or change: owner
/console/plan/returnReturn from Stripe Checkout: confirms the plan once the webhook has applied it (Cloud sign-up §9)Owner
/console/auditAudit log with filtersOwner, admin
/console/accountsService sign-up requests: pending first, with inbox, service, sender domains, account identifier, purpose (escaped) and status; approve (re-authentication), reject, close, delete; a link to quarantined account_unapproved mail (Service sign-up ledger §8)View: owner, admin, member. Change: owner, admin
/console/settings/policyThe workspace policy, grouped by area, each field with its limit or the reason it is read-only; the form for owners and admins, and the confirmation step for changes that delete mail (Workspace policy §6)View: all roles. Change: owner, admin
/console/agent-signup/verifyConfirm being an agent’s accountable human: the agent’s address, what it means, the terms checkbox, Confirm (Agent self-sign-up § 19)Anyone with a link; no session needed
/console/agent-signup/claimClaim an agent’s inbox with its key (re-authentication)Signed in
/console/agent-signup/refuseStop agents naming this addressAnyone with a link; no session, no CSRF token, no Origin check
/console/settingsYour name and sessions; the refusal notice and Allow again for a person on the agent sign-up refusal list; the terms version you accepted and when (users.terms_version, terms_accepted_at; “not recorded” for people who joined by invitation before sign-up opened); delete your account; workspace name, time zone and require_two_factor (owner only, through the console-only owner handler; never the platform-only tenant fields), and a link to the policy pageAll roles
/console/settings/securityTwo-step verification: enrol with a QR code, recovery codes, turn off (re-authentication needed); linked Google and GitHub identities with Unlink (Cloud sign-up §4, §5)Signed in
/console/settings/notificationsYour notification preferences for the active workspace: kinds, modes, followed inboxes and the needs_reply filter; the bounce banner and Confirm my address; the daily-cap notice (Notification settings)All roles, each for themselves

With PM_BILLING=off, /console/plan shows usage only, with no plans or buttons.

Tables

The schema is in Data model. How this design uses each table:

TableUse
usersOne row per person, keyed by sign-in address. status = 'disabled' blocks sign-in. Created by owner on POST /v1/tenants, by idvy setup --owner-email, or when an invitation is accepted
membersWho is in which workspace, with which role. members_one_owner enforces one owner
invitationsPending, accepted, revoked or expired invitations. invitations_pending allows one pending invitation per address and workspace. Expired and revoked rows are deleted 30 days after expires_at; an accepted row stays, and loses its address when that person deletes their account (Privacy › People)
login_tokensOne row per sign-in, re-authentication, sign-up or waitlist request (purpose), holding both the link and the code hashes and the attempt count, and for sign-up the plan, next and accepted terms version. Deleted 24 hours after expiry
sessionsConsole sessions with their CSRF secret and the time of the last sign-in. Deleted 30 days after expiry or revocation
oauth_identities, oauth_states, pending_auth, waitlistGoogle and GitHub links, OAuth flows in progress, sign-ins waiting for their second step, and the waitlist (Cloud sign-up §11)
notification_prefsOne row per person, workspace and kind that has been saved or paused; a missing row means the default for the person’s role. Written by the settings page and by unsubscribe; paused_reason is set by a notification bounce or complaint and cleared by Confirm my address. Deleted for that workspace when a member is removed or leaves, for every workspace when a person deletes their account, and with the workspace by tenant erasure
identity_keysRead for the identity page’s key list; written only through the identity-key service functions that the API uses

Tokens, codes, cookie values and OAuth state values in these tables are always keyed hashes under a link key, with its kid, never the value itself. Values the Worker must use again (TOTP secrets, recovery-code hashes, PKCE verifiers) are sealed under PM_MASTER_KEY instead (Security › Encryption envelope).

Audit and events

Every sensitive action writes an audit_log row in the same D1 batch as the change. For console actions actor_key_id is NULL, actor_user_id holds the person (usr_…), and details_json holds "via": "console".

Audit actionWhenWebhook event
member.invite, member.invite_resendInvitation created or re-sentmember.invited (invitation_id, masked email_hint, role)
member.invite_revokeInvitation revoked–
member.joinInvitation acceptedmember.joined (user_id, role)
member.role_changeRole changedmember.role_changed (user_id, from, to)
member.remove, member.leaveMember removed, or leftmember.removed (user_id)
member.ownership_transferOwnership transferredTwo member.role_changed events
user.deleteA person deleted their account (Privacy › People)–
user.two_factor_enable, user.two_factor_disableTwo-step verification turned on or off (Cloud sign-up §5)–
user.oauth_unlinkA person unlinked a Google or GitHub identity (Cloud sign-up §4)–
user.notifications_resumeA person confirmed their address after a notification bounce or complaint (Notification settings); tenant_id is NULL, because it clears the pause in every workspace–
identity_key.create, identity_key.rotate, identity_key.revokeAn identity’s signing key created, rotated or revoked on the identity page (the API writes the same actions)identity.key_created, identity.key_rotated, identity.key_revoked
tenant.policy_updateThe policy page saved (the API writes the same action)tenant.policy_updated
account.approve, account.reject, account.close, account.deleteA service sign-up decided, closed or deleted on the accounts page (the API writes the same actions)account.approved, account.rejected, account.closed (delete of a live entry)
waitlist.inviteThe operator invited a batch from the waitlist (Cloud sign-up §6.1)–
draft.approve, draft.rejectA draft decided on its page (the API writes the same actions)draft.approved, draft.rejected
event_consumer.deleteA consumer deleted on the webhooks page (the API writes the same action, and event_consumer.create and event_consumer.reset)–
agent_signup.verifyAn agent sign-up confirmed through the link page; agent_signup.claim is recorded as agent_signup.verify with "via": "claim" when a signed-in person claims the inbox (Agent self-sign-up)signup.verified
user.agent_signup_allowA person removed their address from the agent sign-up refusal list (Allow again)–

The other sensitive actions use the same audit actions as the API (for example key.create, quarantine.release), so the log reads the same whichever way the action was taken. Billing actions are listed in Billing.

member.* events have no owner Durable Object. They are written to event_index as platform events with the workspace’s tenant_id and delivered like webhook.disabled (Webhooks › Platform events).

Open points

  1. RL_SIGNIN. Closed: 10 requests per 60 seconds per client IP, keyed by CF-Connecting-IP (Sign-in, Cloud sign-up §10).
  2. System mail sender. Closed: PM_SYSTEM_FROM is the address of the system identity that sends sign-in, invitation and notification mail (Identities and domains › The system identity) (Cloud sign-up §10, §12).
  3. Actor of console actions. Closed: audit_log.actor_user_id records the person (Data model), and message.released carries released_by_user_id for a console release (Webhook events).
  4. Key-based quarantine release (FR-CON-6). Closed: PM_QUARANTINE_KEY_RELEASE (Configuration) is on by default for self-hosting, and Pylota Identity Cloud sets it to off, so only a signed-in person can release there, except in a workspace whose policy has quarantine.key_release: true (decided 2026-10-10), and there only for a platform key or the workspace’s partner key, never the workspace’s own keys. Only a platform key, or the partner key of the workspace’s partner, can set that field; Pylota sets it on its operators’ workspaces (Configuration › Tenant policy).
  5. Erasure of console data. Closed: tenant erasure deletes the workspace’s members, invitations and sessions, and deletes every person it leaves with no workspace; deleting a person removes their oauth_identities and any waitlist row (Cloud sign-up §11, Privacy › Tenant scope, Privacy › People).
  6. Sign-up on Pylota Identity Cloud. Closed: designed in Cloud sign-up, sign-in and first run.

Tests

TestProvesCovers
it::members::w8_seat_limitAn invitation with no seat left gets 402 with feature: seats; pending invitations count as seats; a re-sent invitation takes no new seatW8, FR-CON-4
it::members::w9_remove_revokes_sessionsAfter removal the member’s next request redirects to sign-in, including a request made with a session created before the removalW9, FR-CON-4
it::members::w10_owner_requiredRemoving, demoting or leaving as the owner gets 409 owner_required; a transfer to a non-admin changes nothingW10, FR-CON-2
it::console::w15_signin_limitsA fourth request in 10 minutes is refused; a token burns after 10 failed codes; an 11th request from one client IP within 60 seconds is refused by RL_SIGNIN, also from a second IPv6 address in the same /64; responses for known and unknown addresses are byte-identical apart from the request ID, and no email goes to an unknown address. M21 covers its own routes (sign-in, link, code); M24 adds sign-up, waitlist, the pending step and the OAuth start to the same testW15, FR-CON-3
it::console::w16_csrfA POST without the token, with another session’s token, without Origin, with Origin: null or a foreign origin (also http:// with the right host) gets 403; the cookie has __Host-, Secure, HttpOnly and SameSite=Lax; the unsubscribe POST alone is accepted without a session, token or OriginW16, FR-CON-1
it::members::w40_invitation_needs_second_factorAccepting an invitation as a person enrolled in two-step verification creates no session and no membership until the second factor passes, then both in one batch; abandoning the step leaves the invitation pending; a person without two-step verification, or a new person, gets the membership and a session; a session of another person accepts nothing; signing in with a pending invitation accepts nothing and lands on /console/invitations, where the Accept form doesW40, FR-CON-16
it::console::w43_failed_code_daily_cap30 failed codes in a UTC day for one address, spread over several tokens and client IPs, lock code sign-in until 00:00 UTC while the link still works; the lock sends one sign_in_codes_locked email to an active user and none to an unknown address; the response for the two is the sameW43, FR-CON-3
it::console::attachments_and_inline_imagesThe console attachment route serves a file with the API’s serving headers for every role, 404 for a foreign ID and nothing for a quarantined message; a cid: PNG of 1 MiB becomes a data: URI in the srcdoc, a 3 MiB one a placeholder linking to the route, and the rendered page makes no request to the API hostFR-CON-6, W17, W18
it::console::w17_hostile_htmlThe hostile-HTML corpus renders in a sandboxed srcdoc frame under the CSP: no script runs, no remote request is made, no form postsW17, FR-CON-6
it::console::w18_role_and_scope (table test)Each role against each route of Roles gets exactly the allowed outcome; IDs from another workspace give 404; a tenant_id in a form is ignoredW18, FR-CON-2
it::console::signin_link_and_codeThe link GET does not consume the token; link and code are single use and burn each other; expired tokens failFR-CON-3
it::console::session_lifetime7-day rolling and 30-day absolute expiry with a fake clock; sign-out and sign-out-everywhereFR-CON-3
it::console::reauth_sensitiveEach sensitive action redirects to re-authentication after 10 minutes, writes an audit row, and the session is rotatedFR-CON-5
it::members::invitation_lifecycleAccept (only by the explicit form), re-send, revoke and expire, with the seat count after each (the per-tenant daily invitation budget is tested by it::abuse::w44_system_mail_budgets)FR-CON-4
it::members::ownership_transferExactly one owner before and after; concurrent transfers leave one ownerFR-CON-2
it::console::quarantine_releaseA member releases with re-authentication and an audit row; with key release off, an API key cannot release unless the workspace’s policy has quarantine.key_release: true (it::quarantine::j16_key_release_override); the policy page shows that field read-onlyFR-CON-6
it::console::policy_page (Workspace policy §9)Roles, re-authentication, changed fields only, ceilings, the deleting-change confirmationFR-TEN-4, FR-CON-5
it::console::accounts_page (Service sign-up ledger §10)Roles, approval with re-authentication, the Overview item, escaped purposeFR-IDN-10
it::console::disabledPM_CONSOLE=off removes every /console route except the invitation-accept and unsubscribe pairs; the members API still worksFR-CON-7
it::console::notification_settingsEach role sees its defaults; saving writes rows for the session’s person and workspace only; a mode a kind does not accept and an inbox from another workspace are refused; account cannot be turned off; the cap notice appears after the 50th email of the dayFR-CON-14, FR-CON-15
it::console::identity_keys_pageEvery role sees the key list and the JWKS link; only owner and admin can create, rotate and revoke, each after re-authentication with an identity_key.* audit row and event; a paused identity’s keys can still be revokedFR-IDN-6, W18
it::console::account_emailsTurning two-step verification off, linking a sign-in method, transferring ownership, a failed payment (invoice.payment_failed fixture) and a code lock (sign_in_codes_locked) each send one account email after the batch commits, also with PM_NOTIFICATIONS=off; it goes through the Notifier of the person’s last_tenant_id when set, and of the workspace where the event happened otherwise; a redelivered webhook sends nothing moreFR-CON-15
it::notify::one_click_unsubscribe, it::notify::bounce_pauses_prefs, it::notify::member_removed_drops_pending (Notifications §10)Unsubscribe without a session; the bounce banner and Confirm my address; member removal deletes preferencesO17–O19
cli::setup::owner_email (CLI and setup) plus it::console::first_owner_signinidvy setup --owner-email creates the default tenant’s owner, who receives a link and can sign inFR-CON-7
browser::console::no_js, browser::console::axe_scan (Testing §6.8)Every console route works with javaScriptEnabled: false; an axe scan finds no violation of impact serious or criticalFR-CON-1, M21
it::console::drafts_page (Drafts § 22)The three screens for each role; approve needs re-authentication and posts revision and digest; a stale page is refused and shown again; the Overview items; escapingQ54, Q55
it::console::event_consumers_section (Event feed § 20)Owners and admins see the section and can delete a consumer with the CSRF token; members and viewers get 403; no payload appearsFR-EVT
it::console::t49_screening_pages (Screening hold › Tests)The console behaviour of T49; the pages join browser::console::no_js and browser::console::axe_scanT49
it::console::calendar_panel (Calendar invitations)The panel for each role, escaped text, workspace-time-zone times, the verified badge and reason, the .ics link through the console route; a quarantined message shows method and badge only; no answer buttonsFR-CAL
it::console::deliverability_page (Deliverability metrics)All roles see the screen; pauses first, tripped rows first, headroom sentences; works with no script; the inbox and domain pages show their windowsFR-MET
it::console::agent_signup_pages (Agent self-sign-up)The verify, claim and refuse pages and the settings notice render without JavaScript, escape untrusted text and join browser::console::no_js and browser::console::axe_scanFR-ASU
it::console::render_budgetServer render time p95 ≤ 300 ms on the fixture workspaceNFR-CON-1