feat: API token management in workspace settings#10624
feat: API token management in workspace settings#10624dnplkndll wants to merge 3 commits intohcengineering:developfrom
Conversation
|
Connected to Huly®: UBERF-15850 |
2ad2263 to
c84d786
Compare
Add full API token CRUD (create, list, revoke) as a new workspace settings page. Tokens are workspace-scoped JWTs with configurable expiry (7-365 days), stored in a new `api_tokens` DB table. Backend: - New `ApiToken` type and `apiToken` DB collection (Postgres + Mongo) - V25 migration creates `api_tokens` table with FK constraints - `createApiToken`, `listApiTokens`, `revokeApiToken` RPC methods - AccountClient methods for all three operations Frontend: - `ApiTokens.svelte` — settings page with token list and status badges - `ApiTokenCreatePopup.svelte` — modal for creating tokens with workspace selection, name, and expiry configuration - One-time token reveal after creation with copy-to-clipboard - Registered as WorkspaceSettingCategory (Owner role required) Ref: hcengineering#10622 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Don Kendall <kendall@donkendall.com>
Documents existing transactor endpoints (find-all, tx, load-model), account service JSON-RPC, and the new API token management endpoints. Includes operationIds for codegen and bearerAuth/serverSecret security schemes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Don Kendall <kendall@donkendall.com>
Add a collapsible documentation section below the token list that shows available REST API endpoints, base URL, and a curl example. Helps users understand how to use their tokens for automation and integrations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Don Kendall <kendall@donkendall.com>
c84d786 to
efdbe1b
Compare
Follow-up: REST API should apply sensible defaults for
|
Summary
api_tokenstablecreateApiToken,listApiTokens,revokeApiTokenaccount service RPC methodsChanges
Backend (
server/account/):ApiTokentype +apiTokenDB collection (Postgres V25 migration + Mongo)AccountMethodsandgetMethods()AccountClientinterface + implementation extendedFrontend (
plugins/setting-resources/):ApiTokens.svelte— workspace settings page (Owner role)ApiTokenCreatePopup.svelte— creation modal with workspace/expiry selectionWorkspaceSettingCategoryin the modelTest plan
/api/v1/find-all/{workspace})api_tokenstable on fresh and existing databasesRef: #10622
🤖 Generated with Claude Code