|
1342 | 1342 | }, |
1343 | 1343 | "GetMeResponse": { |
1344 | 1344 | "properties": { |
1345 | | - "email": { |
1346 | | - "description": "User email from the ID token when connected; `\"default\"` when anonymous.", |
| 1345 | + "is_admin": { |
| 1346 | + "description": "Whether the caller has admin privileges.", |
| 1347 | + "type": "boolean" |
| 1348 | + }, |
| 1349 | + "subject": { |
| 1350 | + "$ref": "#/components/schemas/GetMeSubject" |
| 1351 | + }, |
| 1352 | + "tenant_id": { |
| 1353 | + "description": "Tenant scope for the authenticated caller.", |
| 1354 | + "type": "string" |
| 1355 | + } |
| 1356 | + }, |
| 1357 | + "required": [ |
| 1358 | + "tenant_id", |
| 1359 | + "subject", |
| 1360 | + "is_admin" |
| 1361 | + ], |
| 1362 | + "type": "object" |
| 1363 | + }, |
| 1364 | + "GetMeSubject": { |
| 1365 | + "properties": { |
| 1366 | + "display_name": { |
| 1367 | + "description": "Human-readable name for the caller.", |
1347 | 1368 | "type": "string" |
1348 | 1369 | }, |
1349 | | - "role": { |
1350 | | - "description": "Caller role.", |
| 1370 | + "id": { |
| 1371 | + "description": "Stable subject identifier for the caller.", |
1351 | 1372 | "type": "string" |
1352 | 1373 | }, |
1353 | 1374 | "type": { |
1354 | | - "description": "Session kind: `default` when no valid OIDC session; `oidc-connected` after a successful browser login.", |
| 1375 | + "description": "Subject kind: interactive user or virtual account.", |
1355 | 1376 | "enum": [ |
1356 | | - "default", |
1357 | | - "oidc-connected" |
| 1377 | + "user", |
| 1378 | + "virtualaccount" |
1358 | 1379 | ], |
1359 | 1380 | "type": "string" |
1360 | 1381 | } |
1361 | 1382 | }, |
1362 | 1383 | "required": [ |
| 1384 | + "id", |
1363 | 1385 | "type", |
1364 | | - "email", |
1365 | | - "role" |
| 1386 | + "display_name" |
1366 | 1387 | ], |
1367 | 1388 | "type": "object" |
1368 | 1389 | }, |
|
4823 | 4844 | "securitySchemes": { |
4824 | 4845 | "BearerAuth": { |
4825 | 4846 | "bearerFormat": "JWT", |
4826 | | - "description": "ID token (`Authorization: Bearer <id_token>`). Required on protected routes. Browser sessions may use the HttpOnly `id_token` cookie instead.", |
| 4847 | + "description": "Caller credential (`Authorization: Bearer <token>`). Required on protected routes when auth is enabled. Browser sessions may use the HttpOnly `id_token` or `accessToken` cookie instead.", |
4827 | 4848 | "scheme": "bearer", |
4828 | 4849 | "type": "http" |
4829 | 4850 | } |
4830 | 4851 | } |
4831 | 4852 | }, |
4832 | 4853 | "info": { |
4833 | | - "description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone deployments (no OIDC) accept requests without credentials — middleware stamps a local default user. When OIDC is configured, protected routes require a valid `id_token` cookie or `Authorization: Bearer` ID token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.", |
| 4854 | + "description": "HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).\n\n**Authentication:** Standalone auth accepts requests without credentials — middleware stamps a local default user. When OIDC or TrueFoundry auth is configured, protected routes require a valid cookie or `Authorization: Bearer` token. There is no built-in API-key scheme; pass custom headers only if your reverse proxy or IdP layer requires them.\n\nCovers DB-backed sessions, the agent registry, settings catalogs, and model/MCP/skill/sandbox providers.", |
4834 | 4855 | "title": "TrueForge API", |
4835 | 4856 | "version": "0.2.0-rc.0" |
4836 | 4857 | }, |
|
5529 | 5550 | }, |
5530 | 5551 | "/api/v1/auth/me": { |
5531 | 5552 | "get": { |
5532 | | - "description": "Returns the authenticated caller identity. When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` ID token (401 otherwise). When auth is disabled, returns the default identity.", |
| 5553 | + "description": "Returns the authenticated caller identity (`tenant_id`, `subject`, `is_admin`). When auth is enabled this requires a valid `id_token` cookie or `Authorization: Bearer` token (401 otherwise). When auth is disabled, returns the standalone default identity.", |
5533 | 5554 | "responses": { |
5534 | 5555 | "200": { |
5535 | 5556 | "content": { |
|
5539 | 5560 | } |
5540 | 5561 | } |
5541 | 5562 | }, |
5542 | | - "description": "Session type and identity for the current request." |
| 5563 | + "description": "Caller identity for the current request." |
5543 | 5564 | }, |
5544 | 5565 | "401": { |
5545 | 5566 | "content": { |
|
5549 | 5570 | } |
5550 | 5571 | } |
5551 | 5572 | }, |
5552 | | - "description": "Auth is enabled and the request has no valid cookie or Bearer ID token." |
| 5573 | + "description": "Auth is enabled and the request has no valid cookie or Bearer token." |
5553 | 5574 | } |
5554 | 5575 | }, |
5555 | 5576 | "summary": "Current session", |
|
0 commit comments