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
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the role assignment. Auto-generated on create. |
owner_id | string | ID of the person this role is assigned to. |
name | string | Name of the role such as admin, editor, or viewer. |
role_id | string | ID of the platform role definition this assignment references. |
realm | string | Name of the realm this role belongs to. |
realm_id | string | ID 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_abc123def456Listing a person’s roles
Returns all roles assigned to a specific person.
obx app identity:people:roles list --person-id ppl_abc123def456Getting a person’s role
Returns a specific role assignment by its ID.
obx app identity:people:roles pull rol_abc123def456 --person-id ppl_abc123def456Updating 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_abc123def456Removing a person’s role
Removes a role assignment by its ID.
obx app identity:people:roles delete rol_abc123def456 --person-id ppl_abc123def456