auth-service owns Web Studio account/password login, users, roles, role assignments, and permission checks.
The auth domain is single-workspace. Auth API payloads and auth tables do not carry workspace partition fields.
Frontend requests go through /gateway:
POST /gateway/auth/loginGET /gateway/auth/usersGET /gateway/auth/rolesPOST /gateway/auth/permissions/checkGateway proxies them to auth-service:
POST /auth/loginGET /auth/usersGET /auth/rolesPOST /auth/permissions/checkAfter login, frontend sends:
Authorization: Bearer ...x-user-idPostgreSQL:
postgresql+psycopg://admin:hFOvG5UBeK5KIGhz5cQH@git.newpoint.work:5432/vectordb
Runtime setting:
$env:AGENT_PLATFORM_DATABASE_URL="postgresql+psycopg://admin:hFOvG5UBeK5KIGhz5cQH@git.newpoint.work:5432/vectordb"
idusernamepassword_hashdisplay_nameemailstatus: active | disabled | deletedmetadata_jsonlast_login_timeversionidcodenamedescriptionstatus: active | disabledpermissions_jsonversioniduser_idrole_idstatus: active | revokedscope_typescope_idexpires_timeversionPOST /auth/login
{
"username": "demo-user",
"password": "demo-password"
}
Response:
{
"access_token": "apt_xxx",
"token_type": "bearer",
"expires_time": "2026-04-28T07:10:00Z",
"user": {
"id": "user-id",
"username": "demo-user",
"display_name": "Demo User",
"email": "demo@example.com",
"status": "active",
"metadata_json": {},
"last_login_time": "2026-04-27T23:10:00Z",
"created_time": "2026-04-27T23:00:00Z"
}
}
Passwords are stored with salted PBKDF2-HMAC-SHA256. Access tokens are HMAC signed with AGENT_PLATFORM_CREDENTIAL_ENCRYPTION_KEY.
POST /auth/tokens/verify
{
"access_token": "apt_xxx"
}
Response:
{
"active": true,
"user_id": "user-id",
"username": "demo-user",
"expires_time": "2026-04-28T07:10:00"
}
POST /auth/permissions/check
{
"user_id": "user-id",
"permission": "workflow:read",
"scope_type": null,
"scope_id": null
}
Response:
{
"allowed": true,
"reason": "matched",
"matched_role_ids": ["role-id"]
}
cd services/auth-service
$env:AGENT_PLATFORM_DATABASE_URL="postgresql+psycopg://admin:hFOvG5UBeK5KIGhz5cQH@git.newpoint.work:5432/vectordb"
alembic upgrade head