@app-vitals/agent-admin 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +43 -0
- package/README.md +72 -2
- package/e2e/agents-page.e2e.ts +338 -0
- package/e2e/chat-degraded.e2e.ts +153 -0
- package/e2e/chat-page.e2e.ts +169 -0
- package/e2e/chat-progress.e2e.ts +206 -0
- package/e2e/chat-thread-page.e2e.ts +444 -0
- package/e2e/login-page.e2e.ts +148 -0
- package/e2e/test-server.ts +427 -0
- package/openapi.json +6098 -0
- package/openapi.platform.json +5553 -0
- package/package.json +62 -4
- package/playwright.config.ts +25 -0
- package/prisma/client/browser.ts +134 -0
- package/prisma/client/client.ts +158 -0
- package/prisma/client/commonInputTypes.ts +578 -0
- package/prisma/client/enums.ts +15 -0
- package/prisma/client/internal/class.ts +424 -0
- package/prisma/client/internal/prismaNamespace.ts +2898 -0
- package/prisma/client/internal/prismaNamespaceBrowser.ts +476 -0
- package/prisma/client/models/Account.ts +1774 -0
- package/prisma/client/models/AccountInvite.ts +1386 -0
- package/prisma/client/models/AccountMember.ts +1351 -0
- package/prisma/client/models/Agent.ts +4554 -0
- package/prisma/client/models/AgentAsk.ts +1373 -0
- package/prisma/client/models/AgentChatTokenUsageDailyByModel.ts +1638 -0
- package/prisma/client/models/AgentCronJob.ts +2416 -0
- package/prisma/client/models/AgentCronRun.ts +2858 -0
- package/prisma/client/models/AgentCronRunModelBreakdown.ts +1532 -0
- package/prisma/client/models/AgentCronRunSkillUsage.ts +1642 -0
- package/prisma/client/models/AgentEnv.ts +1421 -0
- package/prisma/client/models/AgentGitHubInstallationsSnapshot.ts +1289 -0
- package/prisma/client/models/AgentMember.ts +1316 -0
- package/prisma/client/models/AgentPhaseMethodology.ts +1355 -0
- package/prisma/client/models/AgentPlugin.ts +1421 -0
- package/prisma/client/models/AgentToken.ts +1380 -0
- package/prisma/client/models/AgentTool.ts +1351 -0
- package/prisma/client/models/AgentWorkQueueSnapshot.ts +1297 -0
- package/prisma/client/models/ChatThreadWatch.ts +1183 -0
- package/prisma/client/models/PushSubscription.ts +1233 -0
- package/prisma/client/models/SessionAlertState.ts +1187 -0
- package/prisma/client/models/SessionFollow.ts +1187 -0
- package/prisma/client/models/UserNotificationPrefs.ts +1221 -0
- package/prisma/client/models.ts +34 -0
- package/prisma/migrations/20260608000000_init/migration.sql +112 -0
- package/prisma/migrations/20260616000000_agent_members/migration.sql +18 -0
- package/prisma/migrations/20260624000000_add_agent_self_hosted/migration.sql +2 -0
- package/prisma/migrations/20260624120000_add_agent_repos/migration.sql +3 -0
- package/prisma/migrations/20260625000000_add_agent_cron_run/migration.sql +26 -0
- package/prisma/migrations/20260626000000_add_cron_run_token_fields/migration.sql +10 -0
- package/prisma/migrations/20260627000000_add_agent_chat_token_usage_daily/migration.sql +18 -0
- package/prisma/migrations/20260627010000_add_agent_chat_token_usage_fk/migration.sql +2 -0
- package/prisma/migrations/20260701000000_add_chat_threads_messages/migration.sql +37 -0
- package/prisma/migrations/20260701010000_drop_chat_threads_messages/migration.sql +17 -0
- package/prisma/migrations/20260701020000_add_cron_run_model_breakdown/migration.sql +23 -0
- package/prisma/migrations/20260701020000_chat_token_by_model/migration.sql +25 -0
- package/prisma/migrations/20260701030000_add_secret_flag_to_agent_env/migration.sql +2 -0
- package/prisma/migrations/20260701030000_drop_cron_run_legacy_columns/migration.sql +5 -0
- package/prisma/migrations/20260706000000_consolidate_cron_run_token_accounting/migration.sql +54 -0
- package/prisma/migrations/20260709000000_add_phase_to_agent_cron_run/migration.sql +8 -0
- package/prisma/migrations/20260717000000_add_item_tracking_to_agent_cron_run/migration.sql +10 -0
- package/prisma/migrations/20260717010000_add_agent_work_queue_snapshot/migration.sql +20 -0
- package/prisma/migrations/20260718000000_add_cron_phase_columns/migration.sql +25 -0
- package/prisma/migrations/20260718100000_drop_agent_cron_run_phase_column/migration.sql +8 -0
- package/prisma/migrations/20260724000000_add_agent_type_name/migration.sql +3 -0
- package/prisma/migrations/20260725232433_add_agent_author_allowlist/migration.sql +2 -0
- package/prisma/migrations/20260727120000_add_not_null_to_agent_author_allowlist/migration.sql +3 -0
- package/prisma/migrations/20260731000000_add_session_id_to_agent_cron_run/migration.sql +2 -0
- package/prisma/migrations/20260821000000_add_agent_restrict_slack_to_members/migration.sql +3 -0
- package/prisma/migrations/20260901000000_add_push_subscription_and_chat_thread_watch/migration.sql +40 -0
- package/prisma/migrations/20260903000000_add_agent_patch_author_allowlist/migration.sql +2 -0
- package/prisma/migrations/20260903120000_add_agent_review_author_allowlist/migration.sql +18 -0
- package/prisma/migrations/20260903150000_drop_agent_author_allowlist/migration.sql +14 -0
- package/prisma/migrations/20260905000000_add_started_at_index_to_agent_cron_run/migration.sql +11 -0
- package/prisma/migrations/20260906000000_add_session_follow_notification_prefs_alert_state/migration.sql +47 -0
- package/prisma/migrations/20260911000000_backfill_auto_follow_since/migration.sql +16 -0
- package/prisma/migrations/20260923115814_add_last_heartbeat_at_to_agent_cron_run/migration.sql +2 -0
- package/prisma/migrations/20260924120000_add_trial_expiry_fields_to_agent/migration.sql +6 -0
- package/prisma/migrations/20260929000000_add_agent_phase_methodology/migration.sql +21 -0
- package/prisma/migrations/20260929120000_add_agent_policy_fields/migration.sql +15 -0
- package/prisma/migrations/20261005000000_add_agent_github_installations_snapshot/migration.sql +21 -0
- package/prisma/migrations/20261008000000_add_cron_run_telemetry/migration.sql +50 -0
- package/prisma/migrations/20261008010000_add_account_models/migration.sql +48 -0
- package/prisma/migrations/20261008020000_add_cron_lockdown_disabled_at/migration.sql +3 -0
- package/prisma/migrations/20261009000000_chat_token_usage_bigint/migration.sql +7 -0
- package/prisma/migrations/20261010000000_add_cron_run_command_variant/migration.sql +2 -0
- package/prisma/migrations/20261019000000_add_agent_anthropic_identity/migration.sql +9 -0
- package/prisma/migrations/20261025000000_add_agent_ask/migration.sql +23 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema/coding.prisma +85 -0
- package/prisma/schema/schema.prisma +506 -0
- package/prisma.config.ts +34 -0
- package/pwa-assets/icons/apple-touch-icon.png +0 -0
- package/pwa-assets/icons/favicon-32.png +0 -0
- package/pwa-assets/icons/icon-192.png +0 -0
- package/pwa-assets/icons/icon-512.png +0 -0
- package/pwa-assets/icons/icon-maskable-192.png +0 -0
- package/pwa-assets/icons/icon-maskable-512.png +0 -0
- package/src/account-agent-create.ts +42 -0
- package/src/account-agent-create.unit.test.ts +28 -0
- package/src/account-created-notifier.ts +71 -0
- package/src/account-created-notifier.unit.test.ts +70 -0
- package/src/account-email.ts +9 -0
- package/src/account-email.unit.test.ts +21 -0
- package/src/account-invites.ts +70 -0
- package/src/account-lifecycle.integration.test.ts +329 -0
- package/src/account-lifecycle.ts +206 -0
- package/src/account-lifecycle.unit.test.ts +108 -0
- package/src/account-members.ts +128 -0
- package/src/account-onboarding.integration.test.ts +101 -0
- package/src/account-onboarding.ts +95 -0
- package/src/account-trial-expiry-sweeper.ts +85 -0
- package/src/account-trial-warning-sweeper.integration.test.ts +228 -0
- package/src/account-trial-warning-sweeper.ts +216 -0
- package/src/accounts-api.integration.test.ts +196 -0
- package/src/accounts-api.smoke.test.ts +292 -0
- package/src/accounts-api.ts +289 -0
- package/src/accounts-api.unit.test.ts +93 -0
- package/src/accounts.integration.test.ts +178 -0
- package/src/accounts.ts +208 -0
- package/src/admin-boot-config.ts +574 -0
- package/src/admin-boot-config.unit.test.ts +28 -0
- package/src/admin-boot.boot-order.unit.test.ts +91 -0
- package/src/admin-boot.ts +690 -0
- package/src/admin-dev-login.smoke.test.ts +317 -0
- package/src/admin-extension.ts +432 -0
- package/src/admin-extension.unit.test.ts +532 -0
- package/src/admin-local-agent.smoke.test.ts +1643 -0
- package/src/admin-spec.smoke.test.ts +96 -0
- package/src/admin-spec.ts +186 -0
- package/src/admin-ui-account-nav.ts +20 -0
- package/src/admin-ui-account-pages.ts +131 -0
- package/src/admin-ui-account-pages.unit.test.ts +112 -0
- package/src/admin-ui-account.smoke.test.ts +286 -0
- package/src/admin-ui-account.ts +185 -0
- package/src/admin-ui-accounts-pages.ts +202 -0
- package/src/admin-ui-accounts-pages.unit.test.ts +138 -0
- package/src/admin-ui-accounts.smoke.test.ts +434 -0
- package/src/admin-ui-accounts.ts +266 -0
- package/src/admin-ui-layout.ts +60 -0
- package/src/admin-ui-layout.unit.test.ts +140 -0
- package/src/admin-ui-pages.ts +3489 -0
- package/src/admin-ui-pages.unit.test.ts +4355 -0
- package/src/admin-ui-push-test.smoke.test.ts +125 -0
- package/src/admin-ui-push-test.ts +102 -0
- package/src/admin-ui-styles.ts +656 -0
- package/src/admin-ui-styles.unit.test.ts +103 -0
- package/src/admin-ui.fixtures.ts +457 -0
- package/src/admin-ui.smoke.test.ts +7227 -0
- package/src/admin-ui.ts +3824 -0
- package/src/agent-account-assignment.ts +49 -0
- package/src/agent-account-assignment.unit.test.ts +99 -0
- package/src/agent-anthropic-identity.integration.test.ts +99 -0
- package/src/agent-anthropic-identity.ts +78 -0
- package/src/agent-anthropic-identity.unit.test.ts +77 -0
- package/src/agent-ask-config.ts +59 -0
- package/src/agent-ask-config.unit.test.ts +70 -0
- package/src/agent-ask.integration.test.ts +175 -0
- package/src/agent-ask.smoke.test.ts +457 -0
- package/src/agent-ask.ts +378 -0
- package/src/agent-chat-tokens.integration.test.ts +420 -0
- package/src/agent-chat-tokens.smoke.test.ts +551 -0
- package/src/agent-chat-tokens.ts +259 -0
- package/src/agent-cron-jobs.integration.test.ts +582 -0
- package/src/agent-cron-jobs.ts +615 -0
- package/src/agent-cron-jobs.unit.test.ts +420 -0
- package/src/agent-cron-run-stats.integration.test.ts +1551 -0
- package/src/agent-cron-run-stats.smoke.test.ts +953 -0
- package/src/agent-cron-run-stats.ts +752 -0
- package/src/agent-cron-runs.integration.test.ts +1491 -0
- package/src/agent-cron-runs.ts +489 -0
- package/src/agent-deletion-checklist.ts +128 -0
- package/src/agent-deletion-checklist.unit.test.ts +201 -0
- package/src/agent-deletion-per-agent.integration.test.ts +323 -0
- package/src/agent-deletion.integration.test.ts +323 -0
- package/src/agent-deletion.ts +329 -0
- package/src/agent-deletion.unit.test.ts +412 -0
- package/src/agent-envs.integration.test.ts +323 -0
- package/src/agent-envs.ts +244 -0
- package/src/agent-github-installations.integration.test.ts +115 -0
- package/src/agent-github-installations.ts +52 -0
- package/src/agent-manifest.ts +685 -0
- package/src/agent-manifest.unit.test.ts +870 -0
- package/src/agent-members.ts +69 -0
- package/src/agent-members.unit.test.ts +250 -0
- package/src/agent-patch-author-allowlist.integration.test.ts +218 -0
- package/src/agent-plugins.integration.test.ts +157 -0
- package/src/agent-plugins.ts +95 -0
- package/src/agent-plugins.unit.test.ts +43 -0
- package/src/agent-provisioner-per-agent.integration.test.ts +949 -0
- package/src/agent-provisioner.integration.test.ts +1245 -0
- package/src/agent-provisioner.ts +1650 -0
- package/src/agent-provisioner.unit.test.ts +1852 -0
- package/src/agent-tokens.integration.test.ts +150 -0
- package/src/agent-tokens.ts +112 -0
- package/src/agent-tools.integration.test.ts +129 -0
- package/src/agent-tools.ts +111 -0
- package/src/agents-api.integration.test.ts +705 -0
- package/src/agents-api.sentry.smoke.test.ts +478 -0
- package/src/agents-api.smoke.test.ts +5986 -0
- package/src/agents-api.ts +2826 -0
- package/src/agents.integration.test.ts +512 -0
- package/src/agents.ts +1097 -0
- package/src/agents.unit.test.ts +1736 -0
- package/src/anthropic-credential-guard.ts +44 -0
- package/src/anthropic-credential-guard.unit.test.ts +88 -0
- package/src/anthropic-federated-token-provider.integration.test.ts +248 -0
- package/src/anthropic-federated-token-provider.ts +249 -0
- package/src/anthropic-identity-client.fixtures.ts +237 -0
- package/src/anthropic-identity-client.integration.test.ts +342 -0
- package/src/anthropic-identity-client.ts +473 -0
- package/src/anthropic-identity-fixture-spec.integration.test.ts +169 -0
- package/src/anthropic-identity-name.integration.test.ts +83 -0
- package/src/anthropic-identity-name.ts +163 -0
- package/src/anthropic-identity-name.unit.test.ts +345 -0
- package/src/anthropic-openapi-contract.fixtures.ts +192 -0
- package/src/api-auth.ts +383 -0
- package/src/api-auth.unit.test.ts +837 -0
- package/src/api.smoke.test.ts +1225 -0
- package/src/api.ts +376 -0
- package/src/attachment-validation.ts +124 -0
- package/src/attachment-validation.unit.test.ts +218 -0
- package/src/caller-scope.ts +131 -0
- package/src/caller-scope.unit.test.ts +116 -0
- package/src/chat-credential-config.ts +22 -0
- package/src/chat-credentials-logging.unit.test.ts +92 -0
- package/src/chat-markers.ts +114 -0
- package/src/chat-markers.unit.test.ts +116 -0
- package/src/chat-service-provisioning-client.integration.test.ts +412 -0
- package/src/chat-service-provisioning-client.ts +221 -0
- package/src/chat.smoke.test.ts +1875 -0
- package/src/clock.ts +47 -0
- package/src/coding-task-store-provisioning-client.integration.test.ts +372 -0
- package/src/coding-task-store-provisioning-client.ts +156 -0
- package/src/crypto.ts +83 -0
- package/src/dev-auth-guard.ts +29 -0
- package/src/dev-auth-guard.unit.test.ts +51 -0
- package/src/errors.ts +77 -0
- package/src/errors.unit.test.ts +52 -0
- package/src/fixtures/anthropic-identity-recorded-fixtures.json +850 -0
- package/src/fixtures/anthropic-openapi/SDK_VERSION +1 -0
- package/src/fixtures/anthropic-openapi/mock-spec.json.gz +0 -0
- package/src/fixtures/chat-service-provisioning-cassette.json +156 -0
- package/src/fixtures/github-app-manifest-cassette.json +44 -0
- package/src/fixtures/google-auth-cassette.json +36 -0
- package/src/fixtures/http-chat-client-cassette.json +226 -0
- package/src/fixtures/k8s-cassette.json +470 -0
- package/src/fixtures/okta-auth-cassette.json +36 -0
- package/src/fixtures/slack-provision-cassette.json +12 -0
- package/src/fixtures/slack-provisioning-http-cassette.json +98 -0
- package/src/fixtures/task-store-provisioning-cassette.json +85 -0
- package/src/github-app-provisioning-client.integration.test.ts +149 -0
- package/src/github-app-provisioning-client.ts +161 -0
- package/src/github-app-provisioning-client.unit.test.ts +114 -0
- package/src/github-provisioning-service.ts +569 -0
- package/src/github-provisioning-service.unit.test.ts +123 -0
- package/src/google-auth-client.integration.test.ts +195 -0
- package/src/google-auth-client.ts +121 -0
- package/src/http-chat-client.integration.test.ts +554 -0
- package/src/http-chat-client.ts +533 -0
- package/src/http-chat-client.unit.test.ts +119 -0
- package/src/import-boundary.unit.test.ts +240 -0
- package/src/kubernetes-client.integration.test.ts +697 -0
- package/src/kubernetes-client.ts +1027 -0
- package/src/kubernetes-client.unit.test.ts +726 -0
- package/src/main.smoke.test.ts +91 -0
- package/src/main.ts +21 -0
- package/src/main.unit.test.ts +801 -0
- package/src/okta-auth-client.integration.test.ts +263 -0
- package/src/okta-auth-client.ts +152 -0
- package/src/openapi-schemas.ts +1310 -0
- package/src/openapi-schemas.unit.test.ts +348 -0
- package/src/per-agent-identity.fixtures.ts +305 -0
- package/src/platform-doc-route.ts +40 -0
- package/src/prisma-client.integration.test.ts +57 -0
- package/src/prisma-client.ts +187 -0
- package/src/prisma-client.unit.test.ts +178 -0
- package/src/prisma-tx.ts +23 -0
- package/src/push-content.ts +177 -0
- package/src/push-content.unit.test.ts +213 -0
- package/src/push-crypto.ts +135 -0
- package/src/push-crypto.unit.test.ts +66 -0
- package/src/push-sender.ts +169 -0
- package/src/push-sender.unit.test.ts +107 -0
- package/src/push-service.ts +332 -0
- package/src/push-service.unit.test.ts +679 -0
- package/src/push-toggle.ts +135 -0
- package/src/push-toggle.unit.test.ts +78 -0
- package/src/pwa-https-gating.smoke.test.ts +229 -0
- package/src/pwa-icons.unit.test.ts +41 -0
- package/src/pwa-routes.smoke.test.ts +276 -0
- package/src/pwa.ts +380 -0
- package/src/pwa.unit.test.ts +321 -0
- package/src/schema.unit.test.ts +122 -0
- package/src/self-serve-config.ts +52 -0
- package/src/self-serve-config.unit.test.ts +79 -0
- package/src/server.smoke.test.ts +273 -0
- package/src/server.ts +50 -0
- package/src/service-integration.ts +67 -0
- package/src/service-integration.unit.test.ts +129 -0
- package/src/slack-provisioning-client.integration.test.ts +308 -0
- package/src/slack-provisioning-client.ts +411 -0
- package/src/slack-provisioning-client.unit.test.ts +80 -0
- package/src/slack-provisioning-service.integration.test.ts +637 -0
- package/src/slack-provisioning-service.ts +451 -0
- package/src/slack-provisioning.integration.test.ts +395 -0
- package/src/specialty-manifest-loader.fixture.integration.test.ts +63 -0
- package/src/specialty-manifest-loader.ts +255 -0
- package/src/specialty-manifest-loader.unit.test.ts +301 -0
- package/src/specialty-registry.schema.unit.test.ts +35 -0
- package/src/specialty-registry.ts +236 -0
- package/src/specialty-registry.unit.test.ts +272 -0
- package/src/startup-policy-reconcile.ts +77 -0
- package/src/startup-policy-reconcile.unit.test.ts +251 -0
- package/src/theme-tokens.json +12 -0
- package/src/token-crypto.ts +60 -0
- package/src/token-crypto.unit.test.ts +182 -0
- package/src/trial-expiry-sweeper.integration.test.ts +318 -0
- package/src/trial-expiry-sweeper.ts +132 -0
- package/src/trial-expiry-sweeper.unit.test.ts +391 -0
- package/src/trial-expiry-warning-sweeper.integration.test.ts +468 -0
- package/src/trial-expiry-warning-sweeper.ts +447 -0
- package/src/trial-expiry-warning-sweeper.unit.test.ts +148 -0
- package/src/voice-contract.unit.test.ts +102 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Recorded fixture doubles for HttpAnthropicIdentityClient. Hand-authored with synthetic IDs and validated against the pinned Anthropic OpenAPI spec by anthropic-identity-fixture-spec.integration.test.ts. POST /v1/oauth/token is NOT in the spec and is deliberately absent here (see anthropic-identity-client.fixtures.ts).",
|
|
3
|
+
"scenarios": {
|
|
4
|
+
"createServiceAccount_success": [
|
|
5
|
+
{
|
|
6
|
+
"request": {
|
|
7
|
+
"method": "POST",
|
|
8
|
+
"path": "/v1/organizations/service_accounts",
|
|
9
|
+
"body": {
|
|
10
|
+
"name": "agent-alpha",
|
|
11
|
+
"description": "Shipwright agent alpha",
|
|
12
|
+
"organization_role": "developer"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"response": {
|
|
16
|
+
"status": 200,
|
|
17
|
+
"body": {
|
|
18
|
+
"type": "service_account",
|
|
19
|
+
"id": "svac_01Alpha",
|
|
20
|
+
"name": "agent-alpha",
|
|
21
|
+
"description": null,
|
|
22
|
+
"organization_role": "developer",
|
|
23
|
+
"archived_at": null,
|
|
24
|
+
"archived_by_actor_id": null,
|
|
25
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
26
|
+
"created_by_actor_id": "svac_01Admin",
|
|
27
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
28
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"createServiceAccount_duplicate_409": [
|
|
34
|
+
{
|
|
35
|
+
"request": {
|
|
36
|
+
"method": "POST",
|
|
37
|
+
"path": "/v1/organizations/service_accounts",
|
|
38
|
+
"body": {
|
|
39
|
+
"name": "agent-alpha",
|
|
40
|
+
"description": "Shipwright agent alpha",
|
|
41
|
+
"organization_role": "developer"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"response": {
|
|
45
|
+
"status": 409,
|
|
46
|
+
"body": {
|
|
47
|
+
"type": "error",
|
|
48
|
+
"error": {
|
|
49
|
+
"type": "invalid_request_error",
|
|
50
|
+
"message": "A service account with this name already exists"
|
|
51
|
+
},
|
|
52
|
+
"request_id": "req_01Fake"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"createServiceAccount_unauthorized_401": [
|
|
58
|
+
{
|
|
59
|
+
"request": {
|
|
60
|
+
"method": "POST",
|
|
61
|
+
"path": "/v1/organizations/service_accounts",
|
|
62
|
+
"body": {
|
|
63
|
+
"name": "agent-alpha",
|
|
64
|
+
"description": "Shipwright agent alpha",
|
|
65
|
+
"organization_role": "developer"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"response": {
|
|
69
|
+
"status": 401,
|
|
70
|
+
"body": {
|
|
71
|
+
"type": "error",
|
|
72
|
+
"error": {
|
|
73
|
+
"type": "authentication_error",
|
|
74
|
+
"message": "invalid bearer token"
|
|
75
|
+
},
|
|
76
|
+
"request_id": "req_01Fake"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"request": {
|
|
82
|
+
"method": "POST",
|
|
83
|
+
"path": "/v1/organizations/service_accounts",
|
|
84
|
+
"body": {
|
|
85
|
+
"name": "agent-alpha",
|
|
86
|
+
"description": "Shipwright agent alpha",
|
|
87
|
+
"organization_role": "developer"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"response": {
|
|
91
|
+
"status": 401,
|
|
92
|
+
"body": {
|
|
93
|
+
"type": "error",
|
|
94
|
+
"error": {
|
|
95
|
+
"type": "authentication_error",
|
|
96
|
+
"message": "invalid bearer token"
|
|
97
|
+
},
|
|
98
|
+
"request_id": "req_01Fake"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"createServiceAccount_unauthorized_then_success": [
|
|
104
|
+
{
|
|
105
|
+
"request": {
|
|
106
|
+
"method": "POST",
|
|
107
|
+
"path": "/v1/organizations/service_accounts",
|
|
108
|
+
"body": {
|
|
109
|
+
"name": "agent-alpha",
|
|
110
|
+
"description": "Shipwright agent alpha",
|
|
111
|
+
"organization_role": "developer"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"response": {
|
|
115
|
+
"status": 401,
|
|
116
|
+
"body": {
|
|
117
|
+
"type": "error",
|
|
118
|
+
"error": {
|
|
119
|
+
"type": "authentication_error",
|
|
120
|
+
"message": "expired bearer token"
|
|
121
|
+
},
|
|
122
|
+
"request_id": "req_01Fake"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"request": {
|
|
128
|
+
"method": "POST",
|
|
129
|
+
"path": "/v1/organizations/service_accounts",
|
|
130
|
+
"body": {
|
|
131
|
+
"name": "agent-alpha",
|
|
132
|
+
"description": "Shipwright agent alpha",
|
|
133
|
+
"organization_role": "developer"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"response": {
|
|
137
|
+
"status": 200,
|
|
138
|
+
"body": {
|
|
139
|
+
"type": "service_account",
|
|
140
|
+
"id": "svac_01Alpha",
|
|
141
|
+
"name": "agent-alpha",
|
|
142
|
+
"description": null,
|
|
143
|
+
"organization_role": "developer",
|
|
144
|
+
"archived_at": null,
|
|
145
|
+
"archived_by_actor_id": null,
|
|
146
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
147
|
+
"created_by_actor_id": "svac_01Admin",
|
|
148
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
149
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"addServiceAccountToWorkspace_success": [
|
|
155
|
+
{
|
|
156
|
+
"request": {
|
|
157
|
+
"method": "POST",
|
|
158
|
+
"path": "/v1/organizations/service_accounts/svac_01Alpha/workspaces",
|
|
159
|
+
"body": {
|
|
160
|
+
"workspace_id": "wrkspc_01Work",
|
|
161
|
+
"workspace_role": "workspace_developer"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"response": {
|
|
165
|
+
"status": 200,
|
|
166
|
+
"body": {
|
|
167
|
+
"type": "service_account_workspace_member",
|
|
168
|
+
"service_account_id": "svac_01Alpha",
|
|
169
|
+
"workspace_id": "wrkspc_01Work",
|
|
170
|
+
"workspace_role": "workspace_developer",
|
|
171
|
+
"created_by_actor_id": "svac_01Admin",
|
|
172
|
+
"implicit": false
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"addServiceAccountToWorkspace_not_found_404": [
|
|
178
|
+
{
|
|
179
|
+
"request": {
|
|
180
|
+
"method": "POST",
|
|
181
|
+
"path": "/v1/organizations/service_accounts/svac_01Missing/workspaces",
|
|
182
|
+
"body": {
|
|
183
|
+
"workspace_id": "wrkspc_01Work",
|
|
184
|
+
"workspace_role": "workspace_developer"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"response": {
|
|
188
|
+
"status": 404,
|
|
189
|
+
"body": {
|
|
190
|
+
"type": "error",
|
|
191
|
+
"error": {
|
|
192
|
+
"type": "not_found_error",
|
|
193
|
+
"message": "service account not found"
|
|
194
|
+
},
|
|
195
|
+
"request_id": "req_01Fake"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"createFederationRule_success": [
|
|
201
|
+
{
|
|
202
|
+
"request": {
|
|
203
|
+
"method": "POST",
|
|
204
|
+
"path": "/v1/organizations/federation_rules",
|
|
205
|
+
"body": {
|
|
206
|
+
"name": "agent-alpha",
|
|
207
|
+
"description": "Shipwright agent alpha",
|
|
208
|
+
"issuer_id": "fdis_01Issuer",
|
|
209
|
+
"match": {
|
|
210
|
+
"subject_prefix": "system:serviceaccount:agents:agent-alpha"
|
|
211
|
+
},
|
|
212
|
+
"oauth_scope": "workspace:developer",
|
|
213
|
+
"target": {
|
|
214
|
+
"type": "service_account",
|
|
215
|
+
"service_account_id": "svac_01Alpha"
|
|
216
|
+
},
|
|
217
|
+
"workspace_id": "wrkspc_01Work"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"response": {
|
|
221
|
+
"status": 200,
|
|
222
|
+
"body": {
|
|
223
|
+
"type": "federation_rule",
|
|
224
|
+
"id": "fdrl_01Alpha",
|
|
225
|
+
"name": "agent-alpha",
|
|
226
|
+
"description": null,
|
|
227
|
+
"issuer_id": "fdis_01Issuer",
|
|
228
|
+
"issuer_name": "cluster",
|
|
229
|
+
"match": {
|
|
230
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
231
|
+
"audience": null,
|
|
232
|
+
"claims": null,
|
|
233
|
+
"condition": null
|
|
234
|
+
},
|
|
235
|
+
"oauth_scope": "workspace:developer",
|
|
236
|
+
"target": {
|
|
237
|
+
"type": "service_account",
|
|
238
|
+
"service_account_id": "svac_01Alpha",
|
|
239
|
+
"service_account_name": "svc"
|
|
240
|
+
},
|
|
241
|
+
"applies_to_all_workspaces": false,
|
|
242
|
+
"attributes": null,
|
|
243
|
+
"token_lifetime_seconds": 3600,
|
|
244
|
+
"workspace_id": "wrkspc_01Work",
|
|
245
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
246
|
+
"archived_at": null,
|
|
247
|
+
"archived_by_actor_id": null,
|
|
248
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
249
|
+
"created_by_actor_id": "svac_01Admin",
|
|
250
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
251
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"createFederationRule_duplicate_409": [
|
|
257
|
+
{
|
|
258
|
+
"request": {
|
|
259
|
+
"method": "POST",
|
|
260
|
+
"path": "/v1/organizations/federation_rules",
|
|
261
|
+
"body": {
|
|
262
|
+
"name": "agent-alpha",
|
|
263
|
+
"description": "Shipwright agent alpha",
|
|
264
|
+
"issuer_id": "fdis_01Issuer",
|
|
265
|
+
"match": {
|
|
266
|
+
"subject_prefix": "system:serviceaccount:agents:agent-alpha"
|
|
267
|
+
},
|
|
268
|
+
"oauth_scope": "workspace:developer",
|
|
269
|
+
"target": {
|
|
270
|
+
"type": "service_account",
|
|
271
|
+
"service_account_id": "svac_01Alpha"
|
|
272
|
+
},
|
|
273
|
+
"workspace_id": "wrkspc_01Work"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"response": {
|
|
277
|
+
"status": 409,
|
|
278
|
+
"body": {
|
|
279
|
+
"type": "error",
|
|
280
|
+
"error": {
|
|
281
|
+
"type": "invalid_request_error",
|
|
282
|
+
"message": "A federation rule with this name already exists"
|
|
283
|
+
},
|
|
284
|
+
"request_id": "req_01Fake"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"archiveFederationRule_success": [
|
|
290
|
+
{
|
|
291
|
+
"request": {
|
|
292
|
+
"method": "POST",
|
|
293
|
+
"path": "/v1/organizations/federation_rules/fdrl_01Alpha/archive"
|
|
294
|
+
},
|
|
295
|
+
"response": {
|
|
296
|
+
"status": 200,
|
|
297
|
+
"body": {
|
|
298
|
+
"type": "federation_rule",
|
|
299
|
+
"id": "fdrl_01Alpha",
|
|
300
|
+
"name": "agent-alpha",
|
|
301
|
+
"description": null,
|
|
302
|
+
"issuer_id": "fdis_01Issuer",
|
|
303
|
+
"issuer_name": "cluster",
|
|
304
|
+
"match": {
|
|
305
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
306
|
+
"audience": null,
|
|
307
|
+
"claims": null,
|
|
308
|
+
"condition": null
|
|
309
|
+
},
|
|
310
|
+
"oauth_scope": "workspace:developer",
|
|
311
|
+
"target": {
|
|
312
|
+
"type": "service_account",
|
|
313
|
+
"service_account_id": "svac_01Alpha",
|
|
314
|
+
"service_account_name": "svc"
|
|
315
|
+
},
|
|
316
|
+
"applies_to_all_workspaces": false,
|
|
317
|
+
"attributes": null,
|
|
318
|
+
"token_lifetime_seconds": 3600,
|
|
319
|
+
"workspace_id": "wrkspc_01Work",
|
|
320
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
321
|
+
"archived_at": "2026-10-02T09:30:00Z",
|
|
322
|
+
"archived_by_actor_id": "svac_01Admin",
|
|
323
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
324
|
+
"created_by_actor_id": "svac_01Admin",
|
|
325
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
326
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"archiveServiceAccount_success": [
|
|
332
|
+
{
|
|
333
|
+
"request": {
|
|
334
|
+
"method": "POST",
|
|
335
|
+
"path": "/v1/organizations/service_accounts/svac_01Alpha/archive"
|
|
336
|
+
},
|
|
337
|
+
"response": {
|
|
338
|
+
"status": 200,
|
|
339
|
+
"body": {
|
|
340
|
+
"type": "service_account",
|
|
341
|
+
"id": "svac_01Alpha",
|
|
342
|
+
"name": "agent-alpha",
|
|
343
|
+
"description": null,
|
|
344
|
+
"organization_role": "developer",
|
|
345
|
+
"archived_at": "2026-10-02T09:31:00Z",
|
|
346
|
+
"archived_by_actor_id": "user_01Admin",
|
|
347
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
348
|
+
"created_by_actor_id": "svac_01Admin",
|
|
349
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
350
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"archiveServiceAccount_unauthorized_401": [
|
|
356
|
+
{
|
|
357
|
+
"request": {
|
|
358
|
+
"method": "POST",
|
|
359
|
+
"path": "/v1/organizations/service_accounts/svac_01Alpha/archive"
|
|
360
|
+
},
|
|
361
|
+
"response": {
|
|
362
|
+
"status": 401,
|
|
363
|
+
"body": {
|
|
364
|
+
"type": "error",
|
|
365
|
+
"error": {
|
|
366
|
+
"type": "authentication_error",
|
|
367
|
+
"message": "invalid bearer token"
|
|
368
|
+
},
|
|
369
|
+
"request_id": "req_01Fake"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"request": {
|
|
375
|
+
"method": "POST",
|
|
376
|
+
"path": "/v1/organizations/service_accounts/svac_01Alpha/archive"
|
|
377
|
+
},
|
|
378
|
+
"response": {
|
|
379
|
+
"status": 401,
|
|
380
|
+
"body": {
|
|
381
|
+
"type": "error",
|
|
382
|
+
"error": {
|
|
383
|
+
"type": "authentication_error",
|
|
384
|
+
"message": "invalid bearer token"
|
|
385
|
+
},
|
|
386
|
+
"request_id": "req_01Fake"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"findServiceAccountByName_found_on_second_page": [
|
|
392
|
+
{
|
|
393
|
+
"request": {
|
|
394
|
+
"method": "GET",
|
|
395
|
+
"path": "/v1/organizations/service_accounts",
|
|
396
|
+
"query": {
|
|
397
|
+
"limit": "100"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"response": {
|
|
401
|
+
"status": 200,
|
|
402
|
+
"body": {
|
|
403
|
+
"data": [
|
|
404
|
+
{
|
|
405
|
+
"type": "service_account",
|
|
406
|
+
"id": "svac_01A",
|
|
407
|
+
"name": "agent-one",
|
|
408
|
+
"description": null,
|
|
409
|
+
"organization_role": "developer",
|
|
410
|
+
"archived_at": null,
|
|
411
|
+
"archived_by_actor_id": null,
|
|
412
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
413
|
+
"created_by_actor_id": "svac_01Admin",
|
|
414
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
415
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"type": "service_account",
|
|
419
|
+
"id": "svac_01B",
|
|
420
|
+
"name": "agent-two",
|
|
421
|
+
"description": null,
|
|
422
|
+
"organization_role": "developer",
|
|
423
|
+
"archived_at": null,
|
|
424
|
+
"archived_by_actor_id": null,
|
|
425
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
426
|
+
"created_by_actor_id": "svac_01Admin",
|
|
427
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
428
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"next_page": "cursor-page-2"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"request": {
|
|
437
|
+
"method": "GET",
|
|
438
|
+
"path": "/v1/organizations/service_accounts",
|
|
439
|
+
"query": {
|
|
440
|
+
"limit": "100",
|
|
441
|
+
"page": "cursor-page-2"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"response": {
|
|
445
|
+
"status": 200,
|
|
446
|
+
"body": {
|
|
447
|
+
"data": [
|
|
448
|
+
{
|
|
449
|
+
"type": "service_account",
|
|
450
|
+
"id": "svac_01C",
|
|
451
|
+
"name": "agent-three",
|
|
452
|
+
"description": null,
|
|
453
|
+
"organization_role": "developer",
|
|
454
|
+
"archived_at": null,
|
|
455
|
+
"archived_by_actor_id": null,
|
|
456
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
457
|
+
"created_by_actor_id": "svac_01Admin",
|
|
458
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
459
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"type": "service_account",
|
|
463
|
+
"id": "svac_01Alpha",
|
|
464
|
+
"name": "agent-alpha",
|
|
465
|
+
"description": null,
|
|
466
|
+
"organization_role": "developer",
|
|
467
|
+
"archived_at": null,
|
|
468
|
+
"archived_by_actor_id": null,
|
|
469
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
470
|
+
"created_by_actor_id": "svac_01Admin",
|
|
471
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
472
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"next_page": "cursor-page-3"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"findServiceAccountByName_not_found_exhausted": [
|
|
481
|
+
{
|
|
482
|
+
"request": {
|
|
483
|
+
"method": "GET",
|
|
484
|
+
"path": "/v1/organizations/service_accounts",
|
|
485
|
+
"query": {
|
|
486
|
+
"limit": "100"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"response": {
|
|
490
|
+
"status": 200,
|
|
491
|
+
"body": {
|
|
492
|
+
"data": [
|
|
493
|
+
{
|
|
494
|
+
"type": "service_account",
|
|
495
|
+
"id": "svac_01A",
|
|
496
|
+
"name": "agent-one",
|
|
497
|
+
"description": null,
|
|
498
|
+
"organization_role": "developer",
|
|
499
|
+
"archived_at": null,
|
|
500
|
+
"archived_by_actor_id": null,
|
|
501
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
502
|
+
"created_by_actor_id": "svac_01Admin",
|
|
503
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
504
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"next_page": "cursor-page-2"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"request": {
|
|
513
|
+
"method": "GET",
|
|
514
|
+
"path": "/v1/organizations/service_accounts",
|
|
515
|
+
"query": {
|
|
516
|
+
"limit": "100",
|
|
517
|
+
"page": "cursor-page-2"
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"response": {
|
|
521
|
+
"status": 200,
|
|
522
|
+
"body": {
|
|
523
|
+
"data": [
|
|
524
|
+
{
|
|
525
|
+
"type": "service_account",
|
|
526
|
+
"id": "svac_01B",
|
|
527
|
+
"name": "agent-two",
|
|
528
|
+
"description": null,
|
|
529
|
+
"organization_role": "developer",
|
|
530
|
+
"archived_at": null,
|
|
531
|
+
"archived_by_actor_id": null,
|
|
532
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
533
|
+
"created_by_actor_id": "svac_01Admin",
|
|
534
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
535
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
"next_page": "cursor-page-3"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"request": {
|
|
544
|
+
"method": "GET",
|
|
545
|
+
"path": "/v1/organizations/service_accounts",
|
|
546
|
+
"query": {
|
|
547
|
+
"limit": "100",
|
|
548
|
+
"page": "cursor-page-3"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"response": {
|
|
552
|
+
"status": 200,
|
|
553
|
+
"body": {
|
|
554
|
+
"data": [
|
|
555
|
+
{
|
|
556
|
+
"type": "service_account",
|
|
557
|
+
"id": "svac_01C",
|
|
558
|
+
"name": "agent-three",
|
|
559
|
+
"description": null,
|
|
560
|
+
"organization_role": "developer",
|
|
561
|
+
"archived_at": null,
|
|
562
|
+
"archived_by_actor_id": null,
|
|
563
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
564
|
+
"created_by_actor_id": "svac_01Admin",
|
|
565
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
566
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
567
|
+
}
|
|
568
|
+
],
|
|
569
|
+
"next_page": null
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
"findServiceAccountByName_empty": [
|
|
575
|
+
{
|
|
576
|
+
"request": {
|
|
577
|
+
"method": "GET",
|
|
578
|
+
"path": "/v1/organizations/service_accounts",
|
|
579
|
+
"query": {
|
|
580
|
+
"limit": "100"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"response": {
|
|
584
|
+
"status": 200,
|
|
585
|
+
"body": {
|
|
586
|
+
"data": [],
|
|
587
|
+
"next_page": null
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
"findFederationRuleByName_found_on_third_page": [
|
|
593
|
+
{
|
|
594
|
+
"request": {
|
|
595
|
+
"method": "GET",
|
|
596
|
+
"path": "/v1/organizations/federation_rules",
|
|
597
|
+
"query": {
|
|
598
|
+
"limit": "100"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"response": {
|
|
602
|
+
"status": 200,
|
|
603
|
+
"body": {
|
|
604
|
+
"data": [
|
|
605
|
+
{
|
|
606
|
+
"type": "federation_rule",
|
|
607
|
+
"id": "fdrl_01A",
|
|
608
|
+
"name": "rule-one",
|
|
609
|
+
"description": null,
|
|
610
|
+
"issuer_id": "fdis_01Issuer",
|
|
611
|
+
"issuer_name": "cluster",
|
|
612
|
+
"match": {
|
|
613
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
614
|
+
"audience": null,
|
|
615
|
+
"claims": null,
|
|
616
|
+
"condition": null
|
|
617
|
+
},
|
|
618
|
+
"oauth_scope": "workspace:developer",
|
|
619
|
+
"target": {
|
|
620
|
+
"type": "service_account",
|
|
621
|
+
"service_account_id": "svac_01A",
|
|
622
|
+
"service_account_name": "svc"
|
|
623
|
+
},
|
|
624
|
+
"applies_to_all_workspaces": false,
|
|
625
|
+
"attributes": null,
|
|
626
|
+
"token_lifetime_seconds": 3600,
|
|
627
|
+
"workspace_id": "wrkspc_01Work",
|
|
628
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
629
|
+
"archived_at": null,
|
|
630
|
+
"archived_by_actor_id": null,
|
|
631
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
632
|
+
"created_by_actor_id": "svac_01Admin",
|
|
633
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
634
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
635
|
+
}
|
|
636
|
+
],
|
|
637
|
+
"next_page": "cursor-page-2"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"request": {
|
|
643
|
+
"method": "GET",
|
|
644
|
+
"path": "/v1/organizations/federation_rules",
|
|
645
|
+
"query": {
|
|
646
|
+
"limit": "100",
|
|
647
|
+
"page": "cursor-page-2"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"response": {
|
|
651
|
+
"status": 200,
|
|
652
|
+
"body": {
|
|
653
|
+
"data": [
|
|
654
|
+
{
|
|
655
|
+
"type": "federation_rule",
|
|
656
|
+
"id": "fdrl_01B",
|
|
657
|
+
"name": "rule-two",
|
|
658
|
+
"description": null,
|
|
659
|
+
"issuer_id": "fdis_01Issuer",
|
|
660
|
+
"issuer_name": "cluster",
|
|
661
|
+
"match": {
|
|
662
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
663
|
+
"audience": null,
|
|
664
|
+
"claims": null,
|
|
665
|
+
"condition": null
|
|
666
|
+
},
|
|
667
|
+
"oauth_scope": "workspace:developer",
|
|
668
|
+
"target": {
|
|
669
|
+
"type": "service_account",
|
|
670
|
+
"service_account_id": "svac_01B",
|
|
671
|
+
"service_account_name": "svc"
|
|
672
|
+
},
|
|
673
|
+
"applies_to_all_workspaces": false,
|
|
674
|
+
"attributes": null,
|
|
675
|
+
"token_lifetime_seconds": 3600,
|
|
676
|
+
"workspace_id": "wrkspc_01Work",
|
|
677
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
678
|
+
"archived_at": null,
|
|
679
|
+
"archived_by_actor_id": null,
|
|
680
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
681
|
+
"created_by_actor_id": "svac_01Admin",
|
|
682
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
683
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
684
|
+
}
|
|
685
|
+
],
|
|
686
|
+
"next_page": "cursor-page-3"
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"request": {
|
|
692
|
+
"method": "GET",
|
|
693
|
+
"path": "/v1/organizations/federation_rules",
|
|
694
|
+
"query": {
|
|
695
|
+
"limit": "100",
|
|
696
|
+
"page": "cursor-page-3"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"response": {
|
|
700
|
+
"status": 200,
|
|
701
|
+
"body": {
|
|
702
|
+
"data": [
|
|
703
|
+
{
|
|
704
|
+
"type": "federation_rule",
|
|
705
|
+
"id": "fdrl_01Alpha",
|
|
706
|
+
"name": "agent-alpha",
|
|
707
|
+
"description": null,
|
|
708
|
+
"issuer_id": "fdis_01Issuer",
|
|
709
|
+
"issuer_name": "cluster",
|
|
710
|
+
"match": {
|
|
711
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
712
|
+
"audience": null,
|
|
713
|
+
"claims": null,
|
|
714
|
+
"condition": null
|
|
715
|
+
},
|
|
716
|
+
"oauth_scope": "workspace:developer",
|
|
717
|
+
"target": {
|
|
718
|
+
"type": "service_account",
|
|
719
|
+
"service_account_id": "svac_01Alpha",
|
|
720
|
+
"service_account_name": "svc"
|
|
721
|
+
},
|
|
722
|
+
"applies_to_all_workspaces": false,
|
|
723
|
+
"attributes": null,
|
|
724
|
+
"token_lifetime_seconds": 3600,
|
|
725
|
+
"workspace_id": "wrkspc_01Work",
|
|
726
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
727
|
+
"archived_at": null,
|
|
728
|
+
"archived_by_actor_id": null,
|
|
729
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
730
|
+
"created_by_actor_id": "svac_01Admin",
|
|
731
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
732
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
733
|
+
}
|
|
734
|
+
],
|
|
735
|
+
"next_page": null
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
],
|
|
740
|
+
"findFederationRuleByName_not_found": [
|
|
741
|
+
{
|
|
742
|
+
"request": {
|
|
743
|
+
"method": "GET",
|
|
744
|
+
"path": "/v1/organizations/federation_rules",
|
|
745
|
+
"query": {
|
|
746
|
+
"limit": "100"
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"response": {
|
|
750
|
+
"status": 200,
|
|
751
|
+
"body": {
|
|
752
|
+
"data": [
|
|
753
|
+
{
|
|
754
|
+
"type": "federation_rule",
|
|
755
|
+
"id": "fdrl_01A",
|
|
756
|
+
"name": "rule-one",
|
|
757
|
+
"description": null,
|
|
758
|
+
"issuer_id": "fdis_01Issuer",
|
|
759
|
+
"issuer_name": "cluster",
|
|
760
|
+
"match": {
|
|
761
|
+
"subject_prefix": "system:serviceaccount:agents:",
|
|
762
|
+
"audience": null,
|
|
763
|
+
"claims": null,
|
|
764
|
+
"condition": null
|
|
765
|
+
},
|
|
766
|
+
"oauth_scope": "workspace:developer",
|
|
767
|
+
"target": {
|
|
768
|
+
"type": "service_account",
|
|
769
|
+
"service_account_id": "svac_01A",
|
|
770
|
+
"service_account_name": "svc"
|
|
771
|
+
},
|
|
772
|
+
"applies_to_all_workspaces": false,
|
|
773
|
+
"attributes": null,
|
|
774
|
+
"token_lifetime_seconds": 3600,
|
|
775
|
+
"workspace_id": "wrkspc_01Work",
|
|
776
|
+
"workspace_ids": ["wrkspc_01Work"],
|
|
777
|
+
"archived_at": null,
|
|
778
|
+
"archived_by_actor_id": null,
|
|
779
|
+
"created_at": "2026-10-01T12:00:00Z",
|
|
780
|
+
"created_by_actor_id": "svac_01Admin",
|
|
781
|
+
"updated_at": "2026-10-01T12:00:00Z",
|
|
782
|
+
"updated_by_actor_id": "svac_01Admin"
|
|
783
|
+
}
|
|
784
|
+
],
|
|
785
|
+
"next_page": "cursor-page-2"
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"request": {
|
|
791
|
+
"method": "GET",
|
|
792
|
+
"path": "/v1/organizations/federation_rules",
|
|
793
|
+
"query": {
|
|
794
|
+
"limit": "100",
|
|
795
|
+
"page": "cursor-page-2"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
"response": {
|
|
799
|
+
"status": 200,
|
|
800
|
+
"body": {
|
|
801
|
+
"data": [],
|
|
802
|
+
"next_page": null
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
"findServiceAccountByName_unauthorized_401": [
|
|
808
|
+
{
|
|
809
|
+
"request": {
|
|
810
|
+
"method": "GET",
|
|
811
|
+
"path": "/v1/organizations/service_accounts",
|
|
812
|
+
"query": {
|
|
813
|
+
"limit": "100"
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"response": {
|
|
817
|
+
"status": 401,
|
|
818
|
+
"body": {
|
|
819
|
+
"type": "error",
|
|
820
|
+
"error": {
|
|
821
|
+
"type": "authentication_error",
|
|
822
|
+
"message": "invalid bearer token"
|
|
823
|
+
},
|
|
824
|
+
"request_id": "req_01Fake"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"request": {
|
|
830
|
+
"method": "GET",
|
|
831
|
+
"path": "/v1/organizations/service_accounts",
|
|
832
|
+
"query": {
|
|
833
|
+
"limit": "100"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"response": {
|
|
837
|
+
"status": 401,
|
|
838
|
+
"body": {
|
|
839
|
+
"type": "error",
|
|
840
|
+
"error": {
|
|
841
|
+
"type": "authentication_error",
|
|
842
|
+
"message": "invalid bearer token"
|
|
843
|
+
},
|
|
844
|
+
"request_id": "req_01Fake"
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
}
|
|
850
|
+
}
|