@kya-os/mcp 1.10.0 → 1.11.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/AUDITABILITY.md +441 -0
- package/CHANGELOG.md +104 -0
- package/CONFORMANCE.md +598 -0
- package/README.md +67 -4
- package/SPEC.md +1827 -0
- package/dist/audit/adapters/legacy-audit-log.d.ts +20 -0
- package/dist/audit/adapters/legacy-audit-log.d.ts.map +1 -0
- package/dist/audit/adapters/legacy-audit-log.js +56 -0
- package/dist/audit/adapters/legacy-audit-log.js.map +1 -0
- package/dist/audit/adapters/mcp.d.ts +105 -0
- package/dist/audit/adapters/mcp.d.ts.map +1 -0
- package/dist/audit/adapters/mcp.js +213 -0
- package/dist/audit/adapters/mcp.js.map +1 -0
- package/dist/audit/assurance.d.ts +22 -0
- package/dist/audit/assurance.d.ts.map +1 -0
- package/dist/audit/assurance.js +39 -0
- package/dist/audit/assurance.js.map +1 -0
- package/dist/audit/checkpoint-coordinator.d.ts +51 -0
- package/dist/audit/checkpoint-coordinator.d.ts.map +1 -0
- package/dist/audit/checkpoint-coordinator.js +112 -0
- package/dist/audit/checkpoint-coordinator.js.map +1 -0
- package/dist/audit/checkpoint.d.ts +59 -0
- package/dist/audit/checkpoint.d.ts.map +1 -0
- package/dist/audit/checkpoint.js +219 -0
- package/dist/audit/checkpoint.js.map +1 -0
- package/dist/audit/cli.d.ts +8 -0
- package/dist/audit/cli.d.ts.map +1 -0
- package/dist/audit/cli.js +85 -0
- package/dist/audit/cli.js.map +1 -0
- package/dist/audit/crypto.d.ts +37 -0
- package/dist/audit/crypto.d.ts.map +1 -0
- package/dist/audit/crypto.js +68 -0
- package/dist/audit/crypto.js.map +1 -0
- package/dist/audit/errors.d.ts +29 -0
- package/dist/audit/errors.d.ts.map +1 -0
- package/dist/audit/errors.js +33 -0
- package/dist/audit/errors.js.map +1 -0
- package/dist/audit/evidence.d.ts +45 -0
- package/dist/audit/evidence.d.ts.map +1 -0
- package/dist/audit/evidence.js +151 -0
- package/dist/audit/evidence.js.map +1 -0
- package/dist/audit/index.d.ts +27 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +27 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/integrity.d.ts +19 -0
- package/dist/audit/integrity.d.ts.map +1 -0
- package/dist/audit/integrity.js +64 -0
- package/dist/audit/integrity.js.map +1 -0
- package/dist/audit/merkle.d.ts +31 -0
- package/dist/audit/merkle.d.ts.map +1 -0
- package/dist/audit/merkle.js +195 -0
- package/dist/audit/merkle.js.map +1 -0
- package/dist/audit/mirror-service.d.ts +19 -0
- package/dist/audit/mirror-service.d.ts.map +1 -0
- package/dist/audit/mirror-service.js +54 -0
- package/dist/audit/mirror-service.js.map +1 -0
- package/dist/audit/projection.d.ts +90 -0
- package/dist/audit/projection.d.ts.map +1 -0
- package/dist/audit/projection.js +142 -0
- package/dist/audit/projection.js.map +1 -0
- package/dist/audit/providers/anchor.d.ts +23 -0
- package/dist/audit/providers/anchor.d.ts.map +1 -0
- package/dist/audit/providers/anchor.js +25 -0
- package/dist/audit/providers/anchor.js.map +1 -0
- package/dist/audit/providers/evidence.d.ts +36 -0
- package/dist/audit/providers/evidence.d.ts.map +1 -0
- package/dist/audit/providers/evidence.js +2 -0
- package/dist/audit/providers/evidence.js.map +1 -0
- package/dist/audit/providers/journal.d.ts +35 -0
- package/dist/audit/providers/journal.d.ts.map +1 -0
- package/dist/audit/providers/journal.js +2 -0
- package/dist/audit/providers/journal.js.map +1 -0
- package/dist/audit/providers/memory-journal.d.ts +24 -0
- package/dist/audit/providers/memory-journal.d.ts.map +1 -0
- package/dist/audit/providers/memory-journal.js +73 -0
- package/dist/audit/providers/memory-journal.js.map +1 -0
- package/dist/audit/providers/observer.d.ts +30 -0
- package/dist/audit/providers/observer.d.ts.map +1 -0
- package/dist/audit/providers/observer.js +100 -0
- package/dist/audit/providers/observer.js.map +1 -0
- package/dist/audit/providers/outbox.d.ts +37 -0
- package/dist/audit/providers/outbox.d.ts.map +1 -0
- package/dist/audit/providers/outbox.js +52 -0
- package/dist/audit/providers/outbox.js.map +1 -0
- package/dist/audit/providers/recorder-client.d.ts +22 -0
- package/dist/audit/providers/recorder-client.d.ts.map +1 -0
- package/dist/audit/providers/recorder-client.js +17 -0
- package/dist/audit/providers/recorder-client.js.map +1 -0
- package/dist/audit/providers/source-state.d.ts +37 -0
- package/dist/audit/providers/source-state.d.ts.map +1 -0
- package/dist/audit/providers/source-state.js +94 -0
- package/dist/audit/providers/source-state.js.map +1 -0
- package/dist/audit/recorder-service.d.ts +78 -0
- package/dist/audit/recorder-service.d.ts.map +1 -0
- package/dist/audit/recorder-service.js +331 -0
- package/dist/audit/recorder-service.js.map +1 -0
- package/dist/audit/replay-bundle.d.ts +52 -0
- package/dist/audit/replay-bundle.d.ts.map +1 -0
- package/dist/audit/replay-bundle.js +551 -0
- package/dist/audit/replay-bundle.js.map +1 -0
- package/dist/audit/schemas.d.ts +1144 -0
- package/dist/audit/schemas.d.ts.map +1 -0
- package/dist/audit/schemas.js +483 -0
- package/dist/audit/schemas.js.map +1 -0
- package/dist/audit/service.d.ts +91 -0
- package/dist/audit/service.d.ts.map +1 -0
- package/dist/audit/service.js +222 -0
- package/dist/audit/service.js.map +1 -0
- package/dist/audit/testing/index.d.ts +2 -0
- package/dist/audit/testing/index.d.ts.map +1 -0
- package/dist/audit/testing/index.js +2 -0
- package/dist/audit/testing/index.js.map +1 -0
- package/dist/audit/testing/provider-contracts.d.ts +51 -0
- package/dist/audit/testing/provider-contracts.d.ts.map +1 -0
- package/dist/audit/testing/provider-contracts.js +391 -0
- package/dist/audit/testing/provider-contracts.js.map +1 -0
- package/dist/audit/types.d.ts +356 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +49 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/verifier.d.ts +73 -0
- package/dist/audit/verifier.d.ts.map +1 -0
- package/dist/audit/verifier.js +322 -0
- package/dist/audit/verifier.js.map +1 -0
- package/dist/card/proof/canonical.d.ts.map +1 -1
- package/dist/card/proof/canonical.js +19 -1
- package/dist/card/proof/canonical.js.map +1 -1
- package/dist/delegation/delegation-graph.d.ts +4 -0
- package/dist/delegation/delegation-graph.d.ts.map +1 -1
- package/dist/delegation/delegation-graph.js +28 -2
- package/dist/delegation/delegation-graph.js.map +1 -1
- package/dist/delegation/statuslist-manager.d.ts +5 -0
- package/dist/delegation/statuslist-manager.d.ts.map +1 -1
- package/dist/delegation/statuslist-manager.js.map +1 -1
- package/dist/delegation/storage/memory-graph-storage.d.ts +4 -2
- package/dist/delegation/storage/memory-graph-storage.d.ts.map +1 -1
- package/dist/delegation/storage/memory-graph-storage.js +18 -0
- package/dist/delegation/storage/memory-graph-storage.js.map +1 -1
- package/dist/delegation/storage/memory-statuslist-storage.d.ts +5 -2
- package/dist/delegation/storage/memory-statuslist-storage.d.ts.map +1 -1
- package/dist/delegation/storage/memory-statuslist-storage.js +21 -2
- package/dist/delegation/storage/memory-statuslist-storage.js.map +1 -1
- package/dist/delegation/utils.d.ts.map +1 -1
- package/dist/delegation/utils.js +2 -42
- package/dist/delegation/utils.js.map +1 -1
- package/dist/delegation/vc-verifier.d.ts +4 -0
- package/dist/delegation/vc-verifier.d.ts.map +1 -1
- package/dist/delegation/vc-verifier.js +44 -13
- package/dist/delegation/vc-verifier.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware/kya-os-transport.d.ts.map +1 -1
- package/dist/middleware/kya-os-transport.js +10 -3
- package/dist/middleware/kya-os-transport.js.map +1 -1
- package/dist/middleware/with-kya-os-server.d.ts +6 -0
- package/dist/middleware/with-kya-os-server.d.ts.map +1 -1
- package/dist/middleware/with-kya-os-server.js +2 -0
- package/dist/middleware/with-kya-os-server.js.map +1 -1
- package/dist/middleware/with-kya-os.config-types.d.ts +15 -0
- package/dist/middleware/with-kya-os.config-types.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.config-types.js.map +1 -1
- package/dist/middleware/with-kya-os.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.delegation-gate.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.delegation-gate.js +96 -3
- package/dist/middleware/with-kya-os.delegation-gate.js.map +1 -1
- package/dist/middleware/with-kya-os.deps.d.ts +2 -0
- package/dist/middleware/with-kya-os.deps.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.js +23 -0
- package/dist/middleware/with-kya-os.js.map +1 -1
- package/dist/middleware/with-kya-os.policy-gate.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.policy-gate.js +29 -4
- package/dist/middleware/with-kya-os.policy-gate.js.map +1 -1
- package/dist/middleware/with-kya-os.protocol.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.protocol.js +10 -0
- package/dist/middleware/with-kya-os.protocol.js.map +1 -1
- package/dist/middleware/with-kya-os.session.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.session.js +208 -2
- package/dist/middleware/with-kya-os.session.js.map +1 -1
- package/dist/middleware/with-kya-os.types.d.ts +6 -0
- package/dist/middleware/with-kya-os.types.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.types.js.map +1 -1
- package/dist/proof/generator.d.ts.map +1 -1
- package/dist/proof/generator.js +6 -5
- package/dist/proof/generator.js.map +1 -1
- package/dist/proof/verifier.d.ts +12 -0
- package/dist/proof/verifier.d.ts.map +1 -1
- package/dist/proof/verifier.js +35 -4
- package/dist/proof/verifier.js.map +1 -1
- package/dist/session/manager.js +1 -1
- package/dist/session/manager.js.map +1 -1
- package/dist/utils/canonical-json.d.ts +15 -0
- package/dist/utils/canonical-json.d.ts.map +1 -0
- package/dist/utils/canonical-json.js +109 -0
- package/dist/utils/canonical-json.js.map +1 -0
- package/dist/utils/crypto-service.d.ts.map +1 -1
- package/dist/utils/crypto-service.js +5 -0
- package/dist/utils/crypto-service.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/safe-fetch-transports.d.ts +15 -2
- package/dist/utils/safe-fetch-transports.d.ts.map +1 -1
- package/dist/utils/safe-fetch-transports.js +66 -32
- package/dist/utils/safe-fetch-transports.js.map +1 -1
- package/package.json +29 -11
- package/schemas/README.md +27 -1
- package/schemas/audit-anchor-receipt.schema.json +16 -0
- package/schemas/audit-bundle-manifest.schema.json +71 -0
- package/schemas/audit-checkpoint.schema.json +37 -0
- package/schemas/audit-consistency-proof.schema.json +17 -0
- package/schemas/audit-entry.schema.json +33 -0
- package/schemas/audit-event.schema.json +168 -0
- package/schemas/audit-inclusion-proof.schema.json +17 -0
- package/schemas/audit-observation.schema.json +40 -0
- package/schemas/audit-receipt.schema.json +32 -0
- package/schemas/audit-verification-policy.schema.json +71 -0
- package/schemas/audit-verification-report.schema.json +29 -0
- package/schemas/well-known-mcpi.json +17 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/anchor-receipt/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Supporting Checkpoint Anchor Receipt v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "kind", "providerId", "checkpointDigest", "issuedAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/anchor-receipt/v1.0.0" },
|
|
10
|
+
"kind": { "enum": ["worm", "rfc3161", "scitt"] },
|
|
11
|
+
"providerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
12
|
+
"checkpointDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
13
|
+
"issuedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
14
|
+
"receiptData": { "type": "string", "minLength": 1, "maxLength": 65536 }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/bundle-manifest/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Bundle Manifest Core v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"kyaUniqueProperty": { "array": "inventory", "property": "path" },
|
|
8
|
+
"required": ["schema", "bundleId", "formatVersion", "selections", "exporter", "purpose", "exportedAt", "verificationPolicyDigest", "inventory", "integritySuite"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/bundle-manifest/v1.0.0" },
|
|
11
|
+
"bundleId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
12
|
+
"formatVersion": { "const": "1.0.0" },
|
|
13
|
+
"selections": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/selection" } },
|
|
14
|
+
"exporter": { "$ref": "#/$defs/signerRef" },
|
|
15
|
+
"purpose": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
16
|
+
"exportedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
17
|
+
"verificationPolicyDigest": { "$ref": "#/$defs/digest" },
|
|
18
|
+
"inventory": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/inventoryItem" } },
|
|
19
|
+
"integritySuite": { "const": "KYA-AUDIT-BUNDLE-JCS-SHA256-JWS-2026" }
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
23
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
24
|
+
"signerRef": {
|
|
25
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
28
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
29
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"selection": {
|
|
33
|
+
"type": "object", "additionalProperties": false,
|
|
34
|
+
"kyaOrderedDecimalRange": { "first": "firstSequence", "last": "lastSequence" },
|
|
35
|
+
"required": ["ledgerId", "ledgerEpochId", "firstSequence", "lastSequence", "expectedHeadDigest", "checkpointTreeSizes"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
38
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
39
|
+
"firstSequence": { "$ref": "#/$defs/decimal" },
|
|
40
|
+
"lastSequence": { "$ref": "#/$defs/decimal" },
|
|
41
|
+
"expectedHeadDigest": { "$ref": "#/$defs/digest" },
|
|
42
|
+
"checkpointTreeSizes": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/decimal" } }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"inventoryItem": {
|
|
46
|
+
"oneOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "object", "additionalProperties": false,
|
|
49
|
+
"required": ["path", "mediaType", "disposition", "digest", "size"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"path": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
52
|
+
"mediaType": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
53
|
+
"disposition": { "const": "included" },
|
|
54
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
55
|
+
"size": { "$ref": "#/$defs/decimal" }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "object", "additionalProperties": false,
|
|
60
|
+
"required": ["path", "mediaType", "disposition", "reasonCode"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"path": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
63
|
+
"mediaType": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
64
|
+
"disposition": { "enum": ["redacted", "disposed", "unavailable", "policy_excluded"] },
|
|
65
|
+
"reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/checkpoint/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Checkpoint Core v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"kyaOrderedDecimalRange": { "first": "firstSequence", "last": "lastSequence" },
|
|
8
|
+
"required": ["schema", "checkpointId", "ledgerId", "ledgerEpochId", "treeSize", "firstSequence", "lastSequence", "rootDigest", "headEntryDigest", "previousCheckpointDigest", "createdAt", "issuer", "integritySuite"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/checkpoint/v1.0.0" },
|
|
11
|
+
"checkpointId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
12
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
13
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
14
|
+
"treeSize": { "$ref": "#/$defs/nonzeroDecimal" },
|
|
15
|
+
"firstSequence": { "$ref": "#/$defs/decimal" },
|
|
16
|
+
"lastSequence": { "$ref": "#/$defs/decimal" },
|
|
17
|
+
"rootDigest": { "$ref": "#/$defs/digest" },
|
|
18
|
+
"headEntryDigest": { "$ref": "#/$defs/digest" },
|
|
19
|
+
"previousCheckpointDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
20
|
+
"createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
21
|
+
"issuer": { "$ref": "#/$defs/signerRef" },
|
|
22
|
+
"integritySuite": { "const": "KYA-AUDIT-RFC9162-SHA256-JWS-2026" }
|
|
23
|
+
},
|
|
24
|
+
"$defs": {
|
|
25
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
26
|
+
"nonzeroDecimal": { "type": "string", "maxLength": 20, "pattern": "^[1-9][0-9]*$" },
|
|
27
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
28
|
+
"signerRef": {
|
|
29
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
32
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
33
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/consistency-proof/v1.0.0",
|
|
4
|
+
"title": "KYA-OS RFC 9162 Consistency Proof v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["oldTreeSize", "newTreeSize", "auditPath"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"oldTreeSize": { "$ref": "#/$defs/decimal" },
|
|
10
|
+
"newTreeSize": { "$ref": "#/$defs/decimal" },
|
|
11
|
+
"auditPath": { "type": "array", "items": { "$ref": "#/$defs/digest" } }
|
|
12
|
+
},
|
|
13
|
+
"$defs": {
|
|
14
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
15
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/entry/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Entry Core v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "ledgerId", "ledgerEpochId", "sequence", "previousEntryDigest", "recordedAt", "recorder", "eventDigest", "event", "evidenceManifestDigest", "integritySuite"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/entry/v1.0.0" },
|
|
10
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
11
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
12
|
+
"sequence": { "$ref": "#/$defs/decimal" },
|
|
13
|
+
"previousEntryDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
14
|
+
"recordedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
15
|
+
"recorder": { "$ref": "#/$defs/signerRef" },
|
|
16
|
+
"eventDigest": { "$ref": "#/$defs/digest" },
|
|
17
|
+
"event": { "$ref": "./audit-event.schema.json" },
|
|
18
|
+
"evidenceManifestDigest": { "$ref": "#/$defs/digest" },
|
|
19
|
+
"integritySuite": { "const": "KYA-AUDIT-JCS-SHA256-JWS-2026" }
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
23
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
24
|
+
"signerRef": {
|
|
25
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
28
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
29
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/event/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Producer Event v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "eventId", "eventType", "eventVersion", "binding", "occurredAt", "tenantRef", "source", "action", "outcome", "evidence", "details", "privacy"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/event/v1.0.0" },
|
|
10
|
+
"eventId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
11
|
+
"eventType": {
|
|
12
|
+
"enum": [
|
|
13
|
+
"session.established", "session.rejected", "session.expired", "session.replay_rejected",
|
|
14
|
+
"tool.call.started", "tool.call.completed", "tool.call.failed", "tool.call.denied", "tool.call.challenged",
|
|
15
|
+
"proof.generated", "proof.verified", "proof.rejected",
|
|
16
|
+
"delegation.issued", "delegation.verified", "delegation.rejected", "delegation.revoked", "delegation.cascade_revoked", "delegation.outbound_attached",
|
|
17
|
+
"authorization.evaluated", "authorization.approved", "authorization.denied", "authorization.step_up_required", "grant.used",
|
|
18
|
+
"consent.requested", "consent.approved", "consent.denied", "credential.required", "credential.verified", "credential.failed",
|
|
19
|
+
"key.rotated", "policy.changed", "configuration.changed", "integrity_suite.transitioned",
|
|
20
|
+
"ledger.epoch.started", "ledger.epoch.transitioned", "checkpoint.created", "checkpoint.anchored", "checkpoint.anchor_failed", "evidence.disposed", "projection.reconciled",
|
|
21
|
+
"audit.source_high_water", "audit.accessed", "audit.exported", "legal_hold.applied", "retention.executed"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"eventVersion": { "const": "1.0.0" },
|
|
25
|
+
"binding": { "type": "string", "maxLength": 256, "pattern": "^urn:kya-os:audit-binding:[a-z0-9][a-z0-9._:-]*$" },
|
|
26
|
+
"occurredAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
27
|
+
"tenantRef": { "$ref": "#/$defs/partyRef" },
|
|
28
|
+
"source": {
|
|
29
|
+
"type": "object", "additionalProperties": false,
|
|
30
|
+
"required": ["producer", "sourceId"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"producer": { "$ref": "#/$defs/partyRef" },
|
|
33
|
+
"sourceId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
34
|
+
"sourceSequence": { "$ref": "#/$defs/decimal" },
|
|
35
|
+
"previousSourceEventDigest": { "$ref": "#/$defs/digest" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"correlationId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
39
|
+
"causationId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
40
|
+
"trace": {
|
|
41
|
+
"type": "object", "additionalProperties": false,
|
|
42
|
+
"properties": {
|
|
43
|
+
"traceId": { "type": "string", "pattern": "^[a-f0-9]{32}$" },
|
|
44
|
+
"spanId": { "type": "string", "pattern": "^[a-f0-9]{16}$" }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"session": {
|
|
48
|
+
"type": "object", "additionalProperties": false, "required": ["ref"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"ref": { "$ref": "#/$defs/partyRef" },
|
|
51
|
+
"handshakeNonceCommitment": { "$ref": "#/$defs/digest" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"actor": { "$ref": "#/$defs/partyRef" },
|
|
55
|
+
"responsibleParty": { "$ref": "#/$defs/partyRef" },
|
|
56
|
+
"resource": { "$ref": "#/$defs/partyRef" },
|
|
57
|
+
"action": {
|
|
58
|
+
"type": "object", "additionalProperties": false, "required": ["category"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"category": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
61
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
62
|
+
"detailRef": { "$ref": "#/$defs/evidenceRef" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"outcome": { "enum": ["succeeded", "failed", "denied", "challenged", "unknown"] },
|
|
66
|
+
"reason": {
|
|
67
|
+
"type": "object", "additionalProperties": false, "required": ["code"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"code": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
70
|
+
"detailRef": { "$ref": "#/$defs/evidenceRef" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"authorization": {
|
|
74
|
+
"type": "object", "additionalProperties": false, "required": ["source", "decision"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"source": { "enum": ["delegation", "grant", "anonymous", "policy"] },
|
|
77
|
+
"decision": { "enum": ["allowed", "denied", "step_up_required", "needs_authorization"] },
|
|
78
|
+
"scopeId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
79
|
+
"delegationRef": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
80
|
+
"delegationCredentialDigest": { "$ref": "#/$defs/digest" },
|
|
81
|
+
"delegationChainDigests": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/digest" } },
|
|
82
|
+
"statusEvidence": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/evidenceRef" } },
|
|
83
|
+
"grantRef": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
84
|
+
"policyId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
85
|
+
"policyVersion": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
86
|
+
"policyDigest": { "$ref": "#/$defs/digest" },
|
|
87
|
+
"verificationCode": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"proof": { "$ref": "#/$defs/evidenceRef" },
|
|
91
|
+
"evidence": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/evidenceRef" } },
|
|
92
|
+
"details": { "$ref": "#/$defs/details" },
|
|
93
|
+
"privacy": {
|
|
94
|
+
"type": "object", "additionalProperties": false,
|
|
95
|
+
"required": ["classification", "retentionClass"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"classification": { "enum": ["public", "internal", "confidential", "restricted"] },
|
|
98
|
+
"retentionClass": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
99
|
+
"legalHold": { "type": "string", "minLength": 1, "maxLength": 256 }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"allOf": [
|
|
104
|
+
{ "if": { "properties": { "eventType": { "pattern": "^session\\." } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "session" } } } } } },
|
|
105
|
+
{ "if": { "properties": { "eventType": { "pattern": "^tool\\." } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "tool" } } } } } },
|
|
106
|
+
{ "if": { "properties": { "eventType": { "pattern": "^proof\\." } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "proof" } } } } } },
|
|
107
|
+
{ "if": { "properties": { "eventType": { "pattern": "^delegation\\." } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "delegation" } } } } } },
|
|
108
|
+
{ "if": { "properties": { "eventType": { "pattern": "^(authorization\\.|grant\\.)" } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "authorization" } } } } } },
|
|
109
|
+
{ "if": { "properties": { "eventType": { "pattern": "^(consent\\.|credential\\.)" } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "consent" } } } } } },
|
|
110
|
+
{ "if": { "properties": { "eventType": { "pattern": "^(key\\.|policy\\.|configuration\\.|integrity_suite\\.)" } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "key" } } } } } },
|
|
111
|
+
{ "if": { "properties": { "eventType": { "pattern": "^(ledger\\.|checkpoint\\.|evidence\\.|projection\\.)" } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "ledger" } } } } } },
|
|
112
|
+
{ "if": { "properties": { "eventType": { "pattern": "^(audit\\.|legal_hold\\.|retention\\.)" } } }, "then": { "properties": { "details": { "properties": { "family": { "const": "administration" } } } } } }
|
|
113
|
+
],
|
|
114
|
+
"$defs": {
|
|
115
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
116
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
117
|
+
"signerRef": {
|
|
118
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
121
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
122
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"evidenceRef": {
|
|
126
|
+
"type": "object", "additionalProperties": false,
|
|
127
|
+
"required": ["objectId", "ciphertextDigest", "mediaType", "size", "encryption"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"objectId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
130
|
+
"ciphertextDigest": { "$ref": "#/$defs/digest" },
|
|
131
|
+
"plaintextCommitment": { "$ref": "#/$defs/digest" },
|
|
132
|
+
"mediaType": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
133
|
+
"size": { "$ref": "#/$defs/decimal" },
|
|
134
|
+
"encryption": {
|
|
135
|
+
"type": "object", "additionalProperties": false,
|
|
136
|
+
"required": ["suite", "keyId", "nonce", "aadDigest"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"suite": { "const": "A256GCM" },
|
|
139
|
+
"keyId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
140
|
+
"nonce": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
141
|
+
"aadDigest": { "$ref": "#/$defs/digest" }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"partyRef": {
|
|
147
|
+
"oneOf": [
|
|
148
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "did"], "properties": { "kind": { "const": "public_did" }, "did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" } } },
|
|
149
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "did"], "properties": { "kind": { "const": "pairwise_did" }, "did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" } } },
|
|
150
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "value", "keyId"], "properties": { "kind": { "const": "keyed_commitment" }, "value": { "$ref": "#/$defs/digest" }, "keyId": { "type": "string", "minLength": 1, "maxLength": 256 } } },
|
|
151
|
+
{ "type": "object", "additionalProperties": false, "required": ["kind", "ref"], "properties": { "kind": { "const": "evidence_ref" }, "ref": { "$ref": "#/$defs/evidenceRef" } } }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"details": {
|
|
155
|
+
"oneOf": [
|
|
156
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "session" }, "phase": { "enum": ["established", "rejected", "expired", "replay_rejected"] }, "reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 } } },
|
|
157
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase", "attempt"], "properties": { "family": { "const": "tool" }, "phase": { "enum": ["started", "completed", "failed", "denied", "challenged"] }, "attempt": { "$ref": "#/$defs/decimal" }, "idempotencyRef": { "type": "string", "minLength": 1, "maxLength": 256 } } },
|
|
158
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "proof" }, "phase": { "enum": ["generated", "verified", "rejected"] }, "proofDigest": { "$ref": "#/$defs/digest" }, "verificationCode": { "type": "string", "minLength": 1, "maxLength": 128 } } },
|
|
159
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase", "delegationRef"], "properties": { "family": { "const": "delegation" }, "phase": { "enum": ["issued", "verified", "rejected", "revoked", "cascade_revoked", "outbound_attached"] }, "delegationRef": { "type": "string", "minLength": 1, "maxLength": 256 }, "parentRef": { "type": "string", "minLength": 1, "maxLength": 256 }, "statusEvidence": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/evidenceRef" } } } },
|
|
160
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "authorization" }, "phase": { "enum": ["evaluated", "approved", "denied", "step_up_required", "grant_used"] }, "policyDigest": { "$ref": "#/$defs/digest" }, "grantRef": { "type": "string", "minLength": 1, "maxLength": 256 } } },
|
|
161
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "consent" }, "phase": { "enum": ["requested", "approved", "denied", "credential_required", "credential_verified", "credential_failed"] }, "consentRef": { "type": "string", "minLength": 1, "maxLength": 256 } } },
|
|
162
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "key" }, "phase": { "enum": ["rotated", "policy_changed", "configuration_changed", "integrity_suite_transitioned"] }, "previousSigner": { "$ref": "#/$defs/signerRef" }, "nextSigner": { "$ref": "#/$defs/signerRef" }, "configurationDigest": { "$ref": "#/$defs/digest" } } },
|
|
163
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "ledger" }, "phase": { "enum": ["epoch_started", "epoch_transitioned", "checkpoint_created", "checkpoint_anchored", "checkpoint_anchor_failed", "evidence_disposed", "projection_reconciled"] }, "checkpointDigest": { "$ref": "#/$defs/digest" }, "previousEpochId": { "type": "string", "minLength": 1, "maxLength": 256 }, "previousTerminalCheckpointDigest": { "$ref": "#/$defs/digest" }, "successorEpochIds": { "type": "array", "maxItems": 256, "items": { "type": "string", "minLength": 1, "maxLength": 256 } }, "targetEvidenceRef": { "$ref": "#/$defs/evidenceRef" } } },
|
|
164
|
+
{ "type": "object", "additionalProperties": false, "required": ["family", "phase"], "properties": { "family": { "const": "administration" }, "phase": { "enum": ["source_high_water", "accessed", "exported", "legal_hold_applied", "retention_executed"] }, "purpose": { "type": "string", "minLength": 1, "maxLength": 256 }, "sourceSequence": { "$ref": "#/$defs/decimal" }, "selectionDigest": { "$ref": "#/$defs/digest" } } }
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/inclusion-proof/v1.0.0",
|
|
4
|
+
"title": "KYA-OS RFC 9162 Inclusion Proof v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["leafIndex", "treeSize", "auditPath"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"leafIndex": { "$ref": "#/$defs/decimal" },
|
|
10
|
+
"treeSize": { "$ref": "#/$defs/decimal" },
|
|
11
|
+
"auditPath": { "type": "array", "items": { "$ref": "#/$defs/digest" } }
|
|
12
|
+
},
|
|
13
|
+
"$defs": {
|
|
14
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
15
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/observation/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Independent Checkpoint Observation Receipt v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["core", "observationDigest", "jws"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"core": { "$ref": "#/$defs/core" },
|
|
10
|
+
"observationDigest": { "$ref": "#/$defs/digest" },
|
|
11
|
+
"jws": { "type": "string", "minLength": 1, "maxLength": 4096 }
|
|
12
|
+
},
|
|
13
|
+
"$defs": {
|
|
14
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
15
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
16
|
+
"signer": {
|
|
17
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
20
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
21
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"core": {
|
|
25
|
+
"type": "object", "additionalProperties": false,
|
|
26
|
+
"required": ["schema", "observerId", "observer", "ledgerId", "ledgerEpochId", "checkpointDigest", "treeSize", "observedAt", "previousObservationDigest"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/observation/v1.0.0" },
|
|
29
|
+
"observerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
30
|
+
"observer": { "$ref": "#/$defs/signer" },
|
|
31
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
32
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
33
|
+
"checkpointDigest": { "$ref": "#/$defs/digest" },
|
|
34
|
+
"treeSize": { "$ref": "#/$defs/decimal" },
|
|
35
|
+
"observedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
36
|
+
"previousObservationDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/receipt/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Recorder Receipt Core v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "ledgerId", "ledgerEpochId", "sequence", "eventId", "entryDigest", "previousEntryDigest", "recordedAt", "recorder", "integritySuite"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/receipt/v1.0.0" },
|
|
10
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
11
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
12
|
+
"sequence": { "$ref": "#/$defs/decimal" },
|
|
13
|
+
"eventId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
14
|
+
"entryDigest": { "$ref": "#/$defs/digest" },
|
|
15
|
+
"previousEntryDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
16
|
+
"recordedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
17
|
+
"recorder": { "$ref": "#/$defs/signerRef" },
|
|
18
|
+
"integritySuite": { "const": "KYA-AUDIT-JCS-SHA256-JWS-2026" }
|
|
19
|
+
},
|
|
20
|
+
"$defs": {
|
|
21
|
+
"decimal": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9][0-9]*)$" },
|
|
22
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
23
|
+
"signerRef": {
|
|
24
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
27
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
28
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/verification-policy/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Out-of-Band Audit Verification Policy v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["policyId", "trustedLedgerEpochs", "trustedObservers", "authorizedExporters", "acceptedIntegritySuites", "acceptedAlgorithms", "keyRevocationMode"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"policyId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
10
|
+
"trustedLedgerEpochs": { "type": "array", "items": { "$ref": "#/$defs/ledgerTrust" } },
|
|
11
|
+
"trustedObservers": { "type": "array", "items": { "$ref": "#/$defs/keyPolicy" } },
|
|
12
|
+
"trustedSupportingAnchors": { "type": "array", "items": { "$ref": "#/$defs/anchorTrust" } },
|
|
13
|
+
"authorizedExporters": { "type": "array", "items": { "$ref": "#/$defs/exporter" } },
|
|
14
|
+
"acceptedIntegritySuites": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "maxLength": 128 }, "uniqueItems": true },
|
|
15
|
+
"acceptedAlgorithms": { "type": "array", "minItems": 1, "items": { "enum": ["EdDSA", "ES256"] }, "uniqueItems": true },
|
|
16
|
+
"keyRevocationMode": { "enum": ["as_observed", "current", "both"] },
|
|
17
|
+
"requiredCheckpointFreshnessMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
18
|
+
"requiredAuditProfile": { "enum": ["AAP-0", "AAP-1", "AAP-2", "AAP-3", "AAP-4"] }
|
|
19
|
+
},
|
|
20
|
+
"$defs": {
|
|
21
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
22
|
+
"signer": {
|
|
23
|
+
"type": "object", "additionalProperties": false, "required": ["did", "kid", "alg"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"did": { "type": "string", "minLength": 5, "maxLength": 2048, "pattern": "^did:[^\\r\\n]+$" },
|
|
26
|
+
"kid": { "type": "string", "minLength": 1, "maxLength": 2304 },
|
|
27
|
+
"alg": { "enum": ["EdDSA", "ES256"] }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"keyPolicy": {
|
|
31
|
+
"type": "object", "additionalProperties": false, "required": ["signer"],
|
|
32
|
+
"kyaOrderedNumberRange": { "first": "validFrom", "last": "validUntil" },
|
|
33
|
+
"properties": {
|
|
34
|
+
"signer": { "$ref": "#/$defs/signer" },
|
|
35
|
+
"validFrom": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
36
|
+
"validUntil": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
37
|
+
"validFromCheckpoint": { "$ref": "#/$defs/digest" },
|
|
38
|
+
"validUntilCheckpoint": { "$ref": "#/$defs/digest" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"ledgerTrust": {
|
|
42
|
+
"type": "object", "additionalProperties": false,
|
|
43
|
+
"required": ["ledgerId", "ledgerEpochId", "recorderKeys"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"ledgerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
46
|
+
"ledgerEpochId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
47
|
+
"recorderKeys": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/keyPolicy" } },
|
|
48
|
+
"validFromCheckpoint": { "$ref": "#/$defs/digest" },
|
|
49
|
+
"validUntilCheckpoint": { "$ref": "#/$defs/digest" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"anchorTrust": {
|
|
53
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "providerId"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": { "enum": ["worm", "rfc3161", "scitt"] },
|
|
56
|
+
"providerId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
57
|
+
"validFrom": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
58
|
+
"validUntil": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"exporter": {
|
|
62
|
+
"type": "object", "additionalProperties": false,
|
|
63
|
+
"required": ["signerKeys", "allowedLedgerIds", "allowedPurposes"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"signerKeys": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/keyPolicy" } },
|
|
66
|
+
"allowedLedgerIds": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "maxLength": 256 }, "uniqueItems": true },
|
|
67
|
+
"allowedPurposes": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "maxLength": 256 }, "uniqueItems": true }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/audit/verification-report/v1.0.0",
|
|
4
|
+
"title": "KYA-OS Audit Verification Report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "policyId", "cryptographicIntegrity", "chainIntegrity", "checkpointIntegrity", "anchorIntegrity", "scopeEvidenceCompleteness", "authorizedAsObserved", "currentAuthorization"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "https://schema.kya-os.org/v1/protocol/audit/verification-report/v1.0.0" },
|
|
10
|
+
"policyId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"verifiedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
12
|
+
"cryptographicIntegrity": { "$ref": "#/$defs/dimension" },
|
|
13
|
+
"chainIntegrity": { "$ref": "#/$defs/dimension" },
|
|
14
|
+
"checkpointIntegrity": { "$ref": "#/$defs/dimension" },
|
|
15
|
+
"anchorIntegrity": { "$ref": "#/$defs/dimension" },
|
|
16
|
+
"scopeEvidenceCompleteness": { "$ref": "#/$defs/dimension" },
|
|
17
|
+
"authorizedAsObserved": { "$ref": "#/$defs/dimension" },
|
|
18
|
+
"currentAuthorization": { "$ref": "#/$defs/dimension" }
|
|
19
|
+
},
|
|
20
|
+
"$defs": {
|
|
21
|
+
"dimension": {
|
|
22
|
+
"type": "object", "additionalProperties": false, "required": ["verdict", "reasonCodes"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"verdict": { "enum": ["valid", "invalid", "indeterminate"] },
|
|
25
|
+
"reasonCodes": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -72,6 +72,23 @@
|
|
|
72
72
|
"crisp": {
|
|
73
73
|
"type": "boolean",
|
|
74
74
|
"description": "Server supports CRISP constraint evaluation."
|
|
75
|
+
},
|
|
76
|
+
"audit": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["profile", "recorderTopology", "delivery", "journalDurability", "atomicAppend", "sourceHighWater", "merkleCheckpoints", "independentObservation", "supportingAnchors", "evidenceRetention"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"profile": { "enum": ["AAP-0", "AAP-1", "AAP-2", "AAP-3", "AAP-4"] },
|
|
82
|
+
"recorderTopology": { "enum": ["none", "self-hosted", "managed", "verified-mirror"] },
|
|
83
|
+
"delivery": { "enum": ["best-effort", "buffered", "required"] },
|
|
84
|
+
"journalDurability": { "enum": ["none", "ephemeral", "durable"] },
|
|
85
|
+
"atomicAppend": { "type": "boolean" },
|
|
86
|
+
"sourceHighWater": { "type": "boolean" },
|
|
87
|
+
"merkleCheckpoints": { "type": "boolean" },
|
|
88
|
+
"independentObservation": { "type": "boolean" },
|
|
89
|
+
"supportingAnchors": { "type": "array", "items": { "enum": ["worm", "rfc3161", "scitt"] }, "uniqueItems": true },
|
|
90
|
+
"evidenceRetention": { "enum": ["none", "inline", "separate"] }
|
|
91
|
+
}
|
|
75
92
|
}
|
|
76
93
|
},
|
|
77
94
|
"additionalProperties": true
|