Skip to content

Users and roles ​

Listing users ​

Requires: security.manage.access permission.

bash
GET /v1/security/auth/users

Returns every user in the caller's tenant with their profile, roles and status. Users are scoped to the caller's tenant — a PlatformAdmin on tenant A cannot see tenant B's users.

Creating a user ​

bash
curl -X POST http://localhost:3001/v1/security/auth/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT" \
  -d '{
    "username": "jane.smith",
    "email": "jane@acme.com",
    "password": "a-strong-password",
    "firstName": "Jane",
    "lastName": "Smith",
    "roles": ["Manager"]
  }'

Requires: security.manage.access permission. Passwords must be at least 8 characters. The password is bcrypt-hashed before storage — no plaintext password is ever persisted or returned.

User fields ​

FieldRequiredDescription
usernameYesUnique within the tenant
emailYesUsed for notifications and as a login identifier
firstNameYesDisplay name
lastNameYesDisplay name
passwordYesMinimum 8 characters, bcrypt-hashed
rolesYesArray of role names
departmentNoOrganisational department
titleNoJob title

Updating a user ​

Profile update (admin) ​

bash
PUT /v1/security/auth/users/:userId

Updates the user's profile fields (firstName, lastName, email, department, title). Requires security.manage.access.

Role assignment ​

bash
PATCH /v1/security/auth/users/:userId/roles

Replaces the user's role set. Requires security.manage.access.

json
{ "roles": ["Manager", "Architect"] }

A user can hold multiple roles. Permissions are the union of all assigned roles' permissions.

Status change ​

bash
PATCH /v1/security/auth/users/:userId/status

Changes the user's status. Requires security.manage.access.

StatusMeaning
activeCan sign in and use the platform
suspendedCannot sign in; data preserved
deprovisionedPermanently disabled; kept for audit trail
pendingAwaiting activation

Admin password reset ​

bash
POST /v1/security/auth/users/:userId/reset-password

Sets a new password for the user. Requires security.manage.access. The user's existing sessions are not automatically revoked — use the session revocation endpoint if needed.

Self-service operations ​

Authenticated users can manage their own profile without admin permissions:

bash
# View own profile and permissions
GET /v1/security/auth/me

# Update own profile (firstName, lastName, department, title only)
PATCH /v1/security/auth/me

# Change own password (requires current password)
POST /v1/security/auth/change-password

The self-service profile update is limited to non-sensitive fields — a user cannot change their own email, username or roles.

Roles ​

IDVIZE ships with six roles. Each role is a fixed set of permissions — there is no custom role builder today.

RoleIntended forKey permissions
PlatformAdminPlatform operatorEverything: tenant management, user management, all modules, commercial configuration, unit economics
ManagerIAM programme managerView and manage controls, baselines, applications, identities, accounts; approve execution; view cost and value
ArchitectIAM architectView controls, baselines, applications; manage automation policy; view integrations
BusinessAnalystGovernance analystView controls, applications, documents, maturity; no execution or configuration
EngineerIAM engineerView and configure integrations, run ingestion, view controls and applications; limited execution
DeveloperIntegration developerView integrations and applications; no approval or execution authority

Viewing the permission matrix ​

bash
# List all roles and their permissions
GET /v1/security/auth/roles

# Full RBAC matrix (every role × every permission)
GET /v1/security/auth/matrix

Key permissions ​

There are 24 discrete permissions. Each role holds a subset:

PermissionControls
controls.evaluateTrigger a manual assessment sweep
controls.baseline.manageEdit the control baseline (what is required)
agents.execute.approveApprove an execution plan
agents.adminCreate, cancel and manage execution sessions
commercial.grants.manageChange commercial grants and packages
commercial.unit-economics.viewView cost-to-serve data (PlatformAdmin only)
sod.manageCreate and manage separation-of-duties policies
sod.viewView SoD policies and findings
accounts.correlateAccept or reject account–identity correlations, manage ownership
accounts.viewView account inventory and investigations
security.manage.accessUser CRUD, role assignment, session revocation
security.view.auditView audit logs and permission matrix
tenants.manageTenant CRUD
tenants.settings.updateUpdate tenant settings

Authentication ​

Users authenticate by exchanging credentials for a JWT:

bash
curl -X POST http://localhost:3001/v1/security/auth/token \
  -H "Content-Type: application/json" \
  -d '{"email": "jane@acme.com", "password": "a-strong-password"}'

The JWT is valid for 8 hours. There are no refresh tokens — after expiry, the user signs in again.

Session management ​

bash
# Logout (invalidates the current token)
POST /v1/security/auth/logout

# Force-revoke another user's session (requires security.manage.access)
POST /v1/security/auth/revoke

Revoked tokens are tracked in the revoked_sessions table with write-through to an in-memory cache, so revocation takes effect immediately without waiting for token expiry.

Separation of duties ​

A self-approval guard prevents the same person from both requesting and approving an execution plan. If person A creates a session, person A cannot approve it — a different user with agents.execute.approve must do so.

Known limitation

Only two roles hold the approval permission (PlatformAdmin and Manager). Two people with the same role can still collude. A richer role model with separated request and approval roles is planned (SD-0038).