identity-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/identity/auth/loginPOST /gateway/identity/users/listPOST /gateway/identity/roles/listPOST /gateway/identity/permissions/checkGateway proxies them to identity-service:
POST /identity/auth/loginPOST /identity/users/listPOST /identity/roles/listPOST /identity/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_timeversionidnamedescriptionstatus: active | disabledversionidrole_idpermissionscope_typescope_idversioniduser_idrole_idstatus: active | revokedscope_typescope_idexpires_timeversionPOST /identity/auth/login
{
"username": "demo-user",
"password": "demo-password"
}
Response:
{
"success": true,
"data": {
"accessToken": "apt_xxx",
"tokenType": "bearer",
"expiresTime": "2026-04-28T07:10:00Z",
"user": {
"id": "user-id",
"username": "demo-user",
"displayName": "Demo User",
"email": "demo@example.com",
"metadata": {},
"lastLoginTime": "2026-04-27T23:10:00Z",
"createdTime": "2026-04-27T23:00:00Z",
"updatedTime": "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 /identity/auth/tokens/verify
{
"accessToken": "apt_xxx"
}
Response:
{
"success": true,
"data": {
"active": true,
"userId": "user-id",
"username": "demo-user",
"expiresTime": "2026-04-28T07:10:00"
}
}
POST /identity/permissions/check
{
"userId": "user-id",
"permission": "workflow:read",
"scopeType": null,
"scopeId": null
}
Response:
{
"success": true,
"data": {
"allowed": true,
"reason": "matched",
"matchedRoleIds": ["role-id"]
}
}
cd services/auth-service
$env:AGENT_PLATFORM_DATABASE_URL="postgresql+psycopg://admin:hFOvG5UBeK5KIGhz5cQH@git.newpoint.work:5432/vectordb"
alembic upgrade head