@1claw/openapi-spec 0.17.0 → 0.19.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/README.md +3 -3
- package/openapi.json +475 -2
- package/openapi.yaml +316 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,14 +40,14 @@ openapi-generator generate \
|
|
|
40
40
|
import spec from "@1claw/openapi-spec/openapi.json";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's in the spec (v0.
|
|
43
|
+
## What's in the spec (v0.19.0)
|
|
44
44
|
|
|
45
45
|
- **Auth — agent JWT** — `POST /v1/auth/agent-token` documents optional JWT claim **`shroud_config`** when the agent has Shroud enabled (mirrors DB; consumed by Shroud PolicyEngine on LLM requests). Re-exchange after changing agent Shroud settings.
|
|
46
46
|
- **Auth — password reset** — `POST /v1/auth/forgot-password`, `POST /v1/auth/reset-password` (public; anti-enumeration on forgot)
|
|
47
47
|
- **Billing — LLM token billing** — `GET /v1/billing/llm-token-billing` (`LlmTokenBillingStatus`: `enabled`, `subscription_status`, optional `credit_balance`, optional `billing_cycle_usage` with `metered_lines[]`), `POST .../subscribe`, `POST .../disable` (Stripe AI Gateway add-on; optional org feature)
|
|
48
48
|
- **Treasury** — Safe multisig treasuries: `POST/GET /v1/treasury`, `GET/PATCH/DELETE /v1/treasury/{id}`, signers, agent access requests (`requests[]` on list)
|
|
49
|
-
- **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking
|
|
50
|
-
- **Secrets** — CRUD, versioning, CMEK-encrypted flag
|
|
49
|
+
- **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking, MPC enable/disable (`POST /v1/vaults/{id}/mpc`, `DELETE /v1/vaults/{id}/mpc`)
|
|
50
|
+
- **Secrets** — CRUD, versioning, CMEK-encrypted flag, `client_share` in responses (MPC vaults)
|
|
51
51
|
- **Agents** — CRUD with `auth_method` (api_key, mtls, oidc_client_credentials), auto-generated SSH keypairs, `token_ttl_seconds`, `vault_ids`, Intents API, transaction guardrails
|
|
52
52
|
- **Policies** — Glob-based access control
|
|
53
53
|
- **Sharing** — Links, user/agent shares, accept/decline
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.9.0",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.xyz"
|
|
@@ -1221,6 +1221,52 @@
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
},
|
|
1224
|
+
"/v1/vaults/{vault_id}/mpc": {
|
|
1225
|
+
"post": {
|
|
1226
|
+
"tags": [
|
|
1227
|
+
"Vaults"
|
|
1228
|
+
],
|
|
1229
|
+
"summary": "Enable MPC custody on a vault",
|
|
1230
|
+
"operationId": "enableMpc",
|
|
1231
|
+
"description": "Enable MPC custody on an existing vault. Requires Business or Enterprise plan.\nSplits secret encryption keys across multiple providers using the specified\ncustody mode (e.g. 2-of-2, 2-of-3).\n",
|
|
1232
|
+
"parameters": [
|
|
1233
|
+
{
|
|
1234
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1235
|
+
}
|
|
1236
|
+
],
|
|
1237
|
+
"requestBody": {
|
|
1238
|
+
"required": true,
|
|
1239
|
+
"content": {
|
|
1240
|
+
"application/json": {
|
|
1241
|
+
"schema": {
|
|
1242
|
+
"$ref": "#/components/schemas/EnableMpcRequest"
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
"responses": {
|
|
1248
|
+
"200": {
|
|
1249
|
+
"description": "MPC custody enabled",
|
|
1250
|
+
"content": {
|
|
1251
|
+
"application/json": {
|
|
1252
|
+
"schema": {
|
|
1253
|
+
"$ref": "#/components/schemas/VaultResponse"
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
"400": {
|
|
1259
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1260
|
+
},
|
|
1261
|
+
"403": {
|
|
1262
|
+
"$ref": "#/components/responses/Forbidden"
|
|
1263
|
+
},
|
|
1264
|
+
"404": {
|
|
1265
|
+
"$ref": "#/components/responses/NotFound"
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1224
1270
|
"/v1/vaults/{vault_id}/secrets": {
|
|
1225
1271
|
"get": {
|
|
1226
1272
|
"tags": [
|
|
@@ -1299,7 +1345,7 @@
|
|
|
1299
1345
|
"content": {
|
|
1300
1346
|
"application/json": {
|
|
1301
1347
|
"schema": {
|
|
1302
|
-
"$ref": "#/components/schemas/
|
|
1348
|
+
"$ref": "#/components/schemas/SecretCreatedResponse"
|
|
1303
1349
|
}
|
|
1304
1350
|
}
|
|
1305
1351
|
}
|
|
@@ -1334,6 +1380,15 @@
|
|
|
1334
1380
|
},
|
|
1335
1381
|
{
|
|
1336
1382
|
"$ref": "#/components/parameters/SecretPath"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"name": "x-client-share",
|
|
1386
|
+
"in": "header",
|
|
1387
|
+
"required": false,
|
|
1388
|
+
"schema": {
|
|
1389
|
+
"type": "string"
|
|
1390
|
+
},
|
|
1391
|
+
"description": "Base64-encoded client key share for MPC 2-of-2 vaults. Required when the vault uses 2-of-2 MPC custody."
|
|
1337
1392
|
}
|
|
1338
1393
|
],
|
|
1339
1394
|
"responses": {
|
|
@@ -1379,6 +1434,160 @@
|
|
|
1379
1434
|
}
|
|
1380
1435
|
}
|
|
1381
1436
|
},
|
|
1437
|
+
"/v1/vaults/{vault_id}/secret-versions/{path}": {
|
|
1438
|
+
"get": {
|
|
1439
|
+
"tags": [
|
|
1440
|
+
"Secrets"
|
|
1441
|
+
],
|
|
1442
|
+
"summary": "List all versions of a secret",
|
|
1443
|
+
"operationId": "listSecretVersions",
|
|
1444
|
+
"parameters": [
|
|
1445
|
+
{
|
|
1446
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1450
|
+
}
|
|
1451
|
+
],
|
|
1452
|
+
"responses": {
|
|
1453
|
+
"200": {
|
|
1454
|
+
"description": "Version list",
|
|
1455
|
+
"content": {
|
|
1456
|
+
"application/json": {
|
|
1457
|
+
"schema": {
|
|
1458
|
+
"$ref": "#/components/schemas/SecretVersionListResponse"
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
"404": {
|
|
1464
|
+
"$ref": "#/components/responses/NotFound"
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
"/v1/vaults/{vault_id}/secret-version/{path}/{version}": {
|
|
1470
|
+
"get": {
|
|
1471
|
+
"tags": [
|
|
1472
|
+
"Secrets"
|
|
1473
|
+
],
|
|
1474
|
+
"summary": "Retrieve a specific version of a secret",
|
|
1475
|
+
"operationId": "getSecretVersion",
|
|
1476
|
+
"parameters": [
|
|
1477
|
+
{
|
|
1478
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"name": "version",
|
|
1485
|
+
"in": "path",
|
|
1486
|
+
"required": true,
|
|
1487
|
+
"schema": {
|
|
1488
|
+
"type": "integer"
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
],
|
|
1492
|
+
"responses": {
|
|
1493
|
+
"200": {
|
|
1494
|
+
"description": "Decrypted secret value at the specified version",
|
|
1495
|
+
"content": {
|
|
1496
|
+
"application/json": {
|
|
1497
|
+
"schema": {
|
|
1498
|
+
"$ref": "#/components/schemas/SecretResponse"
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
"404": {
|
|
1504
|
+
"$ref": "#/components/responses/NotFound"
|
|
1505
|
+
},
|
|
1506
|
+
"410": {
|
|
1507
|
+
"description": "Version has been disabled or expired"
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
"/v1/vaults/{vault_id}/secret-version/{path}/{version}/disable": {
|
|
1513
|
+
"post": {
|
|
1514
|
+
"tags": [
|
|
1515
|
+
"Secrets"
|
|
1516
|
+
],
|
|
1517
|
+
"summary": "Disable a specific secret version",
|
|
1518
|
+
"operationId": "disableSecretVersion",
|
|
1519
|
+
"description": "Disables a version so it can no longer be read. The version is\nretained for audit purposes but returns 410 on read attempts.\n",
|
|
1520
|
+
"parameters": [
|
|
1521
|
+
{
|
|
1522
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"name": "version",
|
|
1529
|
+
"in": "path",
|
|
1530
|
+
"required": true,
|
|
1531
|
+
"schema": {
|
|
1532
|
+
"type": "integer"
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
],
|
|
1536
|
+
"responses": {
|
|
1537
|
+
"204": {
|
|
1538
|
+
"description": "Version disabled"
|
|
1539
|
+
},
|
|
1540
|
+
"404": {
|
|
1541
|
+
"$ref": "#/components/responses/NotFound"
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
"/v1/vaults/{vault_id}/secret-rotate/{path}": {
|
|
1547
|
+
"post": {
|
|
1548
|
+
"tags": [
|
|
1549
|
+
"Secrets"
|
|
1550
|
+
],
|
|
1551
|
+
"summary": "Server-side secret rotation",
|
|
1552
|
+
"operationId": "rotateSecret",
|
|
1553
|
+
"description": "Generates a cryptographically random value and stores it as a new\nversion of the secret. The previous version is preserved in history.\nRequires rotate or write permission.\n",
|
|
1554
|
+
"parameters": [
|
|
1555
|
+
{
|
|
1556
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1560
|
+
}
|
|
1561
|
+
],
|
|
1562
|
+
"requestBody": {
|
|
1563
|
+
"content": {
|
|
1564
|
+
"application/json": {
|
|
1565
|
+
"schema": {
|
|
1566
|
+
"$ref": "#/components/schemas/RotateSecretRequest"
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
"responses": {
|
|
1572
|
+
"201": {
|
|
1573
|
+
"description": "New version created with server-generated value",
|
|
1574
|
+
"content": {
|
|
1575
|
+
"application/json": {
|
|
1576
|
+
"schema": {
|
|
1577
|
+
"$ref": "#/components/schemas/SecretCreatedResponse"
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
"400": {
|
|
1583
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1584
|
+
},
|
|
1585
|
+
"404": {
|
|
1586
|
+
"$ref": "#/components/responses/NotFound"
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1382
1591
|
"/v1/vaults/{vault_id}/policies": {
|
|
1383
1592
|
"post": {
|
|
1384
1593
|
"tags": [
|
|
@@ -4133,6 +4342,55 @@
|
|
|
4133
4342
|
}
|
|
4134
4343
|
}
|
|
4135
4344
|
}
|
|
4345
|
+
},
|
|
4346
|
+
"/v1/shroud/threat-summary": {
|
|
4347
|
+
"get": {
|
|
4348
|
+
"tags": [
|
|
4349
|
+
"Shroud"
|
|
4350
|
+
],
|
|
4351
|
+
"summary": "Shroud threat analytics summary",
|
|
4352
|
+
"description": "Aggregated threat metrics for the organization from `shroud_activity` (detectors, blocked counts, recent flagged requests). Query `period` selects the window; the previous window of equal length is used for request volume trend.\n",
|
|
4353
|
+
"security": [
|
|
4354
|
+
{
|
|
4355
|
+
"BearerAuth": []
|
|
4356
|
+
}
|
|
4357
|
+
],
|
|
4358
|
+
"parameters": [
|
|
4359
|
+
{
|
|
4360
|
+
"in": "query",
|
|
4361
|
+
"name": "period",
|
|
4362
|
+
"schema": {
|
|
4363
|
+
"type": "string",
|
|
4364
|
+
"enum": [
|
|
4365
|
+
"1h",
|
|
4366
|
+
"24h",
|
|
4367
|
+
"7d",
|
|
4368
|
+
"30d"
|
|
4369
|
+
],
|
|
4370
|
+
"default": "24h"
|
|
4371
|
+
},
|
|
4372
|
+
"description": "Rolling window ending now"
|
|
4373
|
+
}
|
|
4374
|
+
],
|
|
4375
|
+
"responses": {
|
|
4376
|
+
"200": {
|
|
4377
|
+
"description": "Threat summary",
|
|
4378
|
+
"content": {
|
|
4379
|
+
"application/json": {
|
|
4380
|
+
"schema": {
|
|
4381
|
+
"$ref": "#/components/schemas/ShroudThreatSummary"
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
},
|
|
4386
|
+
"400": {
|
|
4387
|
+
"description": "Invalid period"
|
|
4388
|
+
},
|
|
4389
|
+
"401": {
|
|
4390
|
+
"description": "Unauthorized"
|
|
4391
|
+
}
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4136
4394
|
}
|
|
4137
4395
|
},
|
|
4138
4396
|
"components": {
|
|
@@ -4810,6 +5068,10 @@
|
|
|
4810
5068
|
},
|
|
4811
5069
|
"description": {
|
|
4812
5070
|
"type": "string"
|
|
5071
|
+
},
|
|
5072
|
+
"mpc_custody": {
|
|
5073
|
+
"type": "string",
|
|
5074
|
+
"description": "MPC custody mode to enable at creation (e.g. \"2-of-2\", \"2-of-3\")"
|
|
4813
5075
|
}
|
|
4814
5076
|
}
|
|
4815
5077
|
},
|
|
@@ -4848,6 +5110,21 @@
|
|
|
4848
5110
|
"cmek_fingerprint": {
|
|
4849
5111
|
"type": "string",
|
|
4850
5112
|
"description": "SHA-256 fingerprint of the CMEK key (64 hex chars)"
|
|
5113
|
+
},
|
|
5114
|
+
"mpc_custody": {
|
|
5115
|
+
"type": "string",
|
|
5116
|
+
"description": "MPC custody mode (e.g. \"2-of-2\", \"2-of-3\"), absent when MPC is not enabled"
|
|
5117
|
+
},
|
|
5118
|
+
"mpc_threshold": {
|
|
5119
|
+
"type": "integer",
|
|
5120
|
+
"description": "Number of shares required to reconstruct the key"
|
|
5121
|
+
},
|
|
5122
|
+
"mpc_providers": {
|
|
5123
|
+
"type": "array",
|
|
5124
|
+
"items": {
|
|
5125
|
+
"type": "string"
|
|
5126
|
+
},
|
|
5127
|
+
"description": "List of MPC share providers (e.g. [\"server\", \"client\"])"
|
|
4851
5128
|
}
|
|
4852
5129
|
}
|
|
4853
5130
|
},
|
|
@@ -4943,6 +5220,18 @@
|
|
|
4943
5220
|
}
|
|
4944
5221
|
}
|
|
4945
5222
|
},
|
|
5223
|
+
"EnableMpcRequest": {
|
|
5224
|
+
"type": "object",
|
|
5225
|
+
"required": [
|
|
5226
|
+
"mpc_custody"
|
|
5227
|
+
],
|
|
5228
|
+
"properties": {
|
|
5229
|
+
"mpc_custody": {
|
|
5230
|
+
"type": "string",
|
|
5231
|
+
"description": "MPC custody mode (e.g. \"2-of-2\", \"2-of-3\")"
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
},
|
|
4946
5235
|
"PutSecretRequest": {
|
|
4947
5236
|
"type": "object",
|
|
4948
5237
|
"required": [
|
|
@@ -5008,6 +5297,52 @@
|
|
|
5008
5297
|
"expires_at": {
|
|
5009
5298
|
"type": "string",
|
|
5010
5299
|
"format": "date-time"
|
|
5300
|
+
},
|
|
5301
|
+
"is_disabled": {
|
|
5302
|
+
"type": "boolean",
|
|
5303
|
+
"description": "Whether this version has been disabled (retained for audit but unreadable)"
|
|
5304
|
+
}
|
|
5305
|
+
}
|
|
5306
|
+
},
|
|
5307
|
+
"SecretCreatedResponse": {
|
|
5308
|
+
"description": "Returned when a secret is created or updated. Extends SecretMetadataResponse with an optional client_share for MPC vaults.",
|
|
5309
|
+
"type": "object",
|
|
5310
|
+
"required": [
|
|
5311
|
+
"id",
|
|
5312
|
+
"path",
|
|
5313
|
+
"type",
|
|
5314
|
+
"version",
|
|
5315
|
+
"created_at"
|
|
5316
|
+
],
|
|
5317
|
+
"properties": {
|
|
5318
|
+
"id": {
|
|
5319
|
+
"type": "string",
|
|
5320
|
+
"format": "uuid"
|
|
5321
|
+
},
|
|
5322
|
+
"path": {
|
|
5323
|
+
"type": "string"
|
|
5324
|
+
},
|
|
5325
|
+
"type": {
|
|
5326
|
+
"type": "string"
|
|
5327
|
+
},
|
|
5328
|
+
"version": {
|
|
5329
|
+
"type": "integer"
|
|
5330
|
+
},
|
|
5331
|
+
"metadata": {
|
|
5332
|
+
"type": "object",
|
|
5333
|
+
"additionalProperties": true
|
|
5334
|
+
},
|
|
5335
|
+
"created_at": {
|
|
5336
|
+
"type": "string",
|
|
5337
|
+
"format": "date-time"
|
|
5338
|
+
},
|
|
5339
|
+
"expires_at": {
|
|
5340
|
+
"type": "string",
|
|
5341
|
+
"format": "date-time"
|
|
5342
|
+
},
|
|
5343
|
+
"client_share": {
|
|
5344
|
+
"type": "string",
|
|
5345
|
+
"description": "Base64-encoded client key share. Returned only for MPC 2-of-2 vaults. The client must store this share securely — it is not persisted server-side."
|
|
5011
5346
|
}
|
|
5012
5347
|
}
|
|
5013
5348
|
},
|
|
@@ -5070,6 +5405,42 @@
|
|
|
5070
5405
|
}
|
|
5071
5406
|
}
|
|
5072
5407
|
},
|
|
5408
|
+
"SecretVersionListResponse": {
|
|
5409
|
+
"type": "object",
|
|
5410
|
+
"properties": {
|
|
5411
|
+
"versions": {
|
|
5412
|
+
"type": "array",
|
|
5413
|
+
"items": {
|
|
5414
|
+
"$ref": "#/components/schemas/SecretMetadataResponse"
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
}
|
|
5418
|
+
},
|
|
5419
|
+
"RotateSecretRequest": {
|
|
5420
|
+
"type": "object",
|
|
5421
|
+
"properties": {
|
|
5422
|
+
"length": {
|
|
5423
|
+
"type": "integer",
|
|
5424
|
+
"minimum": 8,
|
|
5425
|
+
"maximum": 1024,
|
|
5426
|
+
"description": "Length of the generated value (default 32)"
|
|
5427
|
+
},
|
|
5428
|
+
"charset": {
|
|
5429
|
+
"type": "string",
|
|
5430
|
+
"enum": [
|
|
5431
|
+
"hex",
|
|
5432
|
+
"base64",
|
|
5433
|
+
"alphanumeric",
|
|
5434
|
+
"ascii"
|
|
5435
|
+
],
|
|
5436
|
+
"description": "Character set for the generated value (default hex)"
|
|
5437
|
+
},
|
|
5438
|
+
"type": {
|
|
5439
|
+
"type": "string",
|
|
5440
|
+
"description": "Override the secret type (defaults to existing secret's type)"
|
|
5441
|
+
}
|
|
5442
|
+
}
|
|
5443
|
+
},
|
|
5073
5444
|
"CreatePolicyRequest": {
|
|
5074
5445
|
"type": "object",
|
|
5075
5446
|
"required": [
|
|
@@ -7934,6 +8305,108 @@
|
|
|
7934
8305
|
}
|
|
7935
8306
|
}
|
|
7936
8307
|
},
|
|
8308
|
+
"ShroudThreatSummary": {
|
|
8309
|
+
"type": "object",
|
|
8310
|
+
"properties": {
|
|
8311
|
+
"total_requests": {
|
|
8312
|
+
"type": "integer",
|
|
8313
|
+
"format": "int64"
|
|
8314
|
+
},
|
|
8315
|
+
"total_requests_prev": {
|
|
8316
|
+
"type": "integer",
|
|
8317
|
+
"format": "int64"
|
|
8318
|
+
},
|
|
8319
|
+
"blocked_requests": {
|
|
8320
|
+
"type": "integer",
|
|
8321
|
+
"format": "int64"
|
|
8322
|
+
},
|
|
8323
|
+
"detectors_triggered": {
|
|
8324
|
+
"type": "integer",
|
|
8325
|
+
"format": "int64"
|
|
8326
|
+
},
|
|
8327
|
+
"active_agents": {
|
|
8328
|
+
"type": "integer",
|
|
8329
|
+
"format": "int64"
|
|
8330
|
+
},
|
|
8331
|
+
"detectors": {
|
|
8332
|
+
"type": "array",
|
|
8333
|
+
"items": {
|
|
8334
|
+
"$ref": "#/components/schemas/ShroudDetectorStats"
|
|
8335
|
+
}
|
|
8336
|
+
},
|
|
8337
|
+
"flagged_requests": {
|
|
8338
|
+
"type": "array",
|
|
8339
|
+
"items": {
|
|
8340
|
+
"$ref": "#/components/schemas/ShroudFlaggedRequest"
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
}
|
|
8344
|
+
},
|
|
8345
|
+
"ShroudDetectorStats": {
|
|
8346
|
+
"type": "object",
|
|
8347
|
+
"properties": {
|
|
8348
|
+
"detector": {
|
|
8349
|
+
"type": "string"
|
|
8350
|
+
},
|
|
8351
|
+
"detections": {
|
|
8352
|
+
"type": "integer",
|
|
8353
|
+
"format": "int64"
|
|
8354
|
+
},
|
|
8355
|
+
"blocks": {
|
|
8356
|
+
"type": "integer",
|
|
8357
|
+
"format": "int64"
|
|
8358
|
+
},
|
|
8359
|
+
"actions": {
|
|
8360
|
+
"type": "object",
|
|
8361
|
+
"properties": {
|
|
8362
|
+
"blocked": {
|
|
8363
|
+
"type": "integer",
|
|
8364
|
+
"format": "int64"
|
|
8365
|
+
},
|
|
8366
|
+
"warned": {
|
|
8367
|
+
"type": "integer",
|
|
8368
|
+
"format": "int64"
|
|
8369
|
+
},
|
|
8370
|
+
"logged": {
|
|
8371
|
+
"type": "integer",
|
|
8372
|
+
"format": "int64"
|
|
8373
|
+
}
|
|
8374
|
+
}
|
|
8375
|
+
}
|
|
8376
|
+
}
|
|
8377
|
+
},
|
|
8378
|
+
"ShroudFlaggedRequest": {
|
|
8379
|
+
"type": "object",
|
|
8380
|
+
"properties": {
|
|
8381
|
+
"id": {
|
|
8382
|
+
"type": "string"
|
|
8383
|
+
},
|
|
8384
|
+
"timestamp": {
|
|
8385
|
+
"type": "string",
|
|
8386
|
+
"format": "date-time"
|
|
8387
|
+
},
|
|
8388
|
+
"agent_id": {
|
|
8389
|
+
"type": "string"
|
|
8390
|
+
},
|
|
8391
|
+
"agent_name": {
|
|
8392
|
+
"type": "string"
|
|
8393
|
+
},
|
|
8394
|
+
"score": {
|
|
8395
|
+
"type": "number"
|
|
8396
|
+
},
|
|
8397
|
+
"reason": {
|
|
8398
|
+
"type": "string"
|
|
8399
|
+
},
|
|
8400
|
+
"action": {
|
|
8401
|
+
"type": "string",
|
|
8402
|
+
"enum": [
|
|
8403
|
+
"blocked",
|
|
8404
|
+
"warned",
|
|
8405
|
+
"logged"
|
|
8406
|
+
]
|
|
8407
|
+
}
|
|
8408
|
+
}
|
|
8409
|
+
},
|
|
7937
8410
|
"HealthResponse": {
|
|
7938
8411
|
"type": "object",
|
|
7939
8412
|
"properties": {
|
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: 1Claw API
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.9.0
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -802,6 +802,41 @@ paths:
|
|
|
802
802
|
"404":
|
|
803
803
|
$ref: "#/components/responses/NotFound"
|
|
804
804
|
|
|
805
|
+
# ---------------------------------------------------------------------------
|
|
806
|
+
# MPC
|
|
807
|
+
# ---------------------------------------------------------------------------
|
|
808
|
+
|
|
809
|
+
/v1/vaults/{vault_id}/mpc:
|
|
810
|
+
post:
|
|
811
|
+
tags: [Vaults]
|
|
812
|
+
summary: Enable MPC custody on a vault
|
|
813
|
+
operationId: enableMpc
|
|
814
|
+
description: |
|
|
815
|
+
Enable MPC custody on an existing vault. Requires Business or Enterprise plan.
|
|
816
|
+
Splits secret encryption keys across multiple providers using the specified
|
|
817
|
+
custody mode (e.g. 2-of-2, 2-of-3).
|
|
818
|
+
parameters:
|
|
819
|
+
- $ref: "#/components/parameters/VaultId"
|
|
820
|
+
requestBody:
|
|
821
|
+
required: true
|
|
822
|
+
content:
|
|
823
|
+
application/json:
|
|
824
|
+
schema:
|
|
825
|
+
$ref: "#/components/schemas/EnableMpcRequest"
|
|
826
|
+
responses:
|
|
827
|
+
"200":
|
|
828
|
+
description: MPC custody enabled
|
|
829
|
+
content:
|
|
830
|
+
application/json:
|
|
831
|
+
schema:
|
|
832
|
+
$ref: "#/components/schemas/VaultResponse"
|
|
833
|
+
"400":
|
|
834
|
+
$ref: "#/components/responses/BadRequest"
|
|
835
|
+
"403":
|
|
836
|
+
$ref: "#/components/responses/Forbidden"
|
|
837
|
+
"404":
|
|
838
|
+
$ref: "#/components/responses/NotFound"
|
|
839
|
+
|
|
805
840
|
# ---------------------------------------------------------------------------
|
|
806
841
|
# Secrets
|
|
807
842
|
# ---------------------------------------------------------------------------
|
|
@@ -854,7 +889,7 @@ paths:
|
|
|
854
889
|
content:
|
|
855
890
|
application/json:
|
|
856
891
|
schema:
|
|
857
|
-
$ref: "#/components/schemas/
|
|
892
|
+
$ref: "#/components/schemas/SecretCreatedResponse"
|
|
858
893
|
"400":
|
|
859
894
|
$ref: "#/components/responses/BadRequest"
|
|
860
895
|
"402":
|
|
@@ -872,6 +907,12 @@ paths:
|
|
|
872
907
|
parameters:
|
|
873
908
|
- $ref: "#/components/parameters/VaultId"
|
|
874
909
|
- $ref: "#/components/parameters/SecretPath"
|
|
910
|
+
- name: x-client-share
|
|
911
|
+
in: header
|
|
912
|
+
required: false
|
|
913
|
+
schema:
|
|
914
|
+
type: string
|
|
915
|
+
description: Base64-encoded client key share for MPC 2-of-2 vaults. Required when the vault uses 2-of-2 MPC custody.
|
|
875
916
|
responses:
|
|
876
917
|
"200":
|
|
877
918
|
description: Decrypted secret value
|
|
@@ -896,6 +937,100 @@ paths:
|
|
|
896
937
|
"404":
|
|
897
938
|
$ref: "#/components/responses/NotFound"
|
|
898
939
|
|
|
940
|
+
/v1/vaults/{vault_id}/secret-versions/{path}:
|
|
941
|
+
get:
|
|
942
|
+
tags: [Secrets]
|
|
943
|
+
summary: List all versions of a secret
|
|
944
|
+
operationId: listSecretVersions
|
|
945
|
+
parameters:
|
|
946
|
+
- $ref: "#/components/parameters/VaultId"
|
|
947
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
948
|
+
responses:
|
|
949
|
+
"200":
|
|
950
|
+
description: Version list
|
|
951
|
+
content:
|
|
952
|
+
application/json:
|
|
953
|
+
schema:
|
|
954
|
+
$ref: "#/components/schemas/SecretVersionListResponse"
|
|
955
|
+
"404":
|
|
956
|
+
$ref: "#/components/responses/NotFound"
|
|
957
|
+
|
|
958
|
+
/v1/vaults/{vault_id}/secret-version/{path}/{version}:
|
|
959
|
+
get:
|
|
960
|
+
tags: [Secrets]
|
|
961
|
+
summary: Retrieve a specific version of a secret
|
|
962
|
+
operationId: getSecretVersion
|
|
963
|
+
parameters:
|
|
964
|
+
- $ref: "#/components/parameters/VaultId"
|
|
965
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
966
|
+
- name: version
|
|
967
|
+
in: path
|
|
968
|
+
required: true
|
|
969
|
+
schema:
|
|
970
|
+
type: integer
|
|
971
|
+
responses:
|
|
972
|
+
"200":
|
|
973
|
+
description: Decrypted secret value at the specified version
|
|
974
|
+
content:
|
|
975
|
+
application/json:
|
|
976
|
+
schema:
|
|
977
|
+
$ref: "#/components/schemas/SecretResponse"
|
|
978
|
+
"404":
|
|
979
|
+
$ref: "#/components/responses/NotFound"
|
|
980
|
+
"410":
|
|
981
|
+
description: Version has been disabled or expired
|
|
982
|
+
|
|
983
|
+
/v1/vaults/{vault_id}/secret-version/{path}/{version}/disable:
|
|
984
|
+
post:
|
|
985
|
+
tags: [Secrets]
|
|
986
|
+
summary: Disable a specific secret version
|
|
987
|
+
operationId: disableSecretVersion
|
|
988
|
+
description: |
|
|
989
|
+
Disables a version so it can no longer be read. The version is
|
|
990
|
+
retained for audit purposes but returns 410 on read attempts.
|
|
991
|
+
parameters:
|
|
992
|
+
- $ref: "#/components/parameters/VaultId"
|
|
993
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
994
|
+
- name: version
|
|
995
|
+
in: path
|
|
996
|
+
required: true
|
|
997
|
+
schema:
|
|
998
|
+
type: integer
|
|
999
|
+
responses:
|
|
1000
|
+
"204":
|
|
1001
|
+
description: Version disabled
|
|
1002
|
+
"404":
|
|
1003
|
+
$ref: "#/components/responses/NotFound"
|
|
1004
|
+
|
|
1005
|
+
/v1/vaults/{vault_id}/secret-rotate/{path}:
|
|
1006
|
+
post:
|
|
1007
|
+
tags: [Secrets]
|
|
1008
|
+
summary: Server-side secret rotation
|
|
1009
|
+
operationId: rotateSecret
|
|
1010
|
+
description: |
|
|
1011
|
+
Generates a cryptographically random value and stores it as a new
|
|
1012
|
+
version of the secret. The previous version is preserved in history.
|
|
1013
|
+
Requires rotate or write permission.
|
|
1014
|
+
parameters:
|
|
1015
|
+
- $ref: "#/components/parameters/VaultId"
|
|
1016
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
1017
|
+
requestBody:
|
|
1018
|
+
content:
|
|
1019
|
+
application/json:
|
|
1020
|
+
schema:
|
|
1021
|
+
$ref: "#/components/schemas/RotateSecretRequest"
|
|
1022
|
+
responses:
|
|
1023
|
+
"201":
|
|
1024
|
+
description: New version created with server-generated value
|
|
1025
|
+
content:
|
|
1026
|
+
application/json:
|
|
1027
|
+
schema:
|
|
1028
|
+
$ref: "#/components/schemas/SecretCreatedResponse"
|
|
1029
|
+
"400":
|
|
1030
|
+
$ref: "#/components/responses/BadRequest"
|
|
1031
|
+
"404":
|
|
1032
|
+
$ref: "#/components/responses/NotFound"
|
|
1033
|
+
|
|
899
1034
|
# ---------------------------------------------------------------------------
|
|
900
1035
|
# Policies
|
|
901
1036
|
# ---------------------------------------------------------------------------
|
|
@@ -2663,6 +2798,36 @@ paths:
|
|
|
2663
2798
|
"401":
|
|
2664
2799
|
description: Unauthorized
|
|
2665
2800
|
|
|
2801
|
+
/v1/shroud/threat-summary:
|
|
2802
|
+
get:
|
|
2803
|
+
tags: [Shroud]
|
|
2804
|
+
summary: Shroud threat analytics summary
|
|
2805
|
+
description: >
|
|
2806
|
+
Aggregated threat metrics for the organization from `shroud_activity`
|
|
2807
|
+
(detectors, blocked counts, recent flagged requests). Query `period` selects
|
|
2808
|
+
the window; the previous window of equal length is used for request volume trend.
|
|
2809
|
+
security:
|
|
2810
|
+
- BearerAuth: []
|
|
2811
|
+
parameters:
|
|
2812
|
+
- in: query
|
|
2813
|
+
name: period
|
|
2814
|
+
schema:
|
|
2815
|
+
type: string
|
|
2816
|
+
enum: [1h, 24h, 7d, 30d]
|
|
2817
|
+
default: 24h
|
|
2818
|
+
description: Rolling window ending now
|
|
2819
|
+
responses:
|
|
2820
|
+
"200":
|
|
2821
|
+
description: Threat summary
|
|
2822
|
+
content:
|
|
2823
|
+
application/json:
|
|
2824
|
+
schema:
|
|
2825
|
+
$ref: "#/components/schemas/ShroudThreatSummary"
|
|
2826
|
+
"400":
|
|
2827
|
+
description: Invalid period
|
|
2828
|
+
"401":
|
|
2829
|
+
description: Unauthorized
|
|
2830
|
+
|
|
2666
2831
|
# =============================================================================
|
|
2667
2832
|
# COMPONENTS
|
|
2668
2833
|
# =============================================================================
|
|
@@ -3143,6 +3308,9 @@ components:
|
|
|
3143
3308
|
type: string
|
|
3144
3309
|
description:
|
|
3145
3310
|
type: string
|
|
3311
|
+
mpc_custody:
|
|
3312
|
+
type: string
|
|
3313
|
+
description: MPC custody mode to enable at creation (e.g. "2-of-2", "2-of-3")
|
|
3146
3314
|
|
|
3147
3315
|
VaultResponse:
|
|
3148
3316
|
type: object
|
|
@@ -3168,6 +3336,17 @@ components:
|
|
|
3168
3336
|
cmek_fingerprint:
|
|
3169
3337
|
type: string
|
|
3170
3338
|
description: SHA-256 fingerprint of the CMEK key (64 hex chars)
|
|
3339
|
+
mpc_custody:
|
|
3340
|
+
type: string
|
|
3341
|
+
description: MPC custody mode (e.g. "2-of-2", "2-of-3"), absent when MPC is not enabled
|
|
3342
|
+
mpc_threshold:
|
|
3343
|
+
type: integer
|
|
3344
|
+
description: Number of shares required to reconstruct the key
|
|
3345
|
+
mpc_providers:
|
|
3346
|
+
type: array
|
|
3347
|
+
items:
|
|
3348
|
+
type: string
|
|
3349
|
+
description: List of MPC share providers (e.g. ["server", "client"])
|
|
3171
3350
|
|
|
3172
3351
|
VaultListResponse:
|
|
3173
3352
|
type: object
|
|
@@ -3229,6 +3408,16 @@ components:
|
|
|
3229
3408
|
type: string
|
|
3230
3409
|
format: date-time
|
|
3231
3410
|
|
|
3411
|
+
# --- MPC ---
|
|
3412
|
+
|
|
3413
|
+
EnableMpcRequest:
|
|
3414
|
+
type: object
|
|
3415
|
+
required: [mpc_custody]
|
|
3416
|
+
properties:
|
|
3417
|
+
mpc_custody:
|
|
3418
|
+
type: string
|
|
3419
|
+
description: MPC custody mode (e.g. "2-of-2", "2-of-3")
|
|
3420
|
+
|
|
3232
3421
|
# --- Secrets ---
|
|
3233
3422
|
|
|
3234
3423
|
PutSecretRequest:
|
|
@@ -3275,6 +3464,36 @@ components:
|
|
|
3275
3464
|
expires_at:
|
|
3276
3465
|
type: string
|
|
3277
3466
|
format: date-time
|
|
3467
|
+
is_disabled:
|
|
3468
|
+
type: boolean
|
|
3469
|
+
description: Whether this version has been disabled (retained for audit but unreadable)
|
|
3470
|
+
|
|
3471
|
+
SecretCreatedResponse:
|
|
3472
|
+
description: Returned when a secret is created or updated. Extends SecretMetadataResponse with an optional client_share for MPC vaults.
|
|
3473
|
+
type: object
|
|
3474
|
+
required: [id, path, type, version, created_at]
|
|
3475
|
+
properties:
|
|
3476
|
+
id:
|
|
3477
|
+
type: string
|
|
3478
|
+
format: uuid
|
|
3479
|
+
path:
|
|
3480
|
+
type: string
|
|
3481
|
+
type:
|
|
3482
|
+
type: string
|
|
3483
|
+
version:
|
|
3484
|
+
type: integer
|
|
3485
|
+
metadata:
|
|
3486
|
+
type: object
|
|
3487
|
+
additionalProperties: true
|
|
3488
|
+
created_at:
|
|
3489
|
+
type: string
|
|
3490
|
+
format: date-time
|
|
3491
|
+
expires_at:
|
|
3492
|
+
type: string
|
|
3493
|
+
format: date-time
|
|
3494
|
+
client_share:
|
|
3495
|
+
type: string
|
|
3496
|
+
description: Base64-encoded client key share. Returned only for MPC 2-of-2 vaults. The client must store this share securely — it is not persisted server-side.
|
|
3278
3497
|
|
|
3279
3498
|
SecretResponse:
|
|
3280
3499
|
type: object
|
|
@@ -3314,6 +3533,30 @@ components:
|
|
|
3314
3533
|
items:
|
|
3315
3534
|
$ref: "#/components/schemas/SecretMetadataResponse"
|
|
3316
3535
|
|
|
3536
|
+
SecretVersionListResponse:
|
|
3537
|
+
type: object
|
|
3538
|
+
properties:
|
|
3539
|
+
versions:
|
|
3540
|
+
type: array
|
|
3541
|
+
items:
|
|
3542
|
+
$ref: "#/components/schemas/SecretMetadataResponse"
|
|
3543
|
+
|
|
3544
|
+
RotateSecretRequest:
|
|
3545
|
+
type: object
|
|
3546
|
+
properties:
|
|
3547
|
+
length:
|
|
3548
|
+
type: integer
|
|
3549
|
+
minimum: 8
|
|
3550
|
+
maximum: 1024
|
|
3551
|
+
description: Length of the generated value (default 32)
|
|
3552
|
+
charset:
|
|
3553
|
+
type: string
|
|
3554
|
+
enum: [hex, base64, alphanumeric, ascii]
|
|
3555
|
+
description: Character set for the generated value (default hex)
|
|
3556
|
+
type:
|
|
3557
|
+
type: string
|
|
3558
|
+
description: Override the secret type (defaults to existing secret's type)
|
|
3559
|
+
|
|
3317
3560
|
# --- Policies ---
|
|
3318
3561
|
|
|
3319
3562
|
CreatePolicyRequest:
|
|
@@ -5298,6 +5541,77 @@ components:
|
|
|
5298
5541
|
metadata:
|
|
5299
5542
|
type: object
|
|
5300
5543
|
|
|
5544
|
+
ShroudThreatSummary:
|
|
5545
|
+
type: object
|
|
5546
|
+
properties:
|
|
5547
|
+
total_requests:
|
|
5548
|
+
type: integer
|
|
5549
|
+
format: int64
|
|
5550
|
+
total_requests_prev:
|
|
5551
|
+
type: integer
|
|
5552
|
+
format: int64
|
|
5553
|
+
blocked_requests:
|
|
5554
|
+
type: integer
|
|
5555
|
+
format: int64
|
|
5556
|
+
detectors_triggered:
|
|
5557
|
+
type: integer
|
|
5558
|
+
format: int64
|
|
5559
|
+
active_agents:
|
|
5560
|
+
type: integer
|
|
5561
|
+
format: int64
|
|
5562
|
+
detectors:
|
|
5563
|
+
type: array
|
|
5564
|
+
items:
|
|
5565
|
+
$ref: "#/components/schemas/ShroudDetectorStats"
|
|
5566
|
+
flagged_requests:
|
|
5567
|
+
type: array
|
|
5568
|
+
items:
|
|
5569
|
+
$ref: "#/components/schemas/ShroudFlaggedRequest"
|
|
5570
|
+
|
|
5571
|
+
ShroudDetectorStats:
|
|
5572
|
+
type: object
|
|
5573
|
+
properties:
|
|
5574
|
+
detector:
|
|
5575
|
+
type: string
|
|
5576
|
+
detections:
|
|
5577
|
+
type: integer
|
|
5578
|
+
format: int64
|
|
5579
|
+
blocks:
|
|
5580
|
+
type: integer
|
|
5581
|
+
format: int64
|
|
5582
|
+
actions:
|
|
5583
|
+
type: object
|
|
5584
|
+
properties:
|
|
5585
|
+
blocked:
|
|
5586
|
+
type: integer
|
|
5587
|
+
format: int64
|
|
5588
|
+
warned:
|
|
5589
|
+
type: integer
|
|
5590
|
+
format: int64
|
|
5591
|
+
logged:
|
|
5592
|
+
type: integer
|
|
5593
|
+
format: int64
|
|
5594
|
+
|
|
5595
|
+
ShroudFlaggedRequest:
|
|
5596
|
+
type: object
|
|
5597
|
+
properties:
|
|
5598
|
+
id:
|
|
5599
|
+
type: string
|
|
5600
|
+
timestamp:
|
|
5601
|
+
type: string
|
|
5602
|
+
format: date-time
|
|
5603
|
+
agent_id:
|
|
5604
|
+
type: string
|
|
5605
|
+
agent_name:
|
|
5606
|
+
type: string
|
|
5607
|
+
score:
|
|
5608
|
+
type: number
|
|
5609
|
+
reason:
|
|
5610
|
+
type: string
|
|
5611
|
+
action:
|
|
5612
|
+
type: string
|
|
5613
|
+
enum: [blocked, warned, logged]
|
|
5614
|
+
|
|
5301
5615
|
# --- Health ---
|
|
5302
5616
|
|
|
5303
5617
|
HealthResponse:
|