Auth: identity & profiles
Today, a room can be identified by data the person types, and that data can be proved with a one-time code the tenant sends. Profiles say who may call which operations: everything is closed until a profile opens it.
Identifying a room: identifies: true
A form field marked identifies: true identifies the room, under the field's name, as soon as
the guard accepts the form. This holds for a skill's form (its form guard, in select.guards) and for the submit
guard's (submit_guard.form).
select:
guards:
- form:
address: {type: text, required: true, label: "Delivery address"}
phone: {type: phone, required: true, label: "Phone", identifies: true}
Then:
- The room does not ask again. The room's next forms — the same card shown again, another form
with a
phonefield, the submit guard — are published without that field, and Core answers it itself. A form left with nothing to ask is no longer shown. - The submit sends it. An item's field is read with
$item.fields.phone; a submit guard field with$submit.phone(see The submit). - A new answer replaces the old one. If the person types another number, that is the one the room keeps.
- The model knows the room has a phone, never which one. The room summary gives it the name of the data, so it does not ask again.
This is declared data: typed, not proven. It stays with this room and never finds another one; anyone can type someone else's number.
Only a field of type text, email or phone can identify a room
(the types). At load time, Core refuses
identifies with any value other than true, on a field of another type, and one name declared by
two forms with different types: the room would fill one with the other's answer.
Every door recognises the same person. Data typed in Claude and the same data typed in ChatGPT point to the same room: there is nothing for you to configure for that.
Proving data: a one-time code
The station declares its identity providers in station.identity.providers. One mechanism
exists today: otp, a one-time code the tenant sends and checks with its own operations
(via: tenant).
apis:
- name: identite
openapi_url: https://api.example.com/openapi.json
operations:
- {id: sendVerificationCode, access: write}
- {id: checkVerificationCode, access: write}
station:
identity:
providers:
email:
mechanism: otp
verifies: customer_email # the name of the data proved
via: tenant
send: sendVerificationCode # sends a code to the value
check: checkVerificationCode # says whether the typed code is right
- What the operations receive.
sendreceives the value under the data's name (customer_email);checkreceives the value andcode. Core reads in each operation's schema where it takes them, as a parameter or in its JSON body; the body is better, since an address and a code have no place in a URL that logs keep. An operation that does not take these names is refused at load time. - Only an explicit yes counts.
checkanswers{"verified": true}(ortrue). Any other answer —verified: false, no verdict, an error — means no. - The model never leads the proof. It holds
sign_inalone. In Claude and ChatGPT, the host's sign-in window asks for the datum and the code. With no value typed, the code goes to the one the room already declared. A value typed to receive a code is the one the check uses. verifiesnames a field that identifies the room (identifies: true): the room then holds the value, and the code goes out without the model repeating it.- One spelling per type. Before it is declared, sent to the tenant in the submit, or proved, a
value is written one way, by the field's type:
emaillower-cased,phonein international form (+33…). A national number (06…) is not guessed: the tenant receives it as typed, and no code proves it. - A right code makes the data verified, and the room becomes the person's. Its owner is an opaque id derived from the value, never the value. The same person can prove another datum in their room (the phone after the e-mail); another value for a datum already proved, or a room claimed with nothing proved in it, belongs to someone else. A proof always signs in the person who makes it. A call with no browser key (a script, a stale bundle) is refused before any code is sent: it would sign no one in.
- The model learns which data is proved, never its value. The room brief says "Proved in this room: customer_email".
- Convoy never sees the code sent. The tenant keeps it and limits its lifetime and its tries; Core passes what the person typed and records the answer.
- Core counts wrong codes too, whatever the tenant does. After five wrong codes for one value, it stops asking the tenant for a quarter of an hour; a new code sent starts a new count. It sends no more than five codes an hour to one value, and that count does not start again. The counts live in the rooms database: every door shares it, and a restart does not clear it. It is kept under the value's fingerprint, never the value.
At load time, Core refuses a mechanism other than otp, a via other than tenant, a send or
check missing, declared by no API or not taking these names, a verifies no identifies: true
field carries, and data a form declares as a number.
Who is signed in: the holder
A proof signs in the person who made it, on this surface, not the room. The host keeps a key of its own, which Core stores only hashed. A right code binds that host to the person:
- a room's code gives no rights. Someone who opens with its code a room that belongs to no one sees the selection, but is not signed in for that. A room that has an owner opens only to them, signed in (Context);
- the person stays signed in from one visit to the next, on that host. A room they open that belongs to no one becomes theirs; someone else's stays someone else's;
- their rooms follow them: signed in, a person who arrives without a room code (a new device,
Claude, ChatGPT) finds the room they used last, wherever it was. The
room_listtool lists their other rooms, by what they are about, never by what was said in them. Reading a room, or opening it with its code without owning it, does not change the room they come back to; - a sign-in nobody uses ends: after
station.identity.idle_minutesunused (a week by default, counted from the last use), the person signs in again. Se déconnecter (POST /api/identity/sign-out) ends it at once, on the server. This is what protects a shared computer; - the model knows whether the person is signed in, by names only: "Signed in on this surface" or "Not signed in";
- the conversation opens with an invitation to sign in, in the frame of the room's opening (Claude, ChatGPT);
submit_guard.submitted_by: [{who: owner}]reserves the submit to the room's owner, signed in: the room's code is no longer enough. It is written on the station's submit guard or on a playbook's; inside a playbook, the stricter of the two rules wins.owneris the onlywho: another is refused at load, with the reason (the actor it names, an agent, an approver or a role, does not exist yet). On Claude and ChatGPT, the submit asks for the host's sign-in. Once the person is signed in, they finalise themselves: Core tells the model to show them their selection again, never to finalise for them. The address and the code go from the frame to Core: the model never sees them. A datum the room already holds is offered without being shown ("Use the one you already gave"). A tenant's refusal shows in its own words. Recommended for every station that places orders: without a sign-in, nothing tells the customer on another device from a stranger holding the code. Where the station can sign people in without requiring it, the selection invites a sign-in before finalising, without making it;
On Claude and ChatGPT, signing in goes through the host. As soon as the station declares a
provider, the tenant's MCP server is also an authorization server (OAuth 2.1, the MCP
authorization method both hosts follow). The connector installs without signing in. When the person
asks to sign in, the model calls sign_in: Claude or ChatGPT opens its sign-in window, which leads
to the tenant's page on this server, with the same steps (the datum, the code). The host then keeps
the token: the person stays signed in from one conversation to the next. On Claude, opening
someone's room unsigned, with any tool, opens that window too: an owned room opens to its owner
only.
On Grok, signing in happens when the connector is added. Grok runs the sign-in only then: a tool that asks for it later looks broken to it. On a station that signs people in, Grok therefore asks for the sign-in as soon as the connector is added, and cannot be used there without it. A connector added before this change must be removed and added again.
Only known hosts register. A host registers with the authorization server before signing anyone
in, giving the address to send the person back to. It must be https on a host the station serves,
exactly (claude.ai.evil.com is not claude.ai), or the person's own machine for an installed app.
By default: claude.ai, claude.com, chatgpt.com, grok.com. A station may give its own list in
station.identity.hosts, which replaces this one; a name with a scheme, a path or a port is refused
at load.
- The token is valid for this server's tools only; it carries the person's opaque id, never the e-mail; Core keeps only its hash, and it never goes to the tenant's API.
- The model holds
sign_inalone; it sees neither the datum nor the code.
See the target's authentication flow.
Profiles: who may call what
Everything is closed by default. An operation of the tenant's APIs is called for no one until a
profile is granted it. A profile is a condition on the caller's identity (when) and the
operations it is granted (grants), named by their API: <api>.<operationId>.
profiles:
anonymous:
when: "$identity.authenticated == false"
grants:
- lecture.listTeams
signed-in:
when: "$identity.authenticated"
grants:
- lecture.listTeams
- lecture.getTimesheets
A station that signs no one in writes one profile, for everyone:
tous: {when: "true", grants: [...]}, like the examples of this guide.
- Grants add up across the profiles an identity holds. The anonymous visitor is no exception: what they may do, a profile whose condition they meet is granted.
- A grant is on the operation, not on the skill. An operation is reached by a skill's
invoke(itsmethod, or theoverlist of a native search or bundle), by acheckor anupdateofselect, by a submit call and thechecks of itsextra_lines, or by a submit guard'svalidate. Guarding it guards each of these paths.
What when reads: the identity of whoever calls, on this surface. Never the room.
| write | meaning |
|---|---|
$identity.authenticated | signed in on this surface (the holder) |
$identity.verified | the names of the data they proved, read with in: 'email' in $identity.verified |
$identity.provider | the provider that signed them in |
$identity.type | person, always today |
true | everyone |
It is the language of the other conditions (Conditions);
a reference keeps its $.
Core checks twice.
- At the decision point, before the action (phase 1, rule
grant). When a skill is called: the operation it calls. When an item is chosen: theinvokethat showed it, and thechecks andupdateof itsselect. At the submit: every call it may make (those of its lines' kinds and thechecks of theirextra_lines, those of the open playbook, its submit guard'svalidate), all before the first call: a submit is never half allowed. The refusal has the codenot_granted; the journal keeps the operation (<api>.<operationId>), never a value. - At the exit. Every call to the tenant goes through one place, which reads the config's grants
again for the caller. A call refused there does not leave, and the journal writes it (action
call, rulegrant). If the first check were wrong, the call still would not leave.
Two kinds of calls pass without a grant, and only these: the identity providers' operations
(send, check) called by the sign-in itself, because proving who you are gives an identity, it
is not a right — named anywhere else (a submit call, a check) they are refused at load, and
called outside the sign-in they are refused at the exit; and the
provisioner's checks at publication (the extra_lines lines, the lists of native searches),
because profiles apply to people, never to the operator.
A price update whose answer is not ok (refused at the exit, or by the tenant) refuses the item:
it is never kept at its listed price. An identity that cannot be read is the anonymous visitor's:
the load says (a note) each operation an anonymous profile is granted and no signed-in profile is.
Refused at load:
- an operation the station reaches that no profile is granted: it would be refused to everyone, at
every call. The message names the path that reaches it (
skills.feuilles.invoke); - a grant that is not
<api>.<operationId>of a declared operation; anexposed: falseoperation; a grant written twice; a provider'ssendorcheck; - one
operationIddeclared by two APIs: a grant would not say which; - a profile no one can hold today: neither the anonymous visitor nor an identity a provider of the
station proves (
'phone' in $identity.verifiedwith no provider thatverifies: phone); - in
when:$identity.declared(data typed in a room proves nothing about who calls); any other attribute (roles,teams,org,limits,plans…), which no provider gives yet;$identity.type == 'agent'; a reference without$, or outside$identity;$identity.verifiedread other than within.
A config without profiles that calls operations is refused at load (everything is closed by
default); the tool that writes them from what it calls is
not yet available to you.
Within what the grants opened, the permission guard keeps the choice of an item to some profiles
(Policies).
Asking for the sign-in
A skill may call an operation the anonymous visitor is not granted, but a signed-in profile is. If a provider of the station can sign the person in, Core does not refuse: it holds the call, without calling the tenant, and each surface asks for the sign-in. It is the host's window (Claude, ChatGPT). Once the person is signed in, Core reminds the model of the pending call, with the same arguments, and the model runs it again: the person has nothing to ask again. The pending call expires after 30 minutes, and a new one replaces it. The skill's description tells the model it needs a signed-in customer; it never asks for a code itself, and it does not repeat to the person the instruction Core gives it while waiting.
When an item is chosen and at the submit, a missing grant is a refusal (not_granted). The
target asks for the sign-in there too.
The person's own token
Once signed in, the person is served on their behalf. If the tenant's check answers with a token for that person, Core keeps it and sends it on the calls made for them: the tenant's API then answers for them, with their scope and their refusals. Profiles say which operations they may call; the tenant decides what each person sees there.
apis:
- name: lecture
openapi_url: https://api.example.com/openapi.json
operations:
- {id: listTeams, access: read}
- {id: getTimesheets, access: read}
- {id: sendVerificationCode, access: write}
- {id: checkVerificationCode, access: write}
auth:
type: api_key # the station's key: what anyone may ask
key_name: X-Api-Key
key_location: header
key_env: EXAMPLE_API_KEY
person: {provider: email} # + the signed-in person's token (Authorization: Bearer …)
profiles:
anonymous: {when: "$identity.authenticated == false", grants: [lecture.listTeams]}
signed-in: {when: "$identity.authenticated", grants: [lecture.listTeams, lecture.getTimesheets]}
skills:
- name: feuilles
invoke: {method: getTimesheets} # only `signed-in` is granted it: the surface asks for the sign-in
station:
identity:
providers:
email:
mechanism: otp
verifies: email
via: tenant
send: sendVerificationCode
check: checkVerificationCode
credential: access_token # the field where `check` returns the person's token
- Where it lives. With the person's sign-in (the holder), encrypted in the database. Never in a room, an event, a log, what the model reads, or an answer to the surface.
- When it is sent. Only on the calls Core makes for that person: their skills, their submit.
person.headerandperson.schemechange the header (Authorization,Bearer). - When the tenant no longer accepts it. A 401 to a call that carried it signs the person out, and the surface asks them to sign in again. A 401 to a call that did not carry it comes from the station's key, and signs no one out.
- Data no form asks for (a tenant that sells nothing) is for signing in only: the person types it
into the sign-in steps. The provider's
type(text,emailorphone) then says how to ask for it and how to write it; a form that declares it must have the same one. - At load, Core refuses an
auth.personnaming a provider withoutcredential.
The Shiftly demo shows it: [email protected] sees her two teams, [email protected], the manager,
all four; the codes show on /demo/inbox.
Get a Shiftly API key. To connect your own station to Shiftly, get a key on
https://shiftly.convoy-ai.com "as Anta or Camille": choose [email protected] or
[email protected] (any other address is refused), enter the code shown on
https://shiftly.convoy-ai.com/demo/inbox, and the key is shown once. Paste it on your station's key
page in the Console. The key identifies the integration, not a person: it opens the team directory.
For data, the person signs in in the station with a code, the same way.
What does not exist yet
- No SSO, no tenant login, no code sent by Convoy itself (
via: convoy). - No silent sign-in from a company's SSO (Claude's "Enterprise Managed Auth"), and no Client ID Metadata Documents: hosts register dynamically.
- Every host offers all of the station's providers: it does not pick its own yet.
- Without
credential, an API's key is the station's key: for the tenant's tool, everyone is the same person (Sources). - A profile reads only
type,authenticated,verifiedandprovider: no roles, no teams, no sub-identities, no$identity.declared. Noper_profile, nopermissioninpresent. - The sign-in is asked for only when a skill is called; when an item is chosen and at the submit, a missing grant refuses.
The target adds the other providers, the attributes they give, sub-identities, and what a profile sees: Identity, Profiles, Permissions.
What it looks like
Shiftly. Without signing in, someone asks for a team's overtime. getOvertimeReport is only open to the signed-in profile: instead of refusing, the station asks the host for the sign-in — the e-mail, then a code.
profiles:
anonymous:
when: "$identity.authenticated == false"
grants: [shiftly.listTeams]
signed-in:
when: "$identity.authenticated"
grants:
- shiftly.listTeams
- shiftly.getTimesheets
- shiftly.getOvertimeReport
Terre & Table. The selection is complete (products and delivery), but only the room's owner can finalise it: the station asks to tick the confirmation and to sign in with a code sent to the e-mail already given in the form.
station:
identity:
providers:
email:
mechanism: otp
verifies: customer_email
via: tenant
send: sendVerificationCode
check: checkVerificationCode
submit_guard:
confirm: true
submitted_by: [{who: owner}]
Shiftly. Signed in, Camille asks about a team she does not manage. Convoy sends her token to Shiftly, which decides her scope and refuses: the host reads Shiftly's sentence. The model never holds the token.
apis:
- name: shiftly
auth:
type: api_key
key_name: X-Shiftly-Key
key_location: header
key_env: SHIFTLY_API_KEY
person: {provider: email} # the signed-in person's token
station:
identity:
providers:
email: {mechanism: otp, verifies: email, via: tenant, credential: access_token}