Skip to main content

Users

Human identities within the SOAT instance, authenticated via username and password.

Overview​

Users are global, not project-scoped. The first is created via bootstrap; afterwards only admins may create users. Example: Permissions in Practice — Step 2 (Create regular users).

Attached Policies control access; see IAM.

See the Permissions Reference for the IAM action strings for this module.

Data Model​

FieldTypeDescription
idstringPublic identifier prefixed with user_
usernamestringUnique login name
rolestring"admin" or "user" — see Roles
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last-updated timestamp

Sensitive fields (passwordHash, internal numeric ID) are never exposed in responses.

Key Concepts​

Roles​

RoleDescription
adminFull access to all resources and operations. Bypasses policy evaluation.
userAccess determined by the policies attached to the account.

Bootstrap​

The POST /api/v1/users/bootstrap creates the first admin user, unauthenticated, only while the user table is empty (409 Conflict otherwise). Or bootstrap on startup with:

SOAT_ADMIN_USERNAME=admin
SOAT_ADMIN_PASSWORD=supersecret

With both set and no users, the server creates the admin before accepting requests; otherwise they are ignored.

Authentication​

POST /api/v1/users/login with username and password returns a signed JWT (public ID and role), passed as Authorization: Bearer <token>. See IAM — Authentication and Chat with an LLM — Step 1 (Log in as admin).

Policy Attachment​

The user-policies endpoint replaces the user's full policy list. User create/delete require the admin role and bypass the policy engine.

Examples​

Bootstrap first user​

soat bootstrap-user --username admin --password supersecret

Login​

soat login-user --username admin --password supersecret

Create an additional user​

soat create-user --username alice --password alicepass