@kya-os/checkpoint-shared 1.5.1 → 1.6.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/CHANGELOG.md +217 -0
- package/dist/beacon-nonce/index.d.mts +36 -0
- package/dist/beacon-nonce/index.d.mts.map +1 -0
- package/dist/beacon-nonce/index.d.ts +36 -0
- package/dist/beacon-nonce/index.d.ts.map +1 -0
- package/dist/beacon-nonce/index.js +305 -0
- package/dist/beacon-nonce/index.mjs +294 -0
- package/dist/beacon-nonce/index.mjs.map +1 -0
- package/dist/beacon-types/index.d.mts +40 -0
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +40 -0
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +53 -5
- package/dist/beacon-types/index.mjs +49 -6
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/browser-posture-BuChqmH5.d.mts +169 -0
- package/dist/browser-posture-BuChqmH5.d.mts.map +1 -0
- package/dist/browser-posture-DIaVLuW3.d.ts +169 -0
- package/dist/browser-posture-DIaVLuW3.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +4 -2
- package/dist/browser-posture-cookie.d.mts.map +1 -0
- package/dist/browser-posture-cookie.d.ts +4 -2
- package/dist/browser-posture-cookie.d.ts.map +1 -0
- package/dist/browser-posture-cookie.mjs.map +1 -1
- package/dist/browser-posture-proof.d.mts +18 -0
- package/dist/browser-posture-proof.d.mts.map +1 -0
- package/dist/browser-posture-proof.d.ts +18 -0
- package/dist/browser-posture-proof.d.ts.map +1 -0
- package/dist/browser-posture-proof.js +66 -0
- package/dist/browser-posture-proof.mjs +63 -0
- package/dist/browser-posture-proof.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +59 -2
- package/dist/browser-posture-report.d.mts.map +1 -1
- package/dist/browser-posture-report.d.ts +59 -2
- package/dist/browser-posture-report.d.ts.map +1 -1
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +1 -1
- package/dist/browser-posture-report.mjs.map +1 -1
- package/dist/browser-posture.d.mts +2 -85
- package/dist/browser-posture.d.ts +2 -85
- package/dist/browser-posture.js +207 -45
- package/dist/browser-posture.mjs +195 -45
- package/dist/browser-posture.mjs.map +1 -1
- package/dist/browser.d.mts +0 -8
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +0 -8
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/browser.mjs.map +1 -1
- package/dist/clearance.d.mts +1 -1
- package/dist/clearance.d.ts +1 -1
- package/dist/clearance.js +2 -2
- package/dist/clearance.mjs +2 -2
- package/dist/{client-ip-HOfe6ucV.mjs → client-ip-B2Xeo-GK.mjs} +2 -2
- package/dist/{client-ip-HOfe6ucV.mjs.map → client-ip-B2Xeo-GK.mjs.map} +1 -1
- package/dist/{client-ip-1y2iXAYW.js → client-ip-CW6pRyLf.js} +1 -1
- package/dist/consent-handoff.d.mts +41 -0
- package/dist/consent-handoff.d.mts.map +1 -0
- package/dist/consent-handoff.d.ts +41 -0
- package/dist/consent-handoff.d.ts.map +1 -0
- package/dist/consent-handoff.js +1 -0
- package/dist/consent-handoff.mjs +2 -0
- package/dist/consent-handoff.mjs.map +1 -0
- package/dist/errors/index.d.mts +155 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +155 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +513 -9
- package/dist/errors/index.mjs +513 -10
- package/dist/errors/index.mjs.map +1 -1
- package/dist/{external-jr_S4iSS.d.ts → external-B7WI9FyQ.d.mts} +2 -2
- package/dist/{external-jr_S4iSS.d.mts.map → external-B7WI9FyQ.d.mts.map} +1 -1
- package/dist/{external-jr_S4iSS.d.mts → external-B7WI9FyQ.d.ts} +2 -2
- package/dist/{external-jr_S4iSS.d.ts.map → external-B7WI9FyQ.d.ts.map} +1 -1
- package/dist/gateway-client-ip.d.mts +1 -1
- package/dist/gateway-client-ip.d.ts +1 -1
- package/dist/gateway-client-ip.js +2 -2
- package/dist/gateway-client-ip.mjs +2 -2
- package/dist/index.d.mts +6375 -1532
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6375 -1532
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5629 -697
- package/dist/index.mjs +5341 -683
- package/dist/index.mjs.map +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +1 -1
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -1
- package/dist/mcpi/approval-grant/index.d.ts +1 -1
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -1
- package/dist/mcpi/approval-grant/index.js +58 -49
- package/dist/mcpi/approval-grant/index.mjs +58 -49
- package/dist/mcpi/approval-grant/index.mjs.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.mts +3 -2
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.ts +3 -2
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
- package/dist/posture-origins/index.d.mts +41 -0
- package/dist/posture-origins/index.d.mts.map +1 -0
- package/dist/posture-origins/index.d.ts +41 -0
- package/dist/posture-origins/index.d.ts.map +1 -0
- package/dist/posture-origins/index.js +441 -0
- package/dist/posture-origins/index.mjs +430 -0
- package/dist/posture-origins/index.mjs.map +1 -0
- package/dist/posture-origins-LFkX80oF.js +627 -0
- package/dist/posture-origins-Pn-ii-Pp.mjs +533 -0
- package/dist/posture-origins-Pn-ii-Pp.mjs.map +1 -0
- package/dist/{project-verification-key-CgSVX9_m.mjs → project-verification-key-66N4edKn.mjs} +2 -2
- package/dist/{project-verification-key-CgSVX9_m.mjs.map → project-verification-key-66N4edKn.mjs.map} +1 -1
- package/dist/{project-verification-key-C3L5rd8a.js → project-verification-key-BccT12tQ.js} +1 -1
- package/dist/rules.json +0 -1
- package/dist/{schemas-DxY-dk9y.mjs → schemas-7qodsG-Z.mjs} +49 -2
- package/dist/schemas-7qodsG-Z.mjs.map +1 -0
- package/dist/{schemas-BmjNLAE7.js → schemas-YhagYDx_.js} +59 -0
- package/dist/signals/index.d.mts +75 -55
- package/dist/signals/index.d.mts.map +1 -1
- package/dist/signals/index.d.ts +75 -55
- package/dist/signals/index.d.ts.map +1 -1
- package/dist/signals/index.js +246 -2
- package/dist/signals/index.mjs +236 -3
- package/dist/signals/index.mjs.map +1 -1
- package/fixtures/browser-integrity/captured-java-0.2.1-missing-score.json +10 -0
- package/fixtures/browser-integrity/null-score.json +11 -0
- package/fixtures/browser-integrity/numeric-score.json +11 -0
- package/fixtures/browser-posture-claims.json +168 -0
- package/fixtures/browser-posture-headers.json +6 -0
- package/fixtures/cli-registration.v2.json +115 -0
- package/fixtures/detection/reason-codes.json +1 -1
- package/fixtures/kya-http/README.md +34 -25
- package/fixtures/kya-http/consent-handoff.codes.json +34 -0
- package/fixtures/kya-http/protected-resource-metadata.full.json +14 -5
- package/fixtures/kya-http/protected-resource-metadata.invalid-issuer.json +51 -0
- package/fixtures/kya-http/protected-resource-metadata.no-issuer.json +32 -0
- package/fixtures/reviewer-grant-revocation.v1.json +285 -0
- package/fixtures/workbench/a2a-signed-request.v1.json +255 -0
- package/fixtures/workbench/artifact-bindings.v1.json +1003 -0
- package/fixtures/workbench/delegation-management.v1.json +507 -0
- package/fixtures/workbench/didcomm-task-source.v1.json +191 -0
- package/fixtures/workbench/graph-interfaces.v1.json +1887 -0
- package/fixtures/workbench/identity-provisioning.v1.json +643 -0
- package/fixtures/workbench/linear-installation.v1.json +484 -0
- package/fixtures/workbench/management-session.v1.json +716 -0
- package/fixtures/workbench/model-credentials.v1.json +630 -0
- package/fixtures/workbench/source-claim-pooled.v1.json +50 -0
- package/fixtures/workbench/task-grant.v1.json +695 -0
- package/fixtures/workbench/task-status-projection.v1.json +591 -0
- package/fixtures/workbench/workload-enrollment.v1.json +580 -0
- package/package.json +24 -5
- package/src/data/compiled/merged-rules.json +2 -9
- package/src/data/default-rules.json +0 -1
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +0 -5
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +0 -1
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +0 -5
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +0 -1
- package/dist/browser-posture.d.mts.map +0 -1
- package/dist/browser-posture.d.ts.map +0 -1
- package/dist/patterns-CkRVOdtV.js +0 -243
- package/dist/patterns-DzkGy_qk.mjs +0 -173
- package/dist/patterns-DzkGy_qk.mjs.map +0 -1
- package/dist/schemas-DxY-dk9y.mjs.map +0 -1
- package/fixtures/kya-http/protected-resource-metadata.global.json +0 -28
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectId": "07fa2f51-9849-4c93-892f-e5b80601b037",
|
|
3
|
+
"sessionId": "e9826392-9583-142c-9df2-3d6e84dd89da",
|
|
4
|
+
"verdict": "insufficient",
|
|
5
|
+
"scorerVersion": 3,
|
|
6
|
+
"reasons": [],
|
|
7
|
+
"issuedAt": 1790808770,
|
|
8
|
+
"expiresAt": 1790808890,
|
|
9
|
+
"source": "verified-posture"
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectId": "07fa2f51-9849-4c93-892f-e5b80601b037",
|
|
3
|
+
"sessionId": "e9826392-9583-142c-9df2-3d6e84dd89da",
|
|
4
|
+
"verdict": "insufficient",
|
|
5
|
+
"score": null,
|
|
6
|
+
"scorerVersion": 3,
|
|
7
|
+
"reasons": [],
|
|
8
|
+
"issuedAt": 1790808770,
|
|
9
|
+
"expiresAt": 1790808890,
|
|
10
|
+
"source": "verified-posture"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"projectId": "07fa2f51-9849-4c93-892f-e5b80601b037",
|
|
3
|
+
"sessionId": "e9826392-9583-142c-9df2-3d6e84dd89da",
|
|
4
|
+
"verdict": "agent-driven",
|
|
5
|
+
"score": 0.75,
|
|
6
|
+
"scorerVersion": 3,
|
|
7
|
+
"reasons": ["Repeated synthetic drag boundaries (client-reported)"],
|
|
8
|
+
"issuedAt": 1790808770,
|
|
9
|
+
"expiresAt": 1790808890,
|
|
10
|
+
"source": "verified-posture"
|
|
11
|
+
}
|
|
@@ -417,5 +417,173 @@
|
|
|
417
417
|
"field": "project_id",
|
|
418
418
|
"value": "ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp",
|
|
419
419
|
"valid": false
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "payload with trailing garbage",
|
|
423
|
+
"field": "iss",
|
|
424
|
+
"value": "checkpoint:browser-posture:v1",
|
|
425
|
+
"tamper": "payload-trailing-garbage",
|
|
426
|
+
"valid": false
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "padded signature",
|
|
430
|
+
"field": "iss",
|
|
431
|
+
"value": "checkpoint:browser-posture:v1",
|
|
432
|
+
"tamper": "signature-padded",
|
|
433
|
+
"valid": false
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"name": "automation_disclosed true",
|
|
437
|
+
"field": "automation_disclosed",
|
|
438
|
+
"value": true,
|
|
439
|
+
"valid": true
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "automation_disclosed is a string",
|
|
443
|
+
"field": "automation_disclosed",
|
|
444
|
+
"value": "true",
|
|
445
|
+
"valid": false
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "automation_disclosed is a number",
|
|
449
|
+
"field": "automation_disclosed",
|
|
450
|
+
"value": 1,
|
|
451
|
+
"valid": false
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "automation_disclosed is a null",
|
|
455
|
+
"field": "automation_disclosed",
|
|
456
|
+
"value": null,
|
|
457
|
+
"valid": false
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "automation_corroborated is a string",
|
|
461
|
+
"field": "automation_corroborated",
|
|
462
|
+
"value": "true",
|
|
463
|
+
"valid": false
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "automation_corroborated is a number",
|
|
467
|
+
"field": "automation_corroborated",
|
|
468
|
+
"value": 1,
|
|
469
|
+
"valid": false
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "automation_corroborated is a null",
|
|
473
|
+
"field": "automation_corroborated",
|
|
474
|
+
"value": null,
|
|
475
|
+
"valid": false
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "detection ai_agent",
|
|
479
|
+
"field": "detection",
|
|
480
|
+
"value": {
|
|
481
|
+
"class": "ai_agent",
|
|
482
|
+
"name": "Meta Muse",
|
|
483
|
+
"confidence": 96
|
|
484
|
+
},
|
|
485
|
+
"valid": true
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "detection bot at the confidence floor",
|
|
489
|
+
"field": "detection",
|
|
490
|
+
"value": {
|
|
491
|
+
"class": "bot",
|
|
492
|
+
"name": "Automation Tools",
|
|
493
|
+
"confidence": 0
|
|
494
|
+
},
|
|
495
|
+
"valid": true
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "detection name of 64 characters",
|
|
499
|
+
"field": "detection",
|
|
500
|
+
"value": {
|
|
501
|
+
"class": "bot",
|
|
502
|
+
"name": "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn",
|
|
503
|
+
"confidence": 100
|
|
504
|
+
},
|
|
505
|
+
"valid": true
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"name": "detection class is human",
|
|
509
|
+
"field": "detection",
|
|
510
|
+
"value": {
|
|
511
|
+
"class": "human",
|
|
512
|
+
"name": "x",
|
|
513
|
+
"confidence": 1
|
|
514
|
+
},
|
|
515
|
+
"valid": false
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "detection name is empty",
|
|
519
|
+
"field": "detection",
|
|
520
|
+
"value": {
|
|
521
|
+
"class": "bot",
|
|
522
|
+
"name": "",
|
|
523
|
+
"confidence": 1
|
|
524
|
+
},
|
|
525
|
+
"valid": false
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "detection name is 65 characters",
|
|
529
|
+
"field": "detection",
|
|
530
|
+
"value": {
|
|
531
|
+
"class": "bot",
|
|
532
|
+
"name": "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn",
|
|
533
|
+
"confidence": 1
|
|
534
|
+
},
|
|
535
|
+
"valid": false
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "detection name has a control character",
|
|
539
|
+
"field": "detection",
|
|
540
|
+
"value": {
|
|
541
|
+
"class": "bot",
|
|
542
|
+
"name": "a\u0007b",
|
|
543
|
+
"confidence": 1
|
|
544
|
+
},
|
|
545
|
+
"valid": false
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"name": "detection confidence is 101",
|
|
549
|
+
"field": "detection",
|
|
550
|
+
"value": {
|
|
551
|
+
"class": "bot",
|
|
552
|
+
"name": "x",
|
|
553
|
+
"confidence": 101
|
|
554
|
+
},
|
|
555
|
+
"valid": false
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "detection confidence is -1",
|
|
559
|
+
"field": "detection",
|
|
560
|
+
"value": {
|
|
561
|
+
"class": "bot",
|
|
562
|
+
"name": "x",
|
|
563
|
+
"confidence": -1
|
|
564
|
+
},
|
|
565
|
+
"valid": false
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "detection confidence is 1.5",
|
|
569
|
+
"field": "detection",
|
|
570
|
+
"value": {
|
|
571
|
+
"class": "bot",
|
|
572
|
+
"name": "x",
|
|
573
|
+
"confidence": 1.5
|
|
574
|
+
},
|
|
575
|
+
"valid": false
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "detection is a string",
|
|
579
|
+
"field": "detection",
|
|
580
|
+
"value": "bot",
|
|
581
|
+
"valid": false
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"name": "detection is a null",
|
|
585
|
+
"field": "detection",
|
|
586
|
+
"value": null,
|
|
587
|
+
"valid": false
|
|
420
588
|
}
|
|
421
589
|
]
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocolVersion": 2,
|
|
3
|
+
"proof": {
|
|
4
|
+
"verifier": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
5
|
+
"challenge": "DwBzhbb51LfusnSGBa_hqYSgo7-j8BTQnip4TOnlzRo",
|
|
6
|
+
"wrongVerifier": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA"
|
|
7
|
+
},
|
|
8
|
+
"registerRequest": {
|
|
9
|
+
"protocolVersion": 2,
|
|
10
|
+
"exchangeChallenge": "DwBzhbb51LfusnSGBa_hqYSgo7-j8BTQnip4TOnlzRo",
|
|
11
|
+
"repoName": "Pairing project",
|
|
12
|
+
"framework": "static"
|
|
13
|
+
},
|
|
14
|
+
"registerResponse": {
|
|
15
|
+
"success": true,
|
|
16
|
+
"data": {
|
|
17
|
+
"protocolVersion": 2,
|
|
18
|
+
"registrationId": "66666666-6666-4666-8666-666666666666",
|
|
19
|
+
"claimToken": "cliclaim_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
20
|
+
"claimUrl": "https://app.example.test/cli/claim?token=cliclaim_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
21
|
+
"confirmationCode": "BCDF-GHJK",
|
|
22
|
+
"expiresAt": "2099-01-01T00:00:00.000Z"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"privatePendingResponse": {
|
|
26
|
+
"success": true,
|
|
27
|
+
"data": {
|
|
28
|
+
"protocolVersion": 2,
|
|
29
|
+
"status": "pending",
|
|
30
|
+
"claimed": null
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"privateClaimedResponse": {
|
|
34
|
+
"success": true,
|
|
35
|
+
"data": {
|
|
36
|
+
"protocolVersion": 2,
|
|
37
|
+
"status": "claimed",
|
|
38
|
+
"claimed": {
|
|
39
|
+
"userId": "11111111-1111-4111-8111-111111111111",
|
|
40
|
+
"userEmail": "terminal@example.test",
|
|
41
|
+
"userName": "Terminal operator",
|
|
42
|
+
"organizationId": "22222222-2222-4222-8222-222222222222",
|
|
43
|
+
"organizationName": "Approved organization",
|
|
44
|
+
"organizationSlug": "approved-org",
|
|
45
|
+
"projectId": "55555555-5555-4555-8555-555555555555",
|
|
46
|
+
"projectName": "Pairing project",
|
|
47
|
+
"projectDomain": "pairing.example.test"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"exchangeRequest": {
|
|
52
|
+
"protocolVersion": 2,
|
|
53
|
+
"registrationId": "66666666-6666-4666-8666-666666666666",
|
|
54
|
+
"exchangeVerifier": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
55
|
+
"approvedClaim": {
|
|
56
|
+
"userId": "11111111-1111-4111-8111-111111111111",
|
|
57
|
+
"organizationId": "22222222-2222-4222-8222-222222222222",
|
|
58
|
+
"projectId": "55555555-5555-4555-8555-555555555555"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"exchangeResponse": {
|
|
62
|
+
"success": true,
|
|
63
|
+
"data": {
|
|
64
|
+
"protocolVersion": 2,
|
|
65
|
+
"userId": "11111111-1111-4111-8111-111111111111",
|
|
66
|
+
"organizationId": "22222222-2222-4222-8222-222222222222",
|
|
67
|
+
"projectId": "55555555-5555-4555-8555-555555555555",
|
|
68
|
+
"friendlyId": "pairing-project",
|
|
69
|
+
"apiKey": "sk_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
70
|
+
"dashboardUrl": "https://app.example.test/dashboard/approved-org/pairing-project/installations"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"errors": [
|
|
74
|
+
{
|
|
75
|
+
"status": 426,
|
|
76
|
+
"body": {
|
|
77
|
+
"success": false,
|
|
78
|
+
"error": {
|
|
79
|
+
"code": "PAIRING_UPGRADE_REQUIRED",
|
|
80
|
+
"message": "Upgrade the KYA-OS CLI and run checkpoint init again. This pairing requires independent terminal proof."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"status": 401,
|
|
86
|
+
"body": {
|
|
87
|
+
"success": false,
|
|
88
|
+
"error": {
|
|
89
|
+
"code": "PROOF_INVALID",
|
|
90
|
+
"message": "Invalid terminal pairing proof"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"status": 409,
|
|
96
|
+
"body": {
|
|
97
|
+
"success": false,
|
|
98
|
+
"error": {
|
|
99
|
+
"code": "CLAIM_CHANGED",
|
|
100
|
+
"message": "Claim ownership changed. Inspect and approve the pairing again."
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"status": 403,
|
|
106
|
+
"body": {
|
|
107
|
+
"success": false,
|
|
108
|
+
"error": {
|
|
109
|
+
"code": "CLAIM_UNAVAILABLE",
|
|
110
|
+
"message": "The claimed account or project is no longer available"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$fixture": "detection/reason-codes",
|
|
3
|
-
"$spec": "
|
|
3
|
+
"$spec": "Detection reason codes on the wire (#4874)",
|
|
4
4
|
"description": "The detection/* reason-code registry: a worker-side machine-readable projection of the engine's structured detection evidence (signals[], verificationMethod, detectionClass, isAiCrawler) onto the KYA-Reason-Codes wire header and persisted detection metadata. Emitters MUST use these exact strings.",
|
|
5
5
|
"verified": {
|
|
6
6
|
"detection/signature-verified": "verificationMethod === 'kya-http'",
|
|
@@ -32,37 +32,46 @@ min_assurance, interval, kind`. Omitted optional params leave the order of the r
|
|
|
32
32
|
|
|
33
33
|
## Files
|
|
34
34
|
|
|
35
|
-
| File
|
|
36
|
-
|
|
|
37
|
-
| `challenge.delegation.minimal.json`
|
|
38
|
-
| `challenge.delegation.full.json`
|
|
39
|
-
| `challenge.delegation.fetcher-200.json`
|
|
40
|
-
| `challenge.approval-quorum.json`
|
|
41
|
-
| `pickup.transcript.json`
|
|
42
|
-
| `negative.challenges.json`
|
|
43
|
-
| `error-codes.json`
|
|
44
|
-
| `
|
|
45
|
-
| `protected-resource-metadata.
|
|
35
|
+
| File | Contents |
|
|
36
|
+
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `challenge.delegation.minimal.json` | Required params only |
|
|
38
|
+
| `challenge.delegation.full.json` | All recommended params — the primary parity fixture |
|
|
39
|
+
| `challenge.delegation.fetcher-200.json` | Body-readable **HTTP 200** envelope of the full challenge for 4xx-body-dropping AI fetchers — body byte-identical to `full`; a cooperative-UX bridge, **not** an access control |
|
|
40
|
+
| `challenge.approval-quorum.json` | `kind="approval_quorum"` variant (grant format pending #3248; **not parity-frozen**) |
|
|
41
|
+
| `pickup.transcript.json` | Poll sequences: pending→ready→re-delivery, pinning race, 403/404/410/429 |
|
|
42
|
+
| `negative.challenges.json` | Malformed challenges (reject) + tolerance cases (accept) |
|
|
43
|
+
| `error-codes.json` | The `kyaos/*` registry (spec §9) with HTTP status mapping |
|
|
44
|
+
| `consent-handoff.codes.json` | Outcome and failure-reason codes a PEP reports in the log-detection `consentHandoff` block after trying to register a challenge anchor |
|
|
45
|
+
| `protected-resource-metadata.full.json` | RFC 9728 PRM document served at the URL the §8.1 Bearer challenge advertises — the issuer from the policy response, echoed (a branded issuer domain) + `scopes_supported` |
|
|
46
|
+
| `protected-resource-metadata.no-issuer.json` | Same URL when the policy response carries no issuer — `404 {"error":"not_found"}`, no document |
|
|
47
|
+
| `protected-resource-metadata.invalid-issuer.json` | Same 404 for each issuer in `input.cases` that is not an absolute https URI (http, relative, not a URI, whitespace, no host, backslashes) |
|
|
46
48
|
|
|
47
49
|
## Protected-resource metadata (RFC 9728)
|
|
48
50
|
|
|
49
|
-
`protected-resource-metadata.{full,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
`protected-resource-metadata.{full,no-issuer,invalid-issuer}.json` pin the OAuth Protected Resource Metadata
|
|
52
|
+
served at `/.well-known/oauth-protected-resource` — the URL the §8.1 Delegation challenge
|
|
53
|
+
already advertises via `WWW-Authenticate: Bearer resource_metadata="…"`. Each fixture has an
|
|
54
|
+
`input` block (`resource_host`, `policy_response`, `scopes`) and either an `expected.document`
|
|
55
|
+
block or, when no document is served, an `expected.response` block. `policy_response` is the
|
|
56
|
+
project's policy response (`GET /api/internal/policies/{projectId}`); its
|
|
57
|
+
`authorizationServerIssuer` is the issuer the platform computes for the org. The .NET PEPs read
|
|
58
|
+
it from that response, and the gateway worker reads the same value from its routing entry, so
|
|
59
|
+
the .NET tests and the worker's well-known tests both read these files. Parity is **structural
|
|
60
|
+
body parity** (parse + compare values; member order non-normative, but emitters SHOULD use the
|
|
61
|
+
`conformance.key_order` for diffability), with byte-exactness on the `resource` string and the
|
|
62
|
+
`authorization_servers` issuer. Rules:
|
|
57
63
|
|
|
58
64
|
13. **`resource` = `https://<resource_host>`**, byte-matching the host in the §8.1 Bearer URL
|
|
59
65
|
(the request `Host`, port-preserving).
|
|
60
|
-
14. **`authorization_servers` is ALWAYS a single-element array
|
|
61
|
-
`
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
14. **`authorization_servers` is ALWAYS a single-element array holding
|
|
67
|
+
`policy_response.authorizationServerIssuer` unchanged.** A PEP never builds an issuer URL
|
|
68
|
+
(no `base_url` origin, no slug from a DID). Without that issuer it serves no document: `404`
|
|
69
|
+
with `{"error":"not_found"}` and `Cache-Control: no-store` (the `no-issuer` fixture). An
|
|
70
|
+
issuer that is not an absolute https URI counts as none: it must be `https://` directly
|
|
71
|
+
followed by a host, with no whitespace, control character or backslash (the
|
|
72
|
+
`invalid-issuer` fixture, whose `input.cases` each replace the issuer).
|
|
64
73
|
15. **`scopes_supported` is emitted ONLY when `scopes` is non-empty** — never defaulted to a
|
|
65
|
-
scope
|
|
74
|
+
scope.
|
|
66
75
|
16. The .NET v1 document does **not** emit the `kyaos_needs_authorization` extension the
|
|
67
76
|
gateway-worker adds (out of scope).
|
|
68
77
|
|
|
@@ -108,5 +117,5 @@ fetcher-200 parity tests; the 401 fixtures' rules 1–8 above are unchanged):
|
|
|
108
117
|
`AuthorizationHost`, never the request `Host`.
|
|
109
118
|
|
|
110
119
|
Coverage: `packages/checkpoint-shared/src/__tests__/kya-http-fetcher-200-fixture.test.ts` (body
|
|
111
|
-
byte-parity + envelope shape) and `apps/web/tests/unit/lib/
|
|
120
|
+
byte-parity + envelope shape) and `apps/web/tests/unit/lib/authz/needs-authorization-challenge.test.ts`
|
|
112
121
|
(the proof verifies transport-agnostically; a divergent 200 body fails CONTENT_BINDING_MISMATCH).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Consent-handoff vocabulary a PEP reports on its log-detection body (top-level `consentHandoff`) after it tries to issue a delegation challenge. `outcome` is always present. `reason` is present only when `outcome` is `registration_failed`. `httpStatus` is the status the registration host answered with, when it answered at all. `host` is the authority (host[:port]) the registration was sent to, never a path or query. The .NET registrar and the dashboard ingest schema both assert against this file.",
|
|
3
|
+
"wire_key": "consentHandoff",
|
|
4
|
+
"outcomes": ["registered", "registration_failed", "not_configured"],
|
|
5
|
+
"reasons": [
|
|
6
|
+
"http_401",
|
|
7
|
+
"http_403",
|
|
8
|
+
"http_404",
|
|
9
|
+
"http_4xx",
|
|
10
|
+
"http_5xx",
|
|
11
|
+
"http_other",
|
|
12
|
+
"timeout",
|
|
13
|
+
"network_error",
|
|
14
|
+
"invalid_response",
|
|
15
|
+
"missing_proof",
|
|
16
|
+
"placeholder_proof",
|
|
17
|
+
"invalid_config"
|
|
18
|
+
],
|
|
19
|
+
"examples": [
|
|
20
|
+
{
|
|
21
|
+
"outcome": "registration_failed",
|
|
22
|
+
"reason": "http_401",
|
|
23
|
+
"httpStatus": 401,
|
|
24
|
+
"host": "auth.example.com"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"outcome": "registration_failed",
|
|
28
|
+
"reason": "timeout",
|
|
29
|
+
"host": "auth.example.com"
|
|
30
|
+
},
|
|
31
|
+
{ "outcome": "registered" },
|
|
32
|
+
{ "outcome": "not_configured" }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$fixture": "kya-http/protected-resource-metadata.full",
|
|
3
3
|
"$spec": "RFC 9728 OAuth Protected Resource Metadata (advertised by draft-kya-http-02 §8.1)",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "PRM document served at /.well-known/oauth-protected-resource — the URL the §8.1 Bearer challenge advertises. authorization_servers is the issuer the platform computes for the org (IssuerContext) and sends as authorizationServerIssuer: in the project's policy response (GET /api/internal/policies/{projectId}, input.policy_response) for the .NET PEPs, and in the routing entry for the gateway worker. A PEP echoes it unchanged and never builds an issuer URL. This org's issuer is on its own issuer domain, not the platform origin. With scopes present, scopes_supported is emitted. Every PEP that serves this URL (.NET net462 + net8, gateway worker) must produce this authorization_servers for the same input.",
|
|
5
5
|
"input": {
|
|
6
6
|
"resource_host": "api.merchant.com",
|
|
7
|
-
"
|
|
8
|
-
|
|
7
|
+
"policy_response": {
|
|
8
|
+
"projectId": "proj-merchant",
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"blockThreshold": 80,
|
|
11
|
+
"defaultAction": "allow",
|
|
12
|
+
"denyList": [],
|
|
13
|
+
"allowList": [],
|
|
14
|
+
"pathRules": [],
|
|
15
|
+
"authorizationHost": "auth.merchant.com",
|
|
16
|
+
"authorizationServerIssuer": "https://auth.merchant.com/oauth/acme"
|
|
17
|
+
},
|
|
9
18
|
"scopes": ["commerce.checkout"]
|
|
10
19
|
},
|
|
11
20
|
"expected": {
|
|
12
21
|
"document": {
|
|
13
22
|
"resource": "https://api.merchant.com",
|
|
14
|
-
"authorization_servers": ["https://
|
|
23
|
+
"authorization_servers": ["https://auth.merchant.com/oauth/acme"],
|
|
15
24
|
"bearer_methods_supported": ["header"],
|
|
16
25
|
"scopes_supported": ["commerce.checkout"],
|
|
17
26
|
"resource_documentation": "https://kya.vouched.id/docs/enforce/kya-os-enforcement"
|
|
@@ -25,6 +34,6 @@
|
|
|
25
34
|
"scopes_supported",
|
|
26
35
|
"resource_documentation"
|
|
27
36
|
],
|
|
28
|
-
"notes": "resource byte-matches the §8.1 Bearer resource_metadata URL host; authorization_servers is ALWAYS a single-element array; the .NET v1 document does NOT emit the kyaos_needs_authorization extension the gateway-worker adds."
|
|
37
|
+
"notes": "resource byte-matches the §8.1 Bearer resource_metadata URL host; authorization_servers is ALWAYS a single-element array holding policy_response.authorizationServerIssuer byte-for-byte; the .NET v1 document does NOT emit the kyaos_needs_authorization extension the gateway-worker adds."
|
|
29
38
|
}
|
|
30
39
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$fixture": "kya-http/protected-resource-metadata.invalid-issuer",
|
|
3
|
+
"$spec": "RFC 9728 OAuth Protected Resource Metadata (advertised by draft-kya-http-02 §8.1)",
|
|
4
|
+
"description": "No PRM document for an issuer that is not an absolute https URI. Each case sets policy_response.authorizationServerIssuer to the case's value; a PEP treats that issuer as absent and answers /.well-known/oauth-protected-resource with the same 404 as protected-resource-metadata.no-issuer.json. An issuer a PEP may advertise is https:// directly followed by a host, with no whitespace, control character or backslash.",
|
|
5
|
+
"input": {
|
|
6
|
+
"resource_host": "api.merchant.com",
|
|
7
|
+
"policy_response": {
|
|
8
|
+
"projectId": "proj-merchant",
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"blockThreshold": 80,
|
|
11
|
+
"defaultAction": "allow",
|
|
12
|
+
"denyList": [],
|
|
13
|
+
"allowList": [],
|
|
14
|
+
"pathRules": [],
|
|
15
|
+
"authorizationHost": "auth.merchant.com"
|
|
16
|
+
},
|
|
17
|
+
"scopes": ["commerce.checkout"],
|
|
18
|
+
"cases": [
|
|
19
|
+
{
|
|
20
|
+
"label": "an http issuer",
|
|
21
|
+
"authorizationServerIssuer": "http://auth.merchant.com/oauth/acme"
|
|
22
|
+
},
|
|
23
|
+
{ "label": "a relative path", "authorizationServerIssuer": "/oauth/acme" },
|
|
24
|
+
{ "label": "not a URI", "authorizationServerIssuer": "auth.merchant.com oauth acme" },
|
|
25
|
+
{ "label": "a bare word", "authorizationServerIssuer": "acme" },
|
|
26
|
+
{ "label": "whitespace only", "authorizationServerIssuer": " " },
|
|
27
|
+
{
|
|
28
|
+
"label": "an https issuer padded with whitespace",
|
|
29
|
+
"authorizationServerIssuer": " https://auth.merchant.com/oauth/acme "
|
|
30
|
+
},
|
|
31
|
+
{ "label": "https with no host", "authorizationServerIssuer": "https:///oauth/acme" },
|
|
32
|
+
{
|
|
33
|
+
"label": "an https issuer with backslashes",
|
|
34
|
+
"authorizationServerIssuer": "https://auth.merchant.com\\oauth\\acme"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"expected": {
|
|
39
|
+
"response": {
|
|
40
|
+
"status": 404,
|
|
41
|
+
"headers": {
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
"Cache-Control": "no-store"
|
|
44
|
+
},
|
|
45
|
+
"body": { "error": "not_found" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"conformance": {
|
|
49
|
+
"notes": "Every case gets the 404 and names no authorization server. Every PEP that serves the metadata URL (.NET net462 + net8, gateway worker) answers each case the same way; protected-resource-metadata.full.json is the https case that is served."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$fixture": "kya-http/protected-resource-metadata.no-issuer",
|
|
3
|
+
"$spec": "RFC 9728 OAuth Protected Resource Metadata (advertised by draft-kya-http-02 §8.1)",
|
|
4
|
+
"description": "No PRM document: the policy response carries no authorizationServerIssuer, so the platform names no authorization server for this project. A PEP answers /.well-known/oauth-protected-resource with 404 {\"error\":\"not_found\"} and never falls back to an issuer of its own (no BaseUrl origin, no slug from a DID). The counterpart of protected-resource-metadata.full.json.",
|
|
5
|
+
"input": {
|
|
6
|
+
"resource_host": "api.merchant.com",
|
|
7
|
+
"policy_response": {
|
|
8
|
+
"projectId": "proj-merchant",
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"blockThreshold": 80,
|
|
11
|
+
"defaultAction": "allow",
|
|
12
|
+
"denyList": [],
|
|
13
|
+
"allowList": [],
|
|
14
|
+
"pathRules": [],
|
|
15
|
+
"authorizationHost": "auth.merchant.com"
|
|
16
|
+
},
|
|
17
|
+
"scopes": ["commerce.checkout"]
|
|
18
|
+
},
|
|
19
|
+
"expected": {
|
|
20
|
+
"response": {
|
|
21
|
+
"status": 404,
|
|
22
|
+
"headers": {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
"Cache-Control": "no-store"
|
|
25
|
+
},
|
|
26
|
+
"body": { "error": "not_found" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"conformance": {
|
|
30
|
+
"notes": "The 404 names no authorization server. Every PEP that serves the metadata URL (.NET net462 + net8, gateway worker) answers this input the same way."
|
|
31
|
+
}
|
|
32
|
+
}
|