Ipseity builds authorization from principals, groups, roles and permissions. Every entity is realm-scoped: identity in one realm is local to that realm (see realms.md). Explicit memberships let a main-realm identity use tenant-assigned RBAC without copying that identity or its home permissions.
Concepts
| Entity | Meaning | API permissions to manage |
|---|---|---|
| Principal | An identity: a human user (type: user) or a machine (type: service-account). |
principals.read/write/delete |
| Group | A container that holds roles and/or permissions; principals are members. | groups.read/write/delete |
| Role | A named bag of permissions that principals or groups can hold. | roles.read/write/delete |
| Permission | A single capability string, e.g. identity.read, clients.write. |
— (attached to roles/groups/principals) |
| Client | An OAuth application (see clients.md). | clients.read/write/delete |
| Provider | An external IdP (see providers.md). | providers.read/write/delete |
| Membership | A tenant-local grant to an existing main-realm identity (see memberships.md). | memberships.read/write/delete |
Effective permissions
A principal's effective permissions are the union of:
- the principal's own
permissionslist, - each of the principal's groups → the group's
permissionsand each of the group's roles → the role'spermissions, - each of the principal's direct roles → the role's
permissions.
Equivalently: direct permissions ∪ (roles → role.permissions) ∪ (groups → [group.permissions ∪ (group.roles → role.permissions)]). Permission lookups are
case-sensitive, so keep casing consistent.
Typical setup:
- Create roles that grant a coherent slice of permissions (e.g. "can read principals and groups").
- Create groups ("department admins") that pull in roles and/or extra permissions.
- Assign principals to groups; optionally give a principal a role directly.
What permissions exist
The full catalog is reported by GET /api/meta (known_permissions). The
built-in set:
| Permission | Meaning |
|---|---|
login |
Required. Allows the account to authenticate at all. Removing it blacklists the account (identity kept, cannot re-login from any source). |
identity.read / identity.write / identity.delete |
Broad read/write/delete across all identity entities (principals, groups, roles, clients). |
principals.read/write/delete |
Manage principals. |
groups.read/write/delete |
Manage groups. |
roles.read/write/delete |
Manage roles. |
clients.read/write/delete |
Manage clients (API creation/update/delete). |
providers.read/write/delete |
Manage external auth providers. |
memberships.read/write/delete |
Manage tenant access grants for home identities. |
oauth.authorize / oauth.token.issue / oidc.userinfo.read |
Reserved for the platform admin role; grants the OAuth plumbing permissions. |
admin.audit.read |
Read the serving process's per-realm recent audit cache (GET /api/audit). |
ipseity.super |
Realm management. Grants the holder's granted permissions in every realm (see below). |
Effective-permission checks support suffix wildcards: a granted identity.*
matches identity.read, identity.write, etc., and * matches everything.
API permission enforcement
/api/* endpoints require the permission implied by the verb:
| Verb | Required permission |
|---|---|
GET |
<entity>.read (e.g. principals.read) |
POST / PUT |
<entity>.write |
DELETE |
<entity>.delete |
identity.* grants fall back for the corresponding verb. /api/account,
/api/session, /api/meta and email self-verification are exempt from entity
permissions (they act on your own account / read-only metadata).
The login permission and banning
login is a normal permission that gates authentication:
- New principals receive
loginby default at creation. - It is never re-added on update — removing it bans the account (from password and external sources alike) while preserving the identity (so the name/email can't be recreated).
ipseity.superdoes not implylogin; a super account withoutloginis banned everywhere.
ipseity.super and cross-realm administration
ipseity.superallows the holder's granted permissions in all realms (it is not a wildcard by itself — the principal still needs, e.g.,principals.writeto write principals anywhere).- It may only be granted to principals in the ipseity realm, and the
ipseity-admin-platformrole (which grants it) only exists there. - Realm-management endpoints (
GET/POST/DELETE /api/realms*) requireipseity.super. - A super principal targets another realm by sending the
X-Ipseity-Realm: <realm>request header from their home console. Console URLs themselves use/realms/<realm>; see console.md.
Built-in admin roles and the admins group
Ipseity provisions a set of roles and one group at realm creation (idempotent, updated if permissions drift):
| Role | Permissions | Realm |
|---|---|---|
ipseity-admin-principals |
principals read/write/delete | every realm |
ipseity-admin-groups |
groups read/write/delete | every realm |
ipseity-admin-roles |
roles read/write/delete | every realm |
ipseity-admin-clients |
clients read/write/delete | every realm |
ipseity-admin-providers |
providers read/write/delete | every realm |
ipseity-admin-memberships |
memberships read/write/delete | every realm |
ipseity-admin-platform |
login + identity.* + providers read/write/delete + oauth.* + oidc.userinfo.read + admin.audit.read + ipseity.super |
ipseity realm only |
The ipseity-admins group references the entity-admin roles in every realm,
and the platform role in the ipseity realm. Assign a principal to that group to
give them full admin for the realm.
The internal UI client (ipseity-internal) requires the console's own client to
be readable; a low-privilege principal with only login can sign into the
console but only sees the Account page (self-service). See
account.md.
Principals
A principal document (realm-scoped):
{
"name": "alice",
"entity": "principal",
"type": "user", // "user" or "service-account"
"password": "…hashed…", // PBKDF2-SHA256
"groups": ["platform-admins"],
"roles": [],
"permissions": ["login"],
"disabled": false,
"mfa_enabled": false,
"mfa_secret": "",
"email": "alice@example.com", // optional, unique per realm, keyed for providers
"email_verified": false,
"external": false,
"auth_providers": [],
"display_name": "", // canonical displayable full name
"given_name": "", // optional structured name part
"family_name": "" // optional structured name part
}
Notes:
typemust beuserorservice-account.- Passwords are never returned; they are replaced with an empty string on reads outside of authenticated operation, and stored hashed at rest.
groups/roles/permissionsare lists of names. Missing names are tolerated at permission-resolution time (unknown groups simply contribute nothing).disabled: truestops authentication and API access.- MFA:
mfa_enabled: truerequires a base32mfa_secret(validated); the password/authorize flows then also require a valid TOTP code. - Names:
display_nameis the canonical displayable full name (used for the OIDCnameclaim).given_name/family_nameare optional structured parts (OIDCprofileclaims, also captured from external providers). Whendisplay_nameis empty andgiven_name/family_nameare set, the display name is synthesized as"given family". - Updating an existing principal through the console, collection POST or named
POST/PUT routes preserves its password when
passwordis omitted, empty or whitespace-only. Supply a non-blank plaintext password to replace it. For enabled MFA, an omitted or blankmfa_secretpreserves the existing secret. See API update semantics.
Service accounts
type: service-account principals are machine identities. They use the same
RBAC (groups/roles/permissions) as users, and can authenticate with a password
(used as the machine's credential). They are the natural way to give a machine
an identity whose permissions are visible across the platform.
Groups
{
"name": "platform-admins",
"entity": "group",
"description": "Platform administrators",
"roles": ["ipseity-admin-platform"],
"permissions": []
}
Roles
{
"name": "viewer",
"entity": "role",
"permissions": ["identity.read"]
}
Permission names are validated by pattern (letters/digits with ., :, _,
-; 1–128 chars) and are otherwise free-form, so the catalog is extensible.
