Actors¶
An actor is who the control plane thinks you are. It is derived from token claims on every request rather than stored as an account, and it is the subject every permission check and every audit record refers to.
How an actor is derived¶
flowchart TB
C["Verified token claims"] --> E{"email claim present?"}
E -->|yes| U["user:<email>"]
E -->|no| S{"sub claim present?"}
S -->|yes| SU["sub:<subject>"]
S -->|no| N["No actor"]
U --> M{"Principal mapping<br/>for this issuer and subject?"}
SU --> M
M -->|yes| I["Mapped internal actor"]
M -->|no| I2["Derived actor used as is"]
The email claim wins when present, giving a readable identifier. Otherwise the subject is used, which is why service identities often appear as an opaque string:
The system actor¶
system is the actor an unresolved request falls back to. In normal operation it
serves as a signal rather than a login.
After authenticating, if xratu auth whoami
still reports system, your token is not being accepted, and every command you
run will fail on authorisation rather than on authentication.
What whoami reports¶
The response carries the resolved actor and the context it was resolved in:
| Field | Meaning |
|---|---|
actor_id |
The resolved actor |
auth_context.mode |
token once a token was accepted |
auth_context.token_provider |
The provider the token came from |
auth_context.groups |
Groups extracted from the claims |
auth_context.claims |
The verified claim set |
request_context_actor |
The actor bound to this request |
auth_context is also where rejections surface. A context carrying
token_revoked_or_expired or email_domain_not_allowed tells you why no actor
was resolved.
Groups¶
Groups arrive as claims and are read from several shapes, because providers
disagree about the name: a groups claim as a list or a single string, a roles
claim in either form, and a singular group claim. All of them contribute.
Groups matter because role bindings can target them rather than individuals:
That is what lets access follow your directory rather than being maintained per person.
Mapping external principals¶
Two mapping layers exist for organisations that keep their internal actors distinct from their external principals.
Principal mappings translate an external principal, identified by provider, issuer and subject, into an internal actor.
Group mappings translate external groups into internal groups.
Both are optional. Without them, the derived actor and the raw groups are used as they are.
Actors and authorisation¶
Resolving an actor establishes who you are. Rights come separately, from role bindings at organisation and workspace scope, evaluated per request.
Two bindings happen automatically, and they are what make day 0 possible: creating an organisation binds the acting actor as its owner, and creating a workspace does the same for that workspace. Everything else is bound explicitly. See The owner role.
Service accounts are actors too¶
A service account is a non-interactive identity for automation, holding tokens issued directly by Xratu rather than exchanged from a provider. Its tokens are recorded by id and revocable at any time. See Create and manage a service account.
Properties of an actor¶
An actor is per provider. The same person authenticating through two providers resolves to two actors; a principal mapping ties them to one internal actor. See Mapping external principals.
Effective identity comes from the token. The actor_id stored on your CLI
profile by --set-actor is local metadata for your reference.