Skip to content

Identity in depth

How the forge knows who is acting: people signed in through their organization's provider with a second factor, agents born as signed records into the log, every connection proving its key, and stops that reach everything below.

People and agents gives the shape: people at the roots, agents born from them, power that only narrows. This chapter is how each part works, and what the forge can and cannot vouch for.

No accounts, no certificate authority

There is no account to create for an agent, no certificate authority to run, and no list of owners to keep. Identities form a tree whose every line ends at a person. The tree lives in the organization’s receipt log, one signed record per birth, sign-in and stop. The organization’s identity provider is the only outside system involved, and only for people.

A person signs in

A person signs in with an OpenID Connect ID token from the organization’s identity provider. af auth gets one through the browser with OAuth’s device flow (RFC 8628), as gh auth login does: the forge names its issuer and client id, af shows a code to enter at the provider’s page, and polls as the RFC says.

The forge checks the token as coreos/go-oidc does:

  • the issuer’s discovery document and keys, read again when a token names a key not yet seen;
  • asymmetric signature algorithms only;
  • the token’s issuer, its audience (the forge’s client id), and its expiry, with no allowance;
  • a second factor in its amr claim (RFC 8176), mfa unless the operator configures otherwise.

Some providers’ tokens do not say how a person signed in. For those, the operator may declare that the provider itself requires a second factor (af-server --oidc-second-factor-by-policy). Each sign-in’s record says whether its second factor was reported in the token or rests on that declaration, so an auditor can tell the two apart. A token that reports how the person signed in, without a second factor, is refused either way.

Each sign-in records a new key for the person, made on their machine, and expires with the token.

Every connection proves its key

On each connection, over WebTransport or WebSocket, the actor signs a value exported from the connection’s own TLS session (RFC 8446 §7.5) with its key. That proves the key, cannot be replayed on any other connection, and makes every request on the connection the actor’s. A connection acts for exactly one actor. Keys are Ed25519, as the receipts’ are.

An agent is born

Whoever starts an agent, a person or another agent, signs its birth record, a DSSE envelope. The forge checks it, adds its own signature, and puts it in the log in the same transaction that makes the agent live. The record is the agent’s identity, and its hash is the agent’s id. It names:

  • its key, made where the agent runs, whose private half never leaves there;
  • its parent;
  • what it is: its program and version, its model, and a hash of its starting instructions;
  • what it is for: a sentence, and its task or change if it has one;
  • what it may do: its roles, folders and keys, and when it stops.

What the forge cannot know. The forge cannot check which model an agent runs or what its instructions say. The record says who claimed them, and signed the claim. A change of model or instructions is therefore always a new birth, never an edit, which is the question auditors ask.

Power only narrows. An agent’s roles, folders and keys are never more than its parent’s, and it expires no later than its parent. An agent a person’s line starts is a reader or a writer; only runners approve, by their checks.

Only an agent that talks to the forge is born there. A sub-agent that works only through its parent, as many do inside one program, is part of its parent, and what it does is its parent’s doing.

The live tree

The state database keeps the live tree: each live actor’s id, parent, key, roles and expiry, indexed by parent so that a stop finds everything below at once. A row goes when its actor stops or expires; its records stay in the log for good.

Every request but a sign-in needs its connection’s actor live, with the roles the request needs. Every write names its actor, and a change keeps each writer’s line, which its landing’s provenance names.

Stopping

Anyone above an agent in its line, or an administrator, stops it with a signed record. From then on the forge refuses it and every agent below it, and closes their connections. Expiry does the same without a record. Stopping a person’s sign-in stops every agent it started.

Runners

Runners are born from the forge, not from a person: an administrator enrolls one by a request, and the forge signs the runner’s birth as its parent. A runner is never in an author’s line, so no author runs or signs the check of its own change; the change’s code does run inside that check (see Testing and landing). It reads every folder, writes none, approves only by its checks, and starts no agent. As the forge’s own machine it has no expiry, and acts until an administrator stops it.

Not built yet

  • Stopping everything under a person when they leave the organization.
  • Removing the rows of expired actors, which are refused but kept.
  • How long a sign-in and an agent may live is still open; an agent lives at most a day for now.

Next

Type to search…

↑↓ navigate↵ selectEsc close