@opensoftware/contracts 2.5.0 → 2.7.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 +27 -1
- package/dist/cli.js +3 -6
- package/dist/cli.js.map +1 -1
- package/dist/formats.js +3 -0
- package/dist/formats.js.map +1 -1
- package/dist/generated/types.d.ts +136 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/sandbox.d.ts +17 -0
- package/dist/sandbox.js +23 -0
- package/dist/sandbox.js.map +1 -0
- package/factory-definition/factory-definition.schema.json +1 -1
- package/factory-lock/factory-lock.schema.json +32 -0
- package/openapi/openapi.json +330 -2
- package/package.json +2 -2
- package/person-keys/person-keys.schema.json +59 -0
- package/person-proof/person-proof.schema.json +75 -0
- package/skill-catalog/skill-catalog.schema.json +177 -0
- package/typespec/factory-definition.tsp +4 -1
- package/typespec/factory-lock.tsp +23 -0
- package/typespec/main.tsp +2 -0
- package/typespec/person-proof.tsp +79 -0
- package/typespec/skill-catalog.tsp +94 -0
package/openapi/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Open Software Factory contracts",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.7.0",
|
|
6
6
|
"description": "The shared formats as named models, and the HTTP APIs of the modules. Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "Apache-2.0",
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
"items": {
|
|
1043
1043
|
"type": "string"
|
|
1044
1044
|
},
|
|
1045
|
-
"description": "
|
|
1045
|
+
"description": "The agent's skills: each a path to a skill folder, or a folder of another Git repository at a ref,\n`git+<url>#<ref>:<path>`, which `factory plan` pins in factory.lock (ADR 0146)."
|
|
1046
1046
|
},
|
|
1047
1047
|
"secrets": {
|
|
1048
1048
|
"type": "array",
|
|
@@ -1173,6 +1173,11 @@
|
|
|
1173
1173
|
],
|
|
1174
1174
|
"additionalProperties": false
|
|
1175
1175
|
},
|
|
1176
|
+
"Base64url32": {
|
|
1177
|
+
"type": "string",
|
|
1178
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
1179
|
+
"description": "43 characters of base64url without padding: 32 bytes, like a SHA-256 or an Ed25519 public key."
|
|
1180
|
+
},
|
|
1176
1181
|
"Benchmark": {
|
|
1177
1182
|
"type": "object",
|
|
1178
1183
|
"properties": {
|
|
@@ -1203,6 +1208,128 @@
|
|
|
1203
1208
|
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$",
|
|
1204
1209
|
"description": "A path inside the bundle: relative, forward slashes, no \"..\"."
|
|
1205
1210
|
},
|
|
1211
|
+
"CatalogSkill": {
|
|
1212
|
+
"type": "object",
|
|
1213
|
+
"properties": {
|
|
1214
|
+
"name": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"minLength": 1,
|
|
1217
|
+
"description": "The last segment of the skill's folder."
|
|
1218
|
+
},
|
|
1219
|
+
"description": {
|
|
1220
|
+
"anyOf": [
|
|
1221
|
+
{
|
|
1222
|
+
"type": "string"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"type": "null"
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
"description": "The description of its front matter; null without one."
|
|
1229
|
+
},
|
|
1230
|
+
"source": {
|
|
1231
|
+
"$ref": "#/components/schemas/CatalogSkillSource",
|
|
1232
|
+
"description": "Where the skill comes from."
|
|
1233
|
+
},
|
|
1234
|
+
"needs": {
|
|
1235
|
+
"$ref": "#/components/schemas/SkillNeeds",
|
|
1236
|
+
"description": "What it needs, from the `metadata` of its front matter."
|
|
1237
|
+
},
|
|
1238
|
+
"agents": {
|
|
1239
|
+
"type": "array",
|
|
1240
|
+
"items": {
|
|
1241
|
+
"$ref": "#/components/schemas/CatalogSkillAgent"
|
|
1242
|
+
},
|
|
1243
|
+
"description": "Each agent that uses it, sorted by name."
|
|
1244
|
+
},
|
|
1245
|
+
"files": {
|
|
1246
|
+
"type": "array",
|
|
1247
|
+
"items": {
|
|
1248
|
+
"type": "string"
|
|
1249
|
+
},
|
|
1250
|
+
"description": "The files of its folder, by their path below it, sorted."
|
|
1251
|
+
},
|
|
1252
|
+
"body": {
|
|
1253
|
+
"anyOf": [
|
|
1254
|
+
{
|
|
1255
|
+
"type": "string"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"type": "null"
|
|
1259
|
+
}
|
|
1260
|
+
],
|
|
1261
|
+
"description": "The text of SKILL.md below the line that ends its front matter, all of it without front matter; null without a\nSKILL.md that is UTF-8 text."
|
|
1262
|
+
},
|
|
1263
|
+
"problems": {
|
|
1264
|
+
"type": "array",
|
|
1265
|
+
"items": {
|
|
1266
|
+
"type": "string"
|
|
1267
|
+
},
|
|
1268
|
+
"description": "The problems of its own files as `factory lint` prints them, relative to the folder of factory.yaml, and a folder\nwithout a SKILL.md."
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"required": [
|
|
1272
|
+
"name",
|
|
1273
|
+
"description",
|
|
1274
|
+
"source",
|
|
1275
|
+
"needs",
|
|
1276
|
+
"agents",
|
|
1277
|
+
"files",
|
|
1278
|
+
"body",
|
|
1279
|
+
"problems"
|
|
1280
|
+
],
|
|
1281
|
+
"description": "One skill, also one that lint refuses: then `problems` names why."
|
|
1282
|
+
},
|
|
1283
|
+
"CatalogSkillAgent": {
|
|
1284
|
+
"type": "object",
|
|
1285
|
+
"properties": {
|
|
1286
|
+
"name": {
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"minLength": 1
|
|
1289
|
+
},
|
|
1290
|
+
"secrets": {
|
|
1291
|
+
"type": "object",
|
|
1292
|
+
"properties": {},
|
|
1293
|
+
"unevaluatedProperties": {
|
|
1294
|
+
"$ref": "#/components/schemas/SecretReference"
|
|
1295
|
+
},
|
|
1296
|
+
"description": "The agent's reference whose variable is each secret the skill needs, by the variable."
|
|
1297
|
+
},
|
|
1298
|
+
"lacks": {
|
|
1299
|
+
"$ref": "#/components/schemas/SkillNeeds",
|
|
1300
|
+
"description": "Each needed secret the agent does not declare, and each needed host its sandbox does not allow."
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
"required": [
|
|
1304
|
+
"name",
|
|
1305
|
+
"secrets",
|
|
1306
|
+
"lacks"
|
|
1307
|
+
],
|
|
1308
|
+
"description": "An agent that uses a skill."
|
|
1309
|
+
},
|
|
1310
|
+
"CatalogSkillSource": {
|
|
1311
|
+
"type": "object",
|
|
1312
|
+
"properties": {
|
|
1313
|
+
"folder": {
|
|
1314
|
+
"type": "string",
|
|
1315
|
+
"minLength": 1
|
|
1316
|
+
},
|
|
1317
|
+
"repository": {
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"minLength": 1,
|
|
1320
|
+
"description": "The URL of the other Git repository, as the entry `git+<url>#<ref>:<path>` names it."
|
|
1321
|
+
},
|
|
1322
|
+
"commit": {
|
|
1323
|
+
"type": "string",
|
|
1324
|
+
"pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$",
|
|
1325
|
+
"description": "The commit of the other repository that factory.lock pins; none while factory.lock has no pin."
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"required": [
|
|
1329
|
+
"folder"
|
|
1330
|
+
],
|
|
1331
|
+
"description": "A folder of the factory's repository, relative to the folder of factory.yaml, like \"skills/release-notes\"; or, for a\nskill of another Git repository, its folder there with the repository's URL and the commit factory.lock pins\n(ADR 0146)."
|
|
1332
|
+
},
|
|
1206
1333
|
"CheckName": {
|
|
1207
1334
|
"type": "string",
|
|
1208
1335
|
"minLength": 1,
|
|
@@ -1513,6 +1640,14 @@
|
|
|
1513
1640
|
}
|
|
1514
1641
|
},
|
|
1515
1642
|
"description": "The adapters under `providers` that `factory plan --adapters` pinned, per port and adapter name (ADR 0125). A pin\ncounts only while its `range` is the range factory.yaml declares."
|
|
1643
|
+
},
|
|
1644
|
+
"skills": {
|
|
1645
|
+
"type": "object",
|
|
1646
|
+
"properties": {},
|
|
1647
|
+
"unevaluatedProperties": {
|
|
1648
|
+
"$ref": "#/components/schemas/FactoryLockSkillPin"
|
|
1649
|
+
},
|
|
1650
|
+
"description": "The skills of other Git repositories that `factory plan` pinned, by the skill's name (ADR 0146). A pin counts only\nwhile its `source` is the entry factory.yaml declares; the foreman and `factory render` fetch its commit and check\nits hash."
|
|
1516
1651
|
}
|
|
1517
1652
|
},
|
|
1518
1653
|
"required": [
|
|
@@ -1599,6 +1734,33 @@
|
|
|
1599
1734
|
],
|
|
1600
1735
|
"description": "One registry MCP server at its exact version, with the npm package or the remote it starts."
|
|
1601
1736
|
},
|
|
1737
|
+
"FactoryLockSkillPin": {
|
|
1738
|
+
"type": "object",
|
|
1739
|
+
"properties": {
|
|
1740
|
+
"source": {
|
|
1741
|
+
"type": "string",
|
|
1742
|
+
"pattern": "^git\\+.+#[^:]+:.+$",
|
|
1743
|
+
"description": "The entry of `skills` in factory.yaml that the pin was resolved from, `git+<url>#<ref>:<path>`."
|
|
1744
|
+
},
|
|
1745
|
+
"commit": {
|
|
1746
|
+
"type": "string",
|
|
1747
|
+
"pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$",
|
|
1748
|
+
"description": "The full commit, 40 hexadecimal characters, or 64 in a repository of SHA-256."
|
|
1749
|
+
},
|
|
1750
|
+
"hash": {
|
|
1751
|
+
"type": "string",
|
|
1752
|
+
"pattern": "^h1:[A-Za-z0-9+/]{43}=$",
|
|
1753
|
+
"description": "The hash of the skill folder's files in the form of Go's modules: \"h1:\" and the base64 of a SHA-256."
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
"required": [
|
|
1757
|
+
"source",
|
|
1758
|
+
"commit",
|
|
1759
|
+
"hash"
|
|
1760
|
+
],
|
|
1761
|
+
"description": "One skill of another Git repository at the commit its ref had when `factory plan` pinned it.",
|
|
1762
|
+
"additionalProperties": false
|
|
1763
|
+
},
|
|
1602
1764
|
"FormatVersion": {
|
|
1603
1765
|
"type": "integer",
|
|
1604
1766
|
"minimum": 1,
|
|
@@ -2288,6 +2450,125 @@
|
|
|
2288
2450
|
"source"
|
|
2289
2451
|
]
|
|
2290
2452
|
},
|
|
2453
|
+
"PersonKey": {
|
|
2454
|
+
"type": "object",
|
|
2455
|
+
"properties": {
|
|
2456
|
+
"kty": {
|
|
2457
|
+
"type": "string",
|
|
2458
|
+
"const": "OKP"
|
|
2459
|
+
},
|
|
2460
|
+
"crv": {
|
|
2461
|
+
"type": "string",
|
|
2462
|
+
"const": "Ed25519"
|
|
2463
|
+
},
|
|
2464
|
+
"alg": {
|
|
2465
|
+
"type": "string",
|
|
2466
|
+
"const": "Ed25519"
|
|
2467
|
+
},
|
|
2468
|
+
"use": {
|
|
2469
|
+
"type": "string",
|
|
2470
|
+
"const": "sig"
|
|
2471
|
+
},
|
|
2472
|
+
"kid": {
|
|
2473
|
+
"$ref": "#/components/schemas/Base64url32",
|
|
2474
|
+
"description": "The key's JWK thumbprint (RFC 7638) with SHA-256; a proof names it in its `kid`."
|
|
2475
|
+
},
|
|
2476
|
+
"x": {
|
|
2477
|
+
"$ref": "#/components/schemas/Base64url32",
|
|
2478
|
+
"description": "The public key."
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2481
|
+
"required": [
|
|
2482
|
+
"kty",
|
|
2483
|
+
"crv",
|
|
2484
|
+
"alg",
|
|
2485
|
+
"use",
|
|
2486
|
+
"kid",
|
|
2487
|
+
"x"
|
|
2488
|
+
],
|
|
2489
|
+
"description": "One Ed25519 public key. Closed: a key with its private part `d` or any other member is invalid.",
|
|
2490
|
+
"additionalProperties": false
|
|
2491
|
+
},
|
|
2492
|
+
"PersonKeys": {
|
|
2493
|
+
"type": "object",
|
|
2494
|
+
"properties": {
|
|
2495
|
+
"keys": {
|
|
2496
|
+
"type": "array",
|
|
2497
|
+
"items": {
|
|
2498
|
+
"$ref": "#/components/schemas/PersonKey"
|
|
2499
|
+
},
|
|
2500
|
+
"minItems": 1
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
"required": [
|
|
2504
|
+
"keys"
|
|
2505
|
+
],
|
|
2506
|
+
"description": "The public keys of an issuer of person proofs (ADR 0151): a JSON Web Key Set (RFC 7517), as the console publishes it\nat `/.well-known/jwks.json`. The first key of the issuer's setting signs; every key here verifies.",
|
|
2507
|
+
"additionalProperties": false
|
|
2508
|
+
},
|
|
2509
|
+
"PersonProof": {
|
|
2510
|
+
"type": "object",
|
|
2511
|
+
"properties": {
|
|
2512
|
+
"iss": {
|
|
2513
|
+
"$ref": "#/components/schemas/Name",
|
|
2514
|
+
"description": "The issuer: \"console\" for the console, or the name a team gives its own tool in the modules' setting."
|
|
2515
|
+
},
|
|
2516
|
+
"sub": {
|
|
2517
|
+
"type": "string",
|
|
2518
|
+
"minLength": 1,
|
|
2519
|
+
"description": "The person, as the module records the actor's `id`: an email in lower case, or the sign-in proxy's value."
|
|
2520
|
+
},
|
|
2521
|
+
"name": {
|
|
2522
|
+
"type": "string",
|
|
2523
|
+
"minLength": 1,
|
|
2524
|
+
"description": "The name to show, recorded as the actor's `displayName`."
|
|
2525
|
+
},
|
|
2526
|
+
"role": {
|
|
2527
|
+
"$ref": "#/components/schemas/AccessRole",
|
|
2528
|
+
"description": "The person's role from the access file at the time of the call."
|
|
2529
|
+
},
|
|
2530
|
+
"aud": {
|
|
2531
|
+
"$ref": "#/components/schemas/Name",
|
|
2532
|
+
"description": "The module the call goes to: \"foreman\", \"intake\" or \"gatekeeper\"."
|
|
2533
|
+
},
|
|
2534
|
+
"iat": {
|
|
2535
|
+
"type": "integer",
|
|
2536
|
+
"minimum": 0,
|
|
2537
|
+
"description": "When it was signed, in seconds since 1970-01-01T00:00:00Z."
|
|
2538
|
+
},
|
|
2539
|
+
"exp": {
|
|
2540
|
+
"type": "integer",
|
|
2541
|
+
"minimum": 0,
|
|
2542
|
+
"description": "When it ends, in seconds since 1970-01-01T00:00:00Z; at most 60 seconds after `iat`."
|
|
2543
|
+
},
|
|
2544
|
+
"method": {
|
|
2545
|
+
"type": "string",
|
|
2546
|
+
"pattern": "^[A-Z]+$",
|
|
2547
|
+
"description": "The request's method in upper case."
|
|
2548
|
+
},
|
|
2549
|
+
"path": {
|
|
2550
|
+
"type": "string",
|
|
2551
|
+
"pattern": "^/[^?#]*$",
|
|
2552
|
+
"description": "The request's path as sent in the request line, without the query."
|
|
2553
|
+
},
|
|
2554
|
+
"bodyDigest": {
|
|
2555
|
+
"$ref": "#/components/schemas/Base64url32",
|
|
2556
|
+
"description": "The SHA-256 of the request's body bytes as sent, in base64url without padding."
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2559
|
+
"required": [
|
|
2560
|
+
"iss",
|
|
2561
|
+
"sub",
|
|
2562
|
+
"role",
|
|
2563
|
+
"aud",
|
|
2564
|
+
"iat",
|
|
2565
|
+
"exp",
|
|
2566
|
+
"method",
|
|
2567
|
+
"path",
|
|
2568
|
+
"bodyDigest"
|
|
2569
|
+
],
|
|
2570
|
+
"description": "The claims of a person proof (ADR 0151): the JSON Web Token that the console signs for one call of a module API in\nthe name of a person, sent in the header `OSF-Person`, signed with `alg` \"Ed25519\" and `typ` \"osf-person+jwt\". It is\nbound to one module, one request and 30 seconds. Open: a module ignores a claim it does not know."
|
|
2571
|
+
},
|
|
2291
2572
|
"PrClosed": {
|
|
2292
2573
|
"type": "object",
|
|
2293
2574
|
"properties": {
|
|
@@ -3707,6 +3988,53 @@
|
|
|
3707
3988
|
"type": "string",
|
|
3708
3989
|
"pattern": "^[0-9a-f]{64}$"
|
|
3709
3990
|
},
|
|
3991
|
+
"SkillCatalog": {
|
|
3992
|
+
"type": "object",
|
|
3993
|
+
"properties": {
|
|
3994
|
+
"skills": {
|
|
3995
|
+
"type": "array",
|
|
3996
|
+
"items": {
|
|
3997
|
+
"$ref": "#/components/schemas/CatalogSkill"
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
},
|
|
4001
|
+
"required": [
|
|
4002
|
+
"skills"
|
|
4003
|
+
],
|
|
4004
|
+
"description": "What `factory skills` of factory-spec prints (ADR 0141, ADR 0143): every skill the factory's agents use, read with\nthe rules of `factory lint` (ADR 0140), sorted by name. The console reads it for its pages `/skills` and\n`/skills/<name>`, so it never parses a SKILL.md itself."
|
|
4005
|
+
},
|
|
4006
|
+
"SkillHost": {
|
|
4007
|
+
"type": "string",
|
|
4008
|
+
"pattern": "^[a-z0-9-]+(\\.[a-z0-9-]+)*$",
|
|
4009
|
+
"description": "A host as an entry of `sandbox.egress`, like \"api.linear.app\"."
|
|
4010
|
+
},
|
|
4011
|
+
"SkillNeeds": {
|
|
4012
|
+
"type": "object",
|
|
4013
|
+
"properties": {
|
|
4014
|
+
"secrets": {
|
|
4015
|
+
"type": "array",
|
|
4016
|
+
"items": {
|
|
4017
|
+
"$ref": "#/components/schemas/SkillSecretName"
|
|
4018
|
+
}
|
|
4019
|
+
},
|
|
4020
|
+
"hosts": {
|
|
4021
|
+
"type": "array",
|
|
4022
|
+
"items": {
|
|
4023
|
+
"$ref": "#/components/schemas/SkillHost"
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
},
|
|
4027
|
+
"required": [
|
|
4028
|
+
"secrets",
|
|
4029
|
+
"hosts"
|
|
4030
|
+
],
|
|
4031
|
+
"description": "The secrets a skill needs, by the variable that holds each in a sandbox, and the hosts it reaches (ADR 0140)."
|
|
4032
|
+
},
|
|
4033
|
+
"SkillSecretName": {
|
|
4034
|
+
"type": "string",
|
|
4035
|
+
"pattern": "^[A-Z0-9_]+$",
|
|
4036
|
+
"description": "The variable of a secret in a sandbox (ADR 0068), like \"LINEAR_TOKEN\"."
|
|
4037
|
+
},
|
|
3710
4038
|
"Stage": {
|
|
3711
4039
|
"type": "object",
|
|
3712
4040
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoftware/contracts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "The shared formats of the open software factory: JSON Schemas, TypeScript types and the osf-contracts CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@typespec/openapi": "1.17.0",
|
|
45
45
|
"@typespec/openapi3": "1.17.0",
|
|
46
46
|
"openapi-typescript": "7.13.0",
|
|
47
|
-
"@opensoftware/testkit": "0.
|
|
47
|
+
"@opensoftware/testkit": "0.39.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node scripts/build.ts",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/person-keys/person-keys.schema.json",
|
|
4
|
+
"title": "PersonKeys",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"keys": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"kty": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "OKP"
|
|
16
|
+
},
|
|
17
|
+
"crv": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"const": "Ed25519"
|
|
20
|
+
},
|
|
21
|
+
"alg": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "Ed25519"
|
|
24
|
+
},
|
|
25
|
+
"use": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"const": "sig"
|
|
28
|
+
},
|
|
29
|
+
"kid": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
32
|
+
"description": "The key's JWK thumbprint (RFC 7638) with SHA-256; a proof names it in its `kid`."
|
|
33
|
+
},
|
|
34
|
+
"x": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
37
|
+
"description": "The public key."
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": [
|
|
41
|
+
"kty",
|
|
42
|
+
"crv",
|
|
43
|
+
"alg",
|
|
44
|
+
"use",
|
|
45
|
+
"kid",
|
|
46
|
+
"x"
|
|
47
|
+
],
|
|
48
|
+
"description": "One Ed25519 public key. Closed: a key with its private part `d` or any other member is invalid.",
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"minItems": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"keys"
|
|
56
|
+
],
|
|
57
|
+
"description": "The public keys of an issuer of person proofs (ADR 0151): a JSON Web Key Set (RFC 7517), as the console publishes it\nat `/.well-known/jwks.json`. The first key of the issuer's setting signs; every key here verifies.",
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/person-proof/person-proof.schema.json",
|
|
4
|
+
"title": "PersonProof",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"iss": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
11
|
+
"description": "The issuer: \"console\" for the console, or the name a team gives its own tool in the modules' setting."
|
|
12
|
+
},
|
|
13
|
+
"sub": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "The person, as the module records the actor's `id`: an email in lower case, or the sign-in proxy's value."
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The name to show, recorded as the actor's `displayName`."
|
|
22
|
+
},
|
|
23
|
+
"role": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": [
|
|
26
|
+
"member",
|
|
27
|
+
"factory-engineer",
|
|
28
|
+
"admin"
|
|
29
|
+
],
|
|
30
|
+
"description": "The person's role from the access file at the time of the call."
|
|
31
|
+
},
|
|
32
|
+
"aud": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
35
|
+
"description": "The module the call goes to: \"foreman\", \"intake\" or \"gatekeeper\"."
|
|
36
|
+
},
|
|
37
|
+
"iat": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 0,
|
|
40
|
+
"description": "When it was signed, in seconds since 1970-01-01T00:00:00Z."
|
|
41
|
+
},
|
|
42
|
+
"exp": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 0,
|
|
45
|
+
"description": "When it ends, in seconds since 1970-01-01T00:00:00Z; at most 60 seconds after `iat`."
|
|
46
|
+
},
|
|
47
|
+
"method": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[A-Z]+$",
|
|
50
|
+
"description": "The request's method in upper case."
|
|
51
|
+
},
|
|
52
|
+
"path": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"pattern": "^/[^?#]*$",
|
|
55
|
+
"description": "The request's path as sent in the request line, without the query."
|
|
56
|
+
},
|
|
57
|
+
"bodyDigest": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
60
|
+
"description": "The SHA-256 of the request's body bytes as sent, in base64url without padding."
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"required": [
|
|
64
|
+
"iss",
|
|
65
|
+
"sub",
|
|
66
|
+
"role",
|
|
67
|
+
"aud",
|
|
68
|
+
"iat",
|
|
69
|
+
"exp",
|
|
70
|
+
"method",
|
|
71
|
+
"path",
|
|
72
|
+
"bodyDigest"
|
|
73
|
+
],
|
|
74
|
+
"description": "The claims of a person proof (ADR 0151): the JSON Web Token that the console signs for one call of a module API in\nthe name of a person, sent in the header `OSF-Person`, signed with `alg` \"Ed25519\" and `typ` \"osf-person+jwt\". It is\nbound to one module, one request and 30 seconds. Open: a module ignores a claim it does not know."
|
|
75
|
+
}
|