Concept
Principal
The accountable human or organization on whose authority something acts.
Definition
A principal is the party that answers for an action. In the console a principal is a signed-in person with a subject, an email, a tenant and roles. When an agent acts, the principal is whoever the agent acts for, named at the root of its delegation chain.
Shape
interface Principal {
sub: string; // stable subject identifier
email: string;
tenant: string; // exactly one tenant per session
roles: Role[];
assurance: Assurance; // how strongly the session was authenticated
authTime: number;
stepUpAt: number; // last fresh second factor
}
Invariants
| Invariant | Checked by |
|---|---|
| A principal belongs to exactly one tenant per session; switching tenant is a new session. | packages/identity/src/types.ts (Principal.tenant is a single string) |
| Owners and admins cannot approve their own requests. | packages/identity/src/arb-round2.test.ts: "owner and admin cannot approve their own request" |
| No identity or membership is written without provenance. | packages/identity/src/admission.test.ts: "no identity or membership can be written without provenance" |
Out of scope
- Legal identity. A principal is an authenticated account, not a verified legal person.
- Anything the principal did outside Silvector.