ctx.frame.as describes the principal for this invocation. Its fields
include id, kind, for, email and phone.
idis the principal’s stable, kind-qualifiedPrincipalId:person:…for a signed-in person,service:…for a service, andanonymous:…for a signed-out caller. A signed-out client is one anonymous principal for the whole registered session its calls arrive on (a call on no session is its own), and two sessions’ principals cannot be linked. It holds no grant of its own: only an entry whoseallownamesrole.anyoneadmits it, through that class grant, and a trial of its call admits it exactly as the call would.kindis"person","agent"(a principal acting under a delegation grant),"service","installation"or"anonymous". An exposed function whoseallowexcludesrole.anyonealso excludes"anonymous"from the type ofctx.frame.as.kind. Internal functions, reactions and mutations declared withby: "app"keep the full union.- In an agent’s frame,
idnames the agent andfornames the delegator. The kernel derivesforfrom the agent’s live delegation grants, never from the call. Aoncekey uses the agent’s id. emailandphonehold verified contact details. Each isnullwhen the host has no trusted verification for it.
allow: [role.signedIn] admits every authenticated person, and
allow: [role.anyone] admits signed-out callers too. Each is a
class grant the program issues at install
and the lock prints; nothing is ambient. A function with no allow is
internal. To give a principal more
than that, grant it a role.
The same principal is the as root of every guard, so a
rule about the person rather than the role is a guard on its claims:
id in a t.principal field when a fact must name its author or
owner. See Storing users.