Skip to content

The consent page

Some decisions belong to the account holder alone: which mero-tee releases may hold their data, which code may read it, which addresses it may be sent to (Deployment governance). Each is approved with a fresh, user-verified passkey assertion that the node logs as consent. Apps still need to prompt for them: a new version is out, a feature needs an outbound host. The consent page is how an app does that without ever being the page that asks for the passkey.

A passkey assertion is blind. The authenticator shows the person a site name and a fingerprint prompt, never what the challenge commits to. Whatever page starts the ceremony decides what the person believes they approve.

An app’s frontend is the publisher’s code, served from the bundle and possibly closed source. If it could run an approval ceremony, it could show “update to 1.2.1” and have the passkey sign an upgrade to something else, or show “allow analytics” and approve every prefix the manifest declares. So a session opened on an app’s origin is bound to its package and refused every approval route (Accounts, passkeys & sessions). That stays true. Instead, the app asks the node to ask the person. Which routes a package-bound session is refused, and the consent kind that replaces each, are side by side in Sessions & authority.

  1. Request. The app calls POST /consent/requests inside the sealed channel with any session of the account, a package-bound one included:

    { "kind": "upgrade", "subject": { "app": "<appId>", "toVersion": "2.0.0" },
    "returnTo": "https://<label>.<apps-domain>/2.0.0/settings" }
    { "kind": "release", "scope": "account" | { "org": "<orgId>" },
    "subject": { "version": "1.4.0", "withdraw": false }, "returnTo": "…" }
    { "kind": "outbound", "scope": "account" | { "org": "<orgId>" },
    "subject": { "package": "<package>?", "prefixes": ["https://api.example/"]? },
    "returnTo": "…" }
    { "kind": "createOrg", "subject": { "name": "Acme" }, "returnTo": "…" }
    { "kind": "createInvite",
    "subject": { "org": "<orgId>", "role": "member", "teams": ["<teamId>"]?,
    "ttlSecs": 604800?, "uses": 1?, "allApps": false? },
    "returnTo": "…" }
    { "kind": "acceptInvite", "subject": { "token": "inv_…" }, "returnTo": "…" }
    { "kind": "leaveOrg", "subject": { "org": "<orgId>" }, "returnTo": "…" }
    { "kind": "removeMember", "subject": { "org": "<orgId>", "account": "<accountId>" },
    "returnTo": "…" }
    { "kind": "setMemberRole",
    "subject": { "org": "<orgId>", "account": "<accountId>", "role": "admin" },
    "returnTo": "…" }
    { "kind": "setMemberTeams",
    "subject": { "org": "<orgId>", "account": "<accountId>",
    "teams": [{ "team": "<teamId>", "role": "member"?, "capabilities": 3? }] },
    "returnTo": "…" }
    { "kind": "removeMemberTeams",
    "subject": { "org": "<orgId>", "account": "<accountId>", "teams": ["<teamId>"] },
    "returnTo": "…" }
    { "kind": "revokeInvite", "subject": { "org": "<orgId>", "inviteKey": "<key>" },
    "returnTo": "…" }
    { "kind": "renameOrg", "subject": { "org": "<orgId>", "name": "Acme Labs" },
    "returnTo": "…" }
    { "kind": "deleteOrg", "subject": { "org": "<orgId>" }, "returnTo": "…" }
    { "kind": "setCapabilities",
    "subject": { "org": "<orgId>", "account": "<accountId>"?, "team": "<teamId>"?,
    "capabilities": 3 },
    "returnTo": "…" }
    { "kind": "setAllApps",
    "subject": { "org": "<orgId>", "account": "<accountId>", "allApps": true },
    "returnTo": "…" }

    The organization kinds (createOrg onwards) are how an app’s frontend manages organizations at all: a package-bound session is refused every organization route (POST /orgs, members, teams, invites, redemption, capabilities, renaming, deleting; 403) except its own package’s channels (Package-bound sessions), so an app that creates workspaces, invites people, moderates them or changes a workspace’s settings asks here (Organizations and invites).

    A release request approves by default; "withdraw": true asks to withdraw the release’s approval instead (a console’s Withdraw). Unknown fields are refused. The node checks the caller could make this approval at all, with the route’s own rules, before any page exists: the governance holder; for an organization’s release, APPROVE_RELEASES there (403); for an upgrade, an owner or admin of the app’s organization (SystemState::may_upgrade, 403 for anyone else, the member who created the app included; an owner-upgraded app is never moved to a publisher release, 403), an instance from a deployment only to the release its deployment offers (409 OUTSIDE_DEPLOYMENT), and a release deadline that stops the upgrade (409 RELEASE_DEADLINE); organization membership; a package-bound session only about its own package and apps. /approve asks again, before the passkey, so a capability revoked while the page is open is refused there. It resolves the subject from its own state and the releases’ verified .mpk files, and freezes what the page will show. It answers { "requestId", "url", "expiresAt", "code" }; code is the request’s confirmation code, which the app or console shows before it sends the person to url. The request lives in that node’s memory, bound to the account, for 10 minutes (CONSENT_REQUEST_TTL), and can be decided once.

  2. Page. The app sends the person to url, GET /consent/{id} on the node’s own public URL. The page is static HTML compiled into merod: no app code, an inline script and stylesheet allowed by their hashes only, default-src 'none', connect-src 'self', frame-ancestors 'none', X-Frame-Options: DENY, Referrer-Policy: no-referrer, Cache-Control: no-store. It reads GET /consent/{id}/model and shows it.

  3. Passkey. The page posts POST /consent/{id}/approve once it shows the request, and again before the node’s challenge expires, so Approve asks the authenticator inside its click: browsers show a passkey prompt only close to the click that asked for it. The node runs the very route a signed-in client would run (/apps/{app}/upgrade, /orgs/{org}/releases, /orgs/{org}/outbound; "scope": "account" is the account’s only organization (below cluster version 1.0.0-rc.32 its personal organization; 400 ORG_REQUIRED when it is in several, 409 NO_ORGANIZATION in none), since an account approves nothing of its own) with the arguments frozen in the request, so the 412 CONFIRM_REQUIRED challenge commits to exactly what the page showed. On Approve the page asks the authenticator for a user-verified assertion and posts it back as confirm. A prompt the browser refuses at once without showing it, or a challenge the node no longer holds (EXPIRED_CHALLENGE, UNKNOWN_CHALLENGE), turns the button into Confirm with your passkey, whose click asks again. The node checks that the passkey is one of the request’s account, checks its authority again, writes the approval with the assertion as consent, and marks the request approved. Decline posts /consent/{id}/decline; nothing is approved.

  4. Back. The page navigates to returnTo?request_id=<id>&result=approved|declined. If that redirect is lost, the app asks GET /consent/{id}/result (sealed, the same account; any node answers, asking the node that holds the request): { "requestId", "kind", "status": "pending|approved|declined", "decidedAt" }, plus outcome once an organization request whose route answers something is approved (below).

POST /orgs and POST /invites/{token}/redeem take no passkey from a person on the cluster’s own page; through the consent page they do, so the person, not the app that sent them, creates the organization or joins it. Both step-ups are over the account (account:<id> / __create_org / { name }, account:<id> / __accept_invite / { inviteKey }) and are not logged: the log records exactly the CreateOrg and RedeemInvite the routes write. createInvite runs POST /orgs/{org}/invites itself, whose consent (org:<org> / __create_invite) is logged as always.

The node asks the rules first, before any page exists: an organization’s name (400), the inviter’s membership (404), an invite above their own role or an owner invite (403), allApps below admin (403), capabilities the inviter does not hold (403), a ttlSecs of 1 second to 90 days and at most 64 teams (400), and for acceptInvite an invite that exists, is unexpired and has uses left (404); an instance invite is shown as joining that app (its package and organization named) as a guest, or, to a member of its organization, as the member they are (invite.guest, with the invite’s scope), and, to someone outside its organization while the instance takes no guests (its release or its organization’s switch), refused 409 GUESTS_NOT_ALLOWED before any passkey is asked for. The log judges the rest (INVITE_MEMBERS, teams the inviter sees) when the approval is written.

What the approval made reaches only the account and app that asked, through the sealed /result, as outcome: { "orgId" } for createOrg (with teamId, see below), { "token" } for createInvite (the page’s own answer, which travels in the clear, never carries it), { "org" } for acceptInvite ({ "app", "org" } for an instance invite), { "orgId", "name" } for renameOrg and { "apps" } (the apps deleted) for deleteOrg; the other kinds’ routes answer nothing, and neither does outcome. The request is held in memory and never logged, so an invite token in an acceptInvite request, or minted by a createInvite one, leaves with it.

A createOrg asked from an app’s frontend (a session bound to its package) makes the organization with that app’s own team in it, in the same approval and the same log entry (CreateOrg { app_team }): the team ScopeApps would make for the package (open, the creator its lead, its members able to make channels below it), so the frontend runs its channels there at once. The page says so (appTeam { package, name } in the model), the step-up states it ({ name, appTeam }), and outcome carries the team’s teamId. On a cluster whose version is below 1.0.0-rc.22 (Feature::OrgAppTeam), or for a package not installed, the organization is made bare, as before.

createOrg also takes capabilities (bits): what the organization’s members can do unless set for them, set in the same CreateOrg entry as the creation (and the app team), so one approval covers it. createInvite takes the same field for whoever joins with the invite (the invite’s capabilities, which a new member holds as their own setting). The page lists them in full in plain words (“Members can create apps, invite people and join open teams.”), the acceptInvite page too, and the step-up arguments name capabilities only when given, so a request without them is consented to as before. Both are refused (409 FEATURE_NOT_ACTIVE) below cluster version 1.0.0-rc.29 (Feature::OrgCapabilities, Feature::InviteCapabilities).

The other organization kinds run the API’s own route as the person, with the route’s own logged consent, so the log entry is exactly the API’s and no feature gate is new:

Kind Route it runs Who may ask (judged at request time, again at apply)
leaveOrg DELETE /orgs/{org}/members/{self} any member but the owner (409: ownership moves first)
removeMember DELETE /orgs/{org}/members/{account} an admin; never the owner (403), never oneself (400, that is leaveOrg)
setMemberRole POST /orgs/{org}/members an admin; the owner for ownership (403); a current member only (404), and a change (409)
setMemberTeams POST /orgs/{org}/members/{account}/teams each row as SetTeamMember judges it: a team’s lead, or MANAGE_MEMBERS there below lead (403); 1 to 64 teams (400)
removeMemberTeams DELETE /orgs/{org}/members/{account}/teams the member themself, or whoever manages each team (403)
revokeInvite DELETE /orgs/{org}/invites/{key} whoever sees the invite (SystemState::sees_invite; else 404)
renameOrg POST /orgs/{org}/name the owner or an admin (403); a name that fits (400)
deleteOrg DELETE /orgs/{org} the owner (403); not while it owns a deployment (409)
setCapabilities POST /orgs/{org}/capabilities with team: its managers or MANAGE_MEMBERS there; without: an admin (403); a team the asker sees, a member with a row there (404)
setAllApps POST /orgs/{org}/all-apps an admin (403); a member (404), and a change (409)
setEgress POST /orgs/{org}/egress, or POST /apps/{app}/egress with app an admin (403); a member (404), the app in the organization (404), and a change (409). Turning egress back on (egress: true) is made only here: the routes refuse it elsewhere 403 CONSENT_PAGE_REQUIRED

Outside the organization every kind answers 404, and ids longer than MAX_SUBJECT_ID_BYTES (128) are 400. The page names people by the name the approver sees them by (their self-set name in the organization, else their account’s name; “you” for the approver) and teams by their names, and says what each change takes: the teams and apps a member who leaves or is removed loses, the capabilities gained and lost, and for deleteOrg the counts of members, teams, invites and apps under attention (deletes). Handing ownership over is flagged transfersOwnership, and granting MANAGE_MEMBERS, MANAGE_APPLICATION or APPROVE_RELEASES grantsManagement. Where a fact the page showed could change while it is open (a member’s role, the organization’s name, what a deletion takes, the capabilities held, the all-apps grant), /approve answers 409 CONSENT_STALE if it did.

Three kinds serve owner-approved updates (consent_page/updates.rs):

  • install { package, version?, deployment?, name, org?, newOrg?, initArgs? }: the install sheet. It shows what gets created (the app and every app its release creates with it, uses with mode: create, each with its version), where data can go over that whole unit (“Your data stays in Calimero.” or “This app can send data to: hosts.”), that updates wait for an approval (the policy the instance will follow, the defaults for a new organization), and, for an instance from a deployment, which deployment offers it (its name, id and owner; the upgrade sheet names it too, since its managers choose the release) and who pays; on the upgrade sheet, once the deployment changed hands since a person last approved an update of the instance, also who now runs it and whom it came from. A frontend asks only for its own installed package (403 otherwise); the release must be installed (409 NOT_INSTALLED: the sheet installs nothing). Approving runs POST /apps’s own code behind an unlogged step-up over account:<a> / __create_instance / { name, package, version, deployment, org }, so the log holds exactly the route’s entries; outcome is { appId, links }.
  • Update sheets (upgrade, upgradeUnit) carry update: the class (green, or red with each reason in plain words), the destinations before and after, whether it acts as the person in other apps, new methods, the state version, the apps that move with it and the policy in force. A red update that adds a destination makes keeping the current version the leading button (keepByDefault, “Keep version”). Where the policy asks for a second approver and no other owner’s or admin’s first approval waits, the sheet is Approve (1 of 2) and approving logs the first approval (POST /apps/{app}/upgrade-approvals’ code); with one waiting, Approve and update (2 of 2) applies it. A person whose own first approval waits is refused 409 SECOND_APPROVAL_REQUIRED before a page exists.
  • updatePolicy { org? | app?, policy | null }: an owner or admin sets or drops a policy; the page shows it now and after, and approving runs the route’s code (org:<org> / __set_upgrade_policy, logged).

The updates page (updates { org? }) lives at /updates/{id}. The app holds its address, so the page lists nothing until the person confirms with their passkey on the node’s origin (an unlogged step-up over account:<a> / __view_updates / { org }). Unlocked, its model is read live: for each organization whose updates the person approves, the updates waiting across its apps (at most MAX_UPDATES_PAGE_APPS read; class, versions, what changes, a first approval waiting), its policy and the apps’ own. “Review” and a policy change call POST /consent/{id}/open { kind: upgrade | upgradeUnit | updatePolicy, subject } (same-origin, unlocked only, 409 LOCKED before), which makes an ordinary request for the same account returning to the updates page. The updates page approves nothing itself, so it is kept apart from the account’s one undecided request: a newer updates page replaces it, and the sheets it opens leave it in place.

returnTo is never arbitrary: a node that redirects anywhere would lend its trusted page to phishing. For a package-bound session it must be one of the package’s origins (api::app_origin: its served frontend origin {label}.{apps-domain}, a served custom domain, or a registered origin) or an origin the package’s newest signed manifest names (links.frontend, frontendAliases); for an unbound session, one of the cluster’s configured --origins. It must be https (http only for localhost), without credentials or a fragment, and at most 2 KiB. Otherwise 400 RETURN_TO_NOT_ALLOWED.

The page is written for the person who approves, not for an engineer. The main view is short; everything else is one click away under Details. From top to bottom:

  1. Header. The Calimero logo and “Check your address bar shows host”, the page’s own host, always in view.
  2. Who is asking. What kind of request it is (“Update request”), then the app and its publisher in plain words (“Team notes by Acme Inc.”: the signed manifest’s metadata.name and author).
  3. The headline, the model’s title: “Update Team notes to version 1.5.0”, “Allow a new secure server version (2.3.131) to hold Acme’s data”, “Stop server version 2.3.128 from receiving Acme’s data”, “Allow Team notes to send data to api.openai.com”; for an upgrade, the two versions below it.
  4. Facts, one line each with an icon, risky ones first and the only ones in colour. First attention, the things not to miss: for an upgrade each entry is present only when it applies: sends data to new addresses (hosts only, shown as chips), adds a new sign-in address, lets anyone use methods without signing in (methods added or newly public), declares its stored data at another state version although an update runs no migration, removes features (methods removed), another publisher key. A withdrawal of the last approved release is flagged too. A check below that calls for care (a new publisher key, a test cluster) is repeated here. Then what holds up: for an upgrade with no attention, “No new permissions”; who signed it when the key is the expected one. Last, what happens, from the model’s first two points.
  5. The confirmation code, large, in two halves: the app or console that sent the person here shows the same one, and a different one means decline.
  6. Approve with passkey (Withdraw approval for a withdrawal) and Decline; on a phone they stay at the bottom of the screen. Once approving starts they give way to three steps (ask the node, confirm with the passkey, record the approval), and a success ends on Approved (or Withdrawn) before returning to the app. Below: the time left as a countdown, and the account approving (“Signed in as …”).
  7. Details, collapsed, its summary saying whether every check passed or how many need a look:
    • What happens: the model’s points, two to five plain sentences (what approving allows, that nothing changes until they approve, what a withdrawal stops and that nothing is deleted).
    • How you know this is legit: checks a person can make. The page is served by their node at host, not by the app; the passkey will ask to sign in to rpId, and any other site means cancel; for an upgrade or outbound request, published and signed by the publisher (the organization its key is bound to on the cluster, when there is one), with whether the key is the one the running version (or every release of the package) was signed with; for a release, built by Calimero’s public release process and its signature verified by the node, or, on mock attestation, “Test cluster: no hardware checks”. When the node is configured with an independent verifier, every kind gets a line “Check this server’s hardware and software on verifier host ↗”, a link that opens in a new tab, with the host shown as text and the ask to check that the page opens there (on mock attestation it says there is nothing to verify instead of linking).
    • Why you approve here, not in the app: the node serves the page, so an app can ask but cannot change what is shown or approve for the person.
    • Technical details: everything below, long values cut to one line with the full value as their title and selectable, and every empty list left out.
Kind Technical details, from node-side data only
Release The version; whether it is already approved and what is approved now; which of the cluster’s nodes attest it; this node’s profile if it runs it; the release’s signed measurements per profile and their digest (on mock attestation it says there are none); links to the signed release and its Sigstore-signed published-mrtds.json, with how to verify them independently; the deadline, if any
Release withdrawal The version; whether it is approved now (if not, that withdrawing changes nothing) and what else is; whether it is the only approved release, which the node refuses to withdraw; which of the cluster’s nodes attest it; this node’s profile if it runs it. No measurements: a withdrawal lets nothing in, so it never waits on fetching them. The page says what changes: the nodes that hold the data send nodes on that release no more Raft entries or snapshots, and no app is placed or moved onto them; and what does not: nothing is deleted or moved, a replica already there keeps what it holds until the operator moves it, and one that leads an app keeps leading it until leadership moves
Upgrade For an instance from a deployment, toVersion may be left out: the target is the release the deployment offers for the package it runs, resolved for a person who never installed it (any other version is 409 OUTSIDE_DEPLOYMENT); every other instance names it (400 VERSION_REQUIRED). The frontend learns there is one, and whether this person may approve it, from GET /apps/{app}/update. The page shows the app, current and target version, the publisher’s key and author, and a capability sheet computed from the two signed manifests and the calimero:abi section each component embeds: outbound prefixes added and removed; frontend origin and aliases, with every new sign-in origin listed (a page there could act in the app as the person); interfaces used and exported; methods added, removed or changed (kind, passkey confirmation, public and its rate, accepted from the system, other apps or only the app’s actions, parameters and result); events; timers; the state version each side declares (an update is code only: no migration runs); SDK and build information; the .mpk, WASM and manifest hashes
Delegation (delegate { app, target }) Let app call target as the person (As the person): both apps by name and id, and every method of target’s package that the release app runs lists in its signed uses, with any already granted; one passkey assertion over __delegate { target, methods } records it as PUT /apps/{app}/delegations/{target} does. The page is refused as stale when the release app runs changed since it was made, and the approval is refused when the methods it lists did. An app’s frontend asks for its own app only, and may not grant it through the API itself
Unit upgrade (upgradeUnit { app, toVersion }) An instance created with apps of its own (links, see Packaging, uses): the instance’s upgrade sheet and each moving member’s, built and judged as an upgrade’s, with every attention point prefixed by its app’s name; one passkey assertion over __upgrade_unit { app, package, version, targets } moves them all as POST /apps/{app}/upgrade-unit does. The page is refused as stale when any app’s running bundle, or the releases the members would move to, changed since it was made. An app’s frontend asks for its own instance; the members, other packages’ apps, are in it because the instance created them. A unit from a deployment may leave out toVersion, as an upgrade may: the deployment’s offer
Outbound The package and its publisher key, the release whose declarations are listed, the prefixes being approved, which of them are new, which are already approved
New organization The name; that the person becomes its owner
New invite The organization, the role, the teams by name, how many may join and until when, allApps, and that the app receives the link
Joining The organization, the role, the teams by name, the person’s current role there if any (they keep the higher), allApps
Egress (setEgress) The organization, or the app, and what turning egress off or on means for its data; on is a red change: attention egressOn lists the hosts approved for it, which its code may then send data to, and egress.class is red
Moderation and settings (leaveOrg … setAllApps) The organization and the people by the name the approver sees them by; the teams and apps a member who leaves or is removed loses; the role, teams or capabilities before and after; for deleteOrg the counts of members, teams, invites and apps it takes (attention: deletes, transfersOwnership, grantsManagement)

Each kind’s model also keeps the engineer’s wording: headline, before (what holds until the person approves), after (what changes once they do) and notes, shown under Technical details.

Field Kinds What it is
title all The headline in plain words
points all Two to five plain sentences: what approving means
attention all [{ "flag", "text", "items" }], what not to miss; items are hosts, origins or method names. Flags: sendsData, newSignIn, newPublic, stateVersion, removesFeatures, newPublisherKey, newDestinations (a member adds destinations) (upgrade), lastApproved (withdrawal), transfersOwnership (setMemberRole to owner), grantsManagement (granting MANAGE_MEMBERS, MANAGE_APPLICATION or APPROVE_RELEASES), deletes (deleteOrg). Empty: no new permissions
unit upgrade, upgradeUnit The update classified over the app and the apps it created (Where an update may send data): class (green or red), reasons, egress { before, after, added, removed } (the unit’s destinations; empty: no data leaves Calimero), stateVersionChanged, newMethods, removedMethods, signerChanged; a single upgrade keeps the members where they are, upgradeUnit moves them. points then add This update can send data to a new place: and the new hosts when it adds destinations, else Your data stays in Calimero. or This app can send data to: and the hosts, followed by That includes the apps it created. only when the app has members. An external endpoint, a TEE included, is a destination like any other
app upgrade, outbound { "name", "package" }: the manifest’s display name and the package id
publisher upgrade, outbound { "name", "signer", "keyChanged", "org" }: the manifest’s author (null when it names none), the verified signing key (did:key), whether it differs from the running version’s, and the organization the key is bound to on this cluster ({ "id", "name" }, from BindPublisher; null while unbound). The page names that organization as the publisher when there is one
release.deadline release { "after", "afterSecs", "passed" } when the operator set an end-of-new-work deadline for the version (SetReleaseDeadline, GET /releases), else null; points then say it in plain words (“After Nov 15, 2026 (UTC), new apps, installs and updates for Acme’s apps pause until this version (or a newer one) is approved”)
requestedBy all { "package", "name", "publisher", "returnOrigin" }: the asking package (a package-bound session’s, else null), its newest release’s display name and author
rpId all The relying party ID the passkey prompt will name
code all The confirmation code
verifier all { "url", "host", "release", "mock" } when the node has --attestation-verifier-url, else null: the link to the independent verifier for this node (its --public-url) and its own mero-tee release, the verifier’s host to show beside it, and whether the node runs mock attestation (then the page does not link)

The author and display name are what the publisher wrote in the signed manifest; the node verifies the signature and the key, not that the name is true. The page says which key signed.

Everything the page says about the node comes from the node. A tampered node could serve a page that says anything, including a green “verified”: a check run on this page, by this page’s script, proves nothing. So the page does not check the node’s attestation itself; it links to a verifier that does, on its own origin. Calimero runs one at https://verify.calimero.network, and the operator names it with merod --attestation-verifier-url (merod). The link has the shape mdma uses for each node:

{verifier}/mero-tee?node_url=<the node's public URL, no trailing slash>&release_tag=mero-tee-v<release>

The verifier fetches the node’s quote over a fresh nonce and checks it against the signed measurements of that mero-tee release. Since the page is the node’s, it could also link to a fake verifier; that is why it shows the verifier’s host as text next to the link and asks the person to check that the page opens there, as it asks them to check its own address. The link opens in a new tab (target="_blank", rel="noopener noreferrer"); it is plain navigation, so the page’s content security policy is unchanged. On mock attestation there is no quote to verify, and the page says so instead of linking.

A short code that ties the page to the request the person’s own app or console made, so a link to another request (on the same node) shows a different code. The create answer and the model both carry it as code; a client can also compute it:

  1. Take SHA-256 of the request id’s UTF-8 bytes.
  2. Read the first 4 bytes as a big-endian unsigned 32-bit integer and keep its top 30 bits.
  3. Write them as six 5-bit groups, most significant first, each as a character of Crockford’s base32 alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ.
  4. Put a - after the third: XXX-XXX.

For example, 1.AAAAAAAAAAAAAAAAAAAAAA is R02-9P2 and 2.q7Xb3kR0fLzM8nW1yVt5cA is 54E-429 (consent_page::confirmation_code). The code is not a secret and proves nothing on its own: the passkey’s challenge is what binds the approval.

The model is what the app can neither write nor alter: it is frozen when the request is made, from the node’s state and the releases’ verified manifests. App-controlled strings in it (a package’s display name, URLs) are rendered as text only.

Kind The passkey signs confirm_challenge(subject, method, args, nonce) with args =
Release { version, policyDigest }: policyDigest is SHA-256 of the release’s Sigstore-verified measurements as the node reads them when it writes the approval, so a release re-published under the same tag with other measurements is another approval. A node that cannot fetch them refuses (503); on mock attestation, where no node checks measurements, the digest is over none ({ "profiles": {}, "version" })
Upgrade { bundle, migrate, manifest }: the target WASM’s hash and the target release’s signed-manifest hash (VerifiedBundle::manifest_hash: SHA-256 of the canonical manifest, every artifact digest included; null only for a raw development bundle, which has no manifest)
Outbound { package, prefixes, replace }, with the prefixes listed on the page, never "manifest"
createOrg account:<a> / __create_org / { name }, with appTeam (the package) when the asking app’s team comes with it and capabilities when given (not logged; the log records CreateOrg as POST /orgs writes it, with app_team)
createInvite org:<org> / __create_invite / system::invite_args (logged, as the route’s)
acceptInvite account:<a> / __accept_invite / { inviteKey } (not logged; the log records RedeemInvite)
leaveOrg, removeMember org:<org> / __remove_member / { account } (oneself for leaveOrg)
setMemberRole org:<org> / __set_org_role / { account, role }
setMemberTeams org:<org> / __set_team_members / { account, teams }
removeMemberTeams org:<org> / __remove_team_members / { account, teams }
revokeInvite org:<org> / __revoke_invite / { inviteKey }
renameOrg org:<org> / __rename_org / { name }
deleteOrg org:<org> / __delete_org / { org }
setCapabilities a member’s: org:<org> / __set_capabilities / { team, account, capabilities }; a default: __set_default_capabilities / { capabilities } or { team, capabilities }
setAllApps org:<org> / __set_all_apps / { account, allApps }
setEgress org:<org> / __set_egress / { app, egress } (app: null for the organization)

Before asking for the passkey and again before writing, the page checks that what it showed still holds: the app still runs the bundle it ran, the target version is still the same .mpk, the package’s newest release (whose declarations it listed) is still the same. Otherwise 409 CONSENT_STALE, and the app asks again so the person sees the new facts.

The routes bind the same arguments whoever calls them: POST /apps/{app}/upgrade, POST /orgs/{org}/releases computes the manifest hash and the measurements digest themselves, and the challenge they hand out commits to them. A target or release that changes between the 412 and the assertion no longer matches the challenge, and the approval is refused. Withdrawing a release lets nothing in and binds { version } alone, through the page ("withdraw": true) as through the route; the node fetches no measurements for it, so revoking a bad release never waits on the network. The last approved release cannot be withdrawn: /approve answers 400 REJECTED (“the last approved release cannot be withdrawn”) after the passkey, and the request stays pending. A withdrawal the person confirms is reported like any consent: result=approved (they approved the withdrawal).

Limit Value
A request’s life (CONSENT_REQUEST_TTL) 10 minutes
A decided request’s result stays readable (CONSENT_RESULT_TTL) 10 minutes after the decision
Requests one node holds (MAX_CONSENT_REQUESTS) 1,000, then 429
Undecided requests per account per node 1: a new request replaces the older one, whose page and /result then answer 404
returnTo (MAX_RETURN_TO_BYTES) 2 KiB
Prefixes in one outbound request (MAX_REQUESTED_PREFIXES) 64
Request and page bodies (MAX_CONSENT_BODY_BYTES) 64 KiB
  • The page travels under TLS, not the sealed channel. A browser cannot open a sealed session without a client library, so the page, its model and the approve and decline posts are plain HTTPS to the node. Whoever terminates TLS in front of the node can read what is being approved and could serve another page in its place. It cannot change what is approved (the arguments were fixed inside the sealed channel when the app asked, and the passkey signs a challenge over them), and cannot approve without the person’s passkey. Terminate TLS inside the TD to close this. Calimero Cloud does: the node’s TLS key is made inside the TD and certified only against its attestation, and mdma watches Certificate Transparency for any other certificate on its names.
  • What a forged page could still do. Serving a page on the node’s own host, it could show one request’s words and ask the passkey for another request of the same account. Two rules leave it nothing to swap in: an account has one undecided request per node (a new one replaces the older, whose page and /result answer 404), and an app checks, after the redirect, that /result reports its own request decided (the SDKs’ consent helpers do). Answers carry Strict-Transport-Security, so a browser that has seen the page over TLS never loads it over plain HTTP.
  • The relying party. The passkey must be usable on the node’s origin: the cluster’s --rp-id must be a registrable suffix of the node’s host. The node accepts consent-page assertions from its own nodes’ origins and the cluster’s --origins, never from an app’s origin, and refuses a passkey ceremony run in a frame another site embeds (crossOrigin, topOrigin). A decision posted to /approve, /decline or /open must name one of the node’s origins in Origin, or, naming none, come as the browser’s own same-origin request (Sec-Fetch-Site: same-origin); anything else is 403.
  • Requests live in one node’s memory. A restart forgets them; the app asks again. The page is on the node that issued the request (its url).

Where the node implements this chapter, by the names in its code: paths are under crates/node/src unless another crate is named. The design and its reasons are above; a module’s own detail is in its //! doc, and the node’s mental model is crates/node/AGENTS.md.

Code: consent_page.rs; docs: protocol “The consent page”.

An app (any session of the account, package-bound included) asks POST /consent/requests { kind: release|upgrade|upgradeUnit|delegate|outbound|createOrg|createInvite|acceptInvite|leaveOrg|removeMember|setMemberRole|setMemberTeams|removeMemberTeams|revokeInvite|renameOrg|deleteOrg|setCapabilities|setAllApps|install|updatePolicy|updates, scope?, subject, returnTo } (sealed; a release subject is { version, withdraw? }, withdraw: true withdrawing its approval) and gets { requestId, url, expiresAt, code } (consent_page::confirmation_code, shown on the page and by the console); returnTo is the package’s own frontend origin or one its newest signed manifest names (unbound sessions: config.origins). The request (this node’s memory, CONSENT_REQUEST_TTL, one undecided request per account and node (a new one replaces it, so a forged page has no other request to swap in), a per-node bound, decided once; page answers carry HSTS) freezes a model from node state and verified manifests (an upgrade’s capability sheet is consent_page::diff, its methods, events, timers and state version from the calimero:abi each component embeds, component::embedded_abi). GET /consent/{id} (static HTML in the binary, hash-only CSP, frame-ancestors 'none'), /model, /approve, /decline are an outer layer in the clear on the node’s own origin (outside CORS and the sealed channel); /approve runs the same route code (api::upgrade_app, set_release_approval, set_outbound_approval) as a Principal { consent_page: true } for the request’s account, so the 412 CONFIRM_REQUIRED challenge is over the frozen arguments, and the step-up may come from the nodes’ own origins (consent_page::relying_party). Upgrade consent always binds the target’s manifest hash (VerifiedBundle::manifest_hash); a release approval always binds its measurements digest (consent_page::release_digest: Sigstore-verified, 503 when unfetchable, over no measurements on mock attestation); a withdrawal binds { version } alone and fetches nothing (ReleaseChange::Withdraw); neither route takes the hash from the client. GET /consent/{id}/result (sealed, same account; forwarded to the holder over internal/consent/result). Package-bound sessions are still refused the approval routes themselves. createOrg { name }, createInvite { org, role, teams?, ttlSecs?, uses?, allApps? } and acceptInvite { token } are how an app’s frontend manages organizations (refused POST /orgs, invites and redemption): act runs api::create_org, api::create_invite (its own logged __create_invite consent) and api::redeem_invite, the first and last behind an unlogged step-up over account:<a> (__create_org { name }, __accept_invite { inviteKey }), so the log entries are exactly the API’s and no feature gate is needed. What the approval made (orgId, the invite’s token, the org joined) is kept with the decision (ConsentRequests::decide, Outcome, redacted in Debug as InviteToken is) and answered as /result’s outcome, never in the page’s clear answer. A createOrg from a package-bound session also makes that package’s app team (Action::CreateOrg { app_team }, consent_page::org_app_team: the package installed and Feature::OrgAppTeam active, else a bare organization), in the same CreateOrg { app_team } entry: apply runs SystemState::scope_apps for the package with no instances (ScopeAsLogged::CURRENT, standalone, nonce {org}/app-team, so the team id is the same on every replica) and takes the organization back on a refusal; outcome gains teamId, the model appTeam, the step-up appTeam. createOrg { capabilities } sets the org’s member default in that same entry (CreateOrg { capabilities }, after the app team, Feature::OrgCapabilities); createInvite { capabilities } is Invite::capabilities, which a new member holds as their own Org::capabilities entry (Feature::InviteCapabilities), refused above the creator’s own bits (Org::may_grant, in CreateInvite‘s apply and asked first by the route and the page); the page lists the bits in full (consent_page::capabilities_point), the step-up names them only when given. Moderation and settings (consent_page/orgs.rs): leaveOrg { org }, removeMember { org, account }, setMemberRole { org, account, role }, setMemberTeams { org, account, teams: [TeamRow] }, removeMemberTeams { org, account, teams }, revokeInvite { org, inviteKey }, renameOrg { org, name }, deleteOrg { org }, setCapabilities { org, account?, team?, capabilities } (both shapes) and setAllApps { org, account, allApps }. Each is judged at request time with the log’s predicates (role, a team’s lead or MANAGE_MEMBERS, sees_invite; system::judge_team_rows and judge_remove_team_rows run the batch rules on a copy of the org) and the routes’ feature gates, and act runs the route’s pub(crate) function (api::remove_member, set_member_role, set_member_teams, remove_member_teams, revoke_invite, rename_org, delete_org, set_capabilities, set_all_apps), so consent and log entry are the API’s. still_current refuses a page whose role, name, deletion counts, capabilities or all-apps grant changed (409 CONSENT_STALE). People are named as the approver sees them (Org::member_metadata name, else the account’s). The route’s non-empty answer is the outcome (renameOrg, deleteOrg). With Config::attestation_verifier_url (merod --attestation-verifier-url, checked by consent_page::verifier_base) model adds verifier { url, host, release, mock } for every kind (null without it): mdma’s link {base}/mero-tee?node_url=<public_url>&release_tag=mero-tee-v<own_release> (verifier_link). The page links to it (new tab, host shown as text, “check it opens there”) and runs no check itself: a tampered node could fake any in-page verdict, so the check runs on the verifier’s own origin. On mock attestation it says there is nothing to verify.

(C10; consent_page/updates.rs; docs: protocol consent page “Installs, updates and update policies”, build “Show updates in your app”.)

The words (reason_words, update_summary, policy_words) shared by the sheets, the updates page and GET /apps/{app}/update’s available.summary (the design’s GET /apps/{app}/updates: /update already answers it; unit says whether members move with it). Consent kinds: install (install_request: a bound frontend asks for its own installed package only; the release installed already, 409 NOT_INSTALLED; the unit from egress::release_unit; act runs api::apps::create_installed (POST /apps‘s create_instance, from_frontend for the bound session’s visibility) behind an unlogged account:<a> / __create_instance step-up; outcome { appId, links }; install.privateTo names the reader’s organizations a private release is for; installing with no org, a private release in exactly one of the person’s organizations is created there (filled in as org), else they choose among its organizations they are in, or, with none of those or a public, catalog or earlier release, among all of theirs when several (install.chooseOrg, each with its own first point; org_choices), and POST /consent/{id}/approve { org } takes the choice into the action before the step-up, so the passkey signs it (with_chosen_org: none 400 ORG_REQUIRED, not theirs 404, offered nothing 400; regression the_install_sheet_offers_the_organizations_a_release_is_for), updatePolicy (policy_request; act runs api::set_upgrade_policy, the routes’ shared code), and the upgrade sheets’ update (update_section: class, reasons in words, destinations, state version, policy, approval { needed, step: only|first|second }, keepByDefault for a red update adding a destination). approval_step: under secondApprover a red (or unclassified) update with no other approver’s live first approval is Action::ApproveFirst (“Approve (1 of 2)”, act runs api::approve_upgrade, the upgrade-approvals route’s code); with one, the usual upgrade (“Approve and update (2 of 2)”); the person’s own waiting is 409 SECOND_APPROVAL_REQUIRED. The updates page (updates { org? }, Action::Updates, served at /updates/{id}) lists nothing until an unlogged __view_updates step-up (its address is the app’s), then page_model reads hub_model live (MAX_UPDATES_PAGE_APPS); POST /consent/{id}/open (same-origin, unlocked, 409 LOCKED) holds an ordinary child request returning to it. ConsentRequests::insert keeps it apart from the one undecided request per account (is_hub). No feature gate: the log entries are the routes’.