Skip to content

Role

A Role represents an authorization assignment for a person. Each role references a platform role definition and its realm. Roles are used to determine what actions a person is permitted to perform within a specific realm scope. The role record enriches the assignment with the realm name and realm ID for convenient access control checks.

Sample Object

{
  "id": "rol_abc123def456",
  "owner_id": "ppl_abc123def456",
  "name": "admin",
  "role_id": "rle_xyz789uvw012",
  "realm": "default",
  "realm_id": "rlm_mno345pqr678"
}

Fields

FieldTypeDescription
idstringUnique identifier for the role assignment. Auto-generated on create.
owner_idstringID of the person this role is assigned to.
namestringName of the role such as admin, editor, or viewer.
role_idstringID of the platform role definition this assignment references.
realmstringName of the realm this role belongs to.
realm_idstringID of the realm this role belongs to.

Actions

Adding a role to a person

Assigns a role to a person. The role name must match an existing role definition. The system automatically resolves the role definition and its realm to populate the role_id, realm, and realm_id fields.

obx app identity:people:roles init
obx app identity:people:roles push init --person-id ppl_abc123def456

Listing a person’s roles

Returns all roles assigned to a specific person.

obx app identity:people:roles list --person-id ppl_abc123def456

Getting a person’s role

Returns a specific role assignment by its ID.

obx app identity:people:roles pull rol_abc123def456 --person-id ppl_abc123def456

Updating a person’s role

Updates the name of a role assignment. The system re-resolves the role definition and realm.

obx app identity:people:roles push rol_abc123def456 --person-id ppl_abc123def456

Removing a person’s role

Removes a role assignment by its ID.

obx app identity:people:roles delete rol_abc123def456 --person-id ppl_abc123def456