0026. Services act for people only through delegations in id
Status: accepted, 2026-10-21
Context
notify's Telegram bot and the assistant in ai need to act as a person who isn't the one calling: a rollback
pressed in a chat, a restart the assistant proposes. The shortcuts are unsafe. Keeping a person's refresh
token in the acting service races its rotation and gives the service the person's full power for 30 days;
reusing a panel session's tokens does the same. And today a press in a Telegram group can't even be tied to a
person.
Decision
- A delegation is a record in id: the person, the service that acts (notify, ai), the surface
(
telegram, assistant), a ceiling (scope, services, teams; no instance-admin powers unless the person
chooses them) and an expiry of at most 90 days. It is created only through an approval with a passkey,
listed in the person's account, and revoked there or from the surface (/lock).
- The acting service exchanges it (RFC 8693, authenticated as itself) for five-minute access tokens
whose
act names the service, via the surface and sid the delegation. It stores only the delegation's
secret, sealed. Other services see an ordinary principal narrowed by the ceiling, and the approvals policy
(ADR 0025) treats it as telegram or assistant.
- A Telegram account is a linked identity of a person in id, asserted by notify when the person links a
private chat, and unique within the instance; presses in chats and groups are attributed through it.
- First-party services never keep a person's refresh tokens, or reuse a panel session's tokens, to act later.
Consequences
- Telegram and the assistant act within limits the person set, visible and revocable in one place; every
action is journaled with who acted for whom.
- A taken-over Telegram account is bounded by the ceiling and by approvals; a compromised notify or ai by the
delegations people gave it.
- id's token endpoint gains a client-authenticated exchange next to the CI one; notify keeps a seal key.
- Extends ADR 0005 (tokens narrow further) and ADR 0006 (who gets tokens).
- Design:
superpowers/specs/2026-10-21-approvals-design.md in this repository.