From f53386c4cc1dc18b5359142ca3d1cc9efd147ac0 Mon Sep 17 00:00:00 2001 From: George Lambert Date: Tue, 15 Sep 2026 23:10:17 -0400 Subject: [PATCH] S19: catalog all 44 subjects.json rows with timeout and filter pfc-derived regenerated; schema timeout_sec + filter; endpoints RST. --- MODULE.md | 40 ++ catalog/endpoints.json | 159 ++++-- catalog/pfc-derived.json | 925 +++++++++++++++++++++++++-------- catalog/schema.json | 4 +- scripts/import_pfc_subjects.py | 66 ++- source/endpoints.rst | 8 + 6 files changed, 931 insertions(+), 271 deletions(-) create mode 100644 MODULE.md mode change 100644 => 100755 scripts/import_pfc_subjects.py diff --git a/MODULE.md b/MODULE.md new file mode 100644 index 0000000..22240a4 --- /dev/null +++ b/MODULE.md @@ -0,0 +1,40 @@ +# MODULE — nats-service-endpoints + +Git: https://git.georgelambert.org/marchon/nats-service-endpoints + + +This is **not** a HIPAA/SOC 2/ISO certificate. +Vocabulary: see `https://git.georgelambert.org/marchon/system-git-sync` `docs/thesaurus.md`. +Catalog: `https://git.georgelambert.org/marchon/nats-service-endpoints`. + + +## What this module is + +Runtime or documentation unit in the Peergos-for-compliance / secure-messaging +set. See this repo `README.md` for the short intro. + +## Who calls this module and why + +Every service that publishes `verae.*`. + +**Callers:** secure-messaging, pfc-py-admin, pfc-repl, pfc-ipfs, sm-leaf. + +## Messages — from / to + +- **From:** `catalog/endpoints.json` (SM core) + `catalog/pfc-derived.json` (all subjects.json names). +- **To:** Sphinx HTML/PDF on docs.pfc `/nats-service-endpoints/`. + +## Filters / security + +`reject[]` + `filter` + `timeout_sec`. Forbidden `verae.llm.turn.>`. + +## Errors and timeouts + +- **Errors:** Unknown subject / missing fields → dead letter for SM; others `dead=none`. +- **Timeouts:** See each row `timeout_sec` (5s request-reply, 4s queue, 30s pin). + +## Where data is stored and how others use it + +JSON catalog in git. + +Walkthroughs and screenshots: `https://git.georgelambert.org/marchon/peergos-compliance-docs` (`source/walkthrough.rst`). diff --git a/catalog/endpoints.json b/catalog/endpoints.json index 35eee72..67f7aa3 100644 --- a/catalog/endpoints.json +++ b/catalog/endpoints.json @@ -18,76 +18,171 @@ "name": "verae.sm.send", "pattern": "core", "for": "Deliver a passthrough secure message to a mailbox identity", - "from": ["console", "go-leaf", "access-api"], - "to": ["sm-leaf", "npe sidecar"], + "from": [ + "console", + "go-leaf", + "access-api" + ], + "to": [ + "sm-leaf", + "npe sidecar" + ], "in": { - "header": ["to", "from_lookup_id", "alg", "error_token"], + "header": [ + "to", + "from_lookup_id", + "alg", + "error_token" + ], "body": "ciphertext (not readable by broker or sender after send)" }, - "out": {"ack": {"lookup_id": "string", "accepted": true}}, + "out": { + "ack": { + "lookup_id": "string", + "accepted": true + } + }, "encryption": "passthrough-full-body", - "reject": ["missing to", "unsigned config", "alg not in signed config", "empty ciphertext when mode!=plain-lab"], - "dead": "verae.sm.dead" + "reject": [ + "missing to", + "unsigned config", + "alg not in signed config", + "empty ciphertext when mode!=plain-lab" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" }, { "name": "verae.sm.dead", "pattern": "core", "for": "Dead-letter failed service requests", - "from": ["sm-leaf"], - "to": ["error-handler"], - "in": {"header": ["error_code", "lookup_id", "to"], "body": "Network Error Bundle"}, + "from": [ + "sm-leaf" + ], + "to": [ + "error-handler" + ], + "in": { + "header": [ + "error_code", + "lookup_id", + "to" + ], + "body": "Network Error Bundle" + }, "out": "none", "encryption": "system-key bundle plus sender-only status", - "reject": ["bundle missing ct_system"], - "dead": "none" + "reject": [ + "bundle missing ct_system" + ], + "dead": "none", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" }, { "name": "verae.sm.error", "pattern": "core", "for": "Build and emit a Network Error Bundle", - "from": ["sm-leaf", "pfc-admin"], - "to": ["sender (ct_sender)", "system logger (ct_system)"], - "in": {"error_code": "string", "lookup_id": "string", "dest_class": "mailbox|service"}, - "out": {"ct_sender": "box to sender", "ct_system": "box to system public key"}, + "from": [ + "sm-leaf", + "pfc-admin" + ], + "to": [ + "sender (ct_sender)", + "system logger (ct_system)" + ], + "in": { + "error_code": "string", + "lookup_id": "string", + "dest_class": "mailbox|service" + }, + "out": { + "ct_sender": "box to sender", + "ct_system": "box to system public key" + }, "encryption": "no recipient payload; bounce metadata only", - "reject": ["unknown error_code"], - "dead": "verae.sm.log.summary" + "reject": [ + "unknown error_code" + ], + "dead": "verae.sm.log.summary", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" }, { "name": "verae.sm.log.summary", "pattern": "core", "for": "Central log summaries of system failures (no message bodies)", - "from": ["sm-leaf", "pfc-admin"], - "to": ["central-log"], - "in": {"code": "string", "lookup_id": "string", "dest_class": "string"}, + "from": [ + "sm-leaf", + "pfc-admin" + ], + "to": [ + "central-log" + ], + "in": { + "code": "string", + "lookup_id": "string", + "dest_class": "string" + }, "out": "ack", "encryption": "summary plaintext allowed; never ciphertext of mail", - "reject": ["body-like fields present"], - "dead": "none" + "reject": [ + "body-like fields present" + ], + "dead": "none", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" }, { "name": "verae.admin.config.sign", "pattern": "core", "for": "Sign a new configuration payload; reject unsigned files at load", - "from": ["pfc-console", "pfc-config TUI"], - "to": ["admin-history cube"], - "in": {"payload": "object", "prev_signed": "object|null"}, + "from": [ + "pfc-console", + "pfc-config TUI" + ], + "to": [ + "admin-history cube" + ], + "in": { + "payload": "object", + "prev_signed": "object|null" + }, "out": "signed wrapper", "encryption": "Ed25519 signature; payload may be lab-clear", - "reject": ["bad key_id", "canonical JSON mismatch"], - "dead": "verae.sm.dead" + "reject": [ + "bad key_id", + "canonical JSON mismatch" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" }, { "name": "verae.admin.history.append", "pattern": "core", "for": "Append prev file, new file, and unified diff to DataCube admin-history", - "from": ["verae.admin.config.sign"], - "to": ["pfc CubeStore kind=admin-history"], - "in": {"prev": "string", "new": "string", "diff": "string", "actor": "string"}, + "from": [ + "verae.admin.config.sign" + ], + "to": [ + "pfc CubeStore kind=admin-history" + ], + "in": { + "prev": "string", + "new": "string", + "diff": "string", + "actor": "string" + }, "out": "chain row", "encryption": "chain hashes; not NPE (admin audit)", - "reject": ["empty actor"], - "dead": "none" + "reject": [ + "empty actor" + ], + "dead": "none", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body" } ] } diff --git a/catalog/pfc-derived.json b/catalog/pfc-derived.json index bbc3234..a051709 100644 --- a/catalog/pfc-derived.json +++ b/catalog/pfc-derived.json @@ -4,10 +4,13 @@ { "name": "verae.ts.request", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "verae-timestamp" @@ -19,22 +22,29 @@ "scope" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.ts.receipt", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "verae-timestamp" @@ -45,22 +55,29 @@ "merkle" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.ts.verify", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "verae-timestamp" @@ -70,22 +87,29 @@ "receipt_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.ts.held.query", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "verae-timestamp" @@ -95,22 +119,29 @@ "org_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.ts.batch", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "verae-timestamp" @@ -120,22 +151,29 @@ "items" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.hash.report", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "hashlog" @@ -145,22 +183,29 @@ "hash" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.storage.pin", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "Pin object bytes via IPFS pin API / Kubo localhost", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-ipfs" @@ -174,22 +219,29 @@ "bytes_hex" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 30.0, + "filter": "Kubo localhost only; no WAN 5001; hash must match bytes", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.storage.hydrate", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-ipfs" @@ -200,22 +252,29 @@ "sha256" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "Kubo localhost only; no WAN 5001; hash must match bytes", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.storage.replicate", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "Replicate bytes to min_ok replica ingest subjects", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-repl" @@ -227,22 +286,29 @@ "cube_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 4.0, + "filter": "Kubo localhost only; no WAN 5001; hash must match bytes", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.replica.a.ingest", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-replica-a" @@ -253,22 +319,29 @@ "bytes_hex" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.replica.b.ingest", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-replica-b" @@ -279,22 +352,29 @@ "bytes_hex" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.cube.append", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -305,22 +385,29 @@ "cube_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 4.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.cube.export", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "connector" @@ -332,22 +419,29 @@ "share_mode" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 4.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.sig.verify", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "signatures" @@ -358,22 +452,29 @@ "signature_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.host.apps.start", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "supervisor" @@ -383,22 +484,29 @@ "app_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.host.apps.stop", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "supervisor" @@ -408,22 +516,29 @@ "app_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.host.apps.status", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "supervisor" @@ -433,22 +548,29 @@ "app_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.sample.job", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "desktop-host" @@ -458,22 +580,29 @@ "kind" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.app.manage", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "desktop-host" @@ -483,22 +612,29 @@ "op" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.compliance.session", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -512,22 +648,29 @@ "sha256" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.inspect.open", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "Start k-of-n inspect; log-before-reveal", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -541,22 +684,29 @@ "max_hours" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "k-of-n officers; author cannot be officer; TOTP session; log-before-reveal", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.inspect.access", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -569,22 +719,29 @@ "action" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 4.0, + "filter": "k-of-n officers; author cannot be officer; TOTP session; log-before-reveal", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.inspect.close", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -595,22 +752,29 @@ "session_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "k-of-n officers; author cannot be officer; TOTP session; log-before-reveal", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.inspect.revoke", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -621,22 +785,29 @@ "session_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "k-of-n officers; author cannot be officer; TOTP session; log-before-reveal", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.policy.attest", "pattern": "queue", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -647,22 +818,29 @@ "org_pack" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 4.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.health", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "Loopback health for PFC services", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "all-pfc" @@ -672,22 +850,29 @@ "service" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.cube.create", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -698,22 +883,29 @@ "profile" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.object.put", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -725,22 +917,29 @@ "hex" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.workspace.ensure", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -750,22 +949,29 @@ "username" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.catalog.search", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -776,22 +982,29 @@ "workspace_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.cube.copy", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -805,22 +1018,29 @@ "include_files" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.pfc.stamp.request", "pattern": "request-reply", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "pfc-admin" @@ -833,22 +1053,232 @@ "stamp_scope" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 5.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.sm.send", + "pattern": "core", + "for": "Deliver a passthrough secure message (dest in the clear, body ciphertext)", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "sm-leaf" + ], + "in": { + "fields": [ + "to", + "from_lookup_id", + "alg", + "ct" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body, body-like log fields", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.sm.dead", + "pattern": "core", + "for": "Dead-letter failed service requests", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "sm-leaf" + ], + "in": { + "fields": [ + "error_code", + "lookup_id" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body, body-like log fields", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.sm.error", + "pattern": "core", + "for": "Emit a Network Error Bundle (ct_sender + ct_system)", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "sm-leaf" + ], + "in": { + "fields": [ + "ct_sender", + "ct_system" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body, body-like log fields", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.sm.log.summary", + "pattern": "core", + "for": "Central log summaries (codes only, never ciphertext)", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "central-log" + ], + "in": { + "fields": [ + "code", + "lookup_id", + "dest_class" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "verae.sm.dead", + "timeout_sec": 5.0, + "filter": "passthrough dest/subject clear; reject missing to, empty ct, plaintext body, body-like log fields", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.admin.config.sign", + "pattern": "core", + "for": "Sign a configuration payload (Ed25519 wrapper)", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "pfc-admin" + ], + "in": { + "fields": [ + "payload", + "prev_signed" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "none", + "timeout_sec": 5.0, + "filter": "unsigned wrappers rejected; empty actor rejected", + "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" + }, + { + "name": "verae.admin.history.append", + "pattern": "core", + "for": "Append prev + new + unified diff to admin-history cube", + "from": [ + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" + ], + "to": [ + "pfc-admin" + ], + "in": { + "fields": [ + "prev", + "new", + "diff", + "actor" + ] + }, + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": [ + "unknown subject", + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" + ], + "dead": "none", + "timeout_sec": 5.0, + "filter": "unsigned wrappers rejected; empty actor rejected", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.handshake", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -859,22 +1289,29 @@ "to" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.envelope", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -884,22 +1321,29 @@ "from" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.heartbeat", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -910,22 +1354,29 @@ "ts_ms" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.receipt", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -937,22 +1388,29 @@ "ok" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.peer.join", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -963,22 +1421,29 @@ "node_id" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" }, { "name": "verae.gossip.peer.leave", "pattern": "pub", - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", + "for": "PFC/Verae subject \u2014 see peergos-for-compliance/docs/nats-addresses.md", "from": [ - "pfc services", - "connectors" + "pfc-py-admin", + "sm-leaf", + "connectors", + "pfc-repl", + "pfc-ipfs" ], "to": [ "gossip" @@ -988,13 +1453,17 @@ "addr" ] }, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", "reject": [ "unknown subject", - "missing required fields" + "missing required fields", + "plaintext PHI", + "verae.llm.turn.>" ], "dead": "none", + "timeout_sec": 0.0, + "filter": "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI", "git": "https://git.georgelambert.org/marchon/peergos-for-compliance" } ] diff --git a/catalog/schema.json b/catalog/schema.json index ebce849..6f47910 100644 --- a/catalog/schema.json +++ b/catalog/schema.json @@ -20,7 +20,9 @@ "out": {}, "encryption": {"type": "string"}, "reject": {"type": "array", "items": {"type": "string"}}, - "dead": {"type": "string"} + "dead": {"type": "string"}, + "timeout_sec": {"type": "number"}, + "filter": {"type": "string"} } } } diff --git a/scripts/import_pfc_subjects.py b/scripts/import_pfc_subjects.py old mode 100644 new mode 100755 index d59b6b3..de867b1 --- a/scripts/import_pfc_subjects.py +++ b/scripts/import_pfc_subjects.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 -"""Merge peergos-for-compliance subjects.json into catalog/pfc-derived.json.""" +"""Merge peergos-for-compliance subjects.json into catalog/pfc-derived.json. + +Each row has from/to/in/out/encryption/reject/dead/timeout/filter. +""" from __future__ import annotations @@ -10,23 +13,66 @@ ROOT = Path(__file__).resolve().parents[1] PFC = Path("/Users/marchon/research/peergos-for-compliance/schemas/subjects.json") OUT = ROOT / "catalog" / "pfc-derived.json" +TIMEOUT = { + "request-reply": 5.0, + "queue": 4.0, + "pub": 0.0, + "core": 5.0, +} + +FOR = { + "verae.sm.send": "Deliver a passthrough secure message (dest in the clear, body ciphertext)", + "verae.sm.dead": "Dead-letter failed service requests", + "verae.sm.error": "Emit a Network Error Bundle (ct_sender + ct_system)", + "verae.sm.log.summary": "Central log summaries (codes only, never ciphertext)", + "verae.admin.config.sign": "Sign a configuration payload (Ed25519 wrapper)", + "verae.admin.history.append": "Append prev + new + unified diff to admin-history cube", + "verae.storage.pin": "Pin object bytes via IPFS pin API / Kubo localhost", + "verae.storage.replicate": "Replicate bytes to min_ok replica ingest subjects", + "verae.pfc.health": "Loopback health for PFC services", + "verae.inspect.open": "Start k-of-n inspect; log-before-reveal", +} + + +def timeout_for(pattern: str, name: str) -> float: + if name.startswith("verae.storage.pin"): + return 30.0 + return TIMEOUT.get(pattern or "request-reply", 5.0) + + +def filter_for(name: str) -> str: + if name.startswith("verae.sm."): + return "passthrough dest/subject clear; reject missing to, empty ct, plaintext body, body-like log fields" + if name.startswith("verae.inspect."): + return "k-of-n officers; author cannot be officer; TOTP session; log-before-reveal" + if name.startswith("verae.admin."): + return "unsigned wrappers rejected; empty actor rejected" + if name.startswith("verae.storage."): + return "Kubo localhost only; no WAN 5001; hash must match bytes" + return "unknown subject rejected; required payload fields; no verae.llm.turn.>; no plaintext PHI" + def main() -> None: src = json.loads(PFC.read_text()) rows = [] for s in src.get("subjects") or []: + name = s["name"] + pattern = s.get("pattern") or "request-reply" + owner = s.get("owner") or "unknown" rows.append( { - "name": s["name"], - "pattern": s.get("pattern"), - "for": "PFC/Verae subject (see peergos-for-compliance/docs/nats-addresses.md)", - "from": ["pfc services", "connectors"], - "to": [s.get("owner") or "unknown"], + "name": name, + "pattern": pattern, + "for": FOR.get(name, "PFC/Verae subject — see peergos-for-compliance/docs/nats-addresses.md"), + "from": ["pfc-py-admin", "sm-leaf", "connectors", "pfc-repl", "pfc-ipfs"], + "to": [owner], "in": {"fields": s.get("payload") or []}, - "out": "service-specific", - "encryption": "NATS envelope pfc-lab-xor or NPE sidecar; Pattern A apps never publish", - "reject": ["unknown subject", "missing required fields"], - "dead": "none", + "out": "ack or service JSON (never recipient mail plaintext on error subjects)", + "encryption": "passthrough dest-in-clear; body pfc-lab-xor or NPE; Pattern A apps never publish", + "reject": ["unknown subject", "missing required fields", "plaintext PHI", "verae.llm.turn.>"], + "dead": "verae.sm.dead" if name.startswith("verae.sm.") else "none", + "timeout_sec": timeout_for(pattern, name), + "filter": filter_for(name), "git": "https://git.georgelambert.org/marchon/peergos-for-compliance", } ) diff --git a/source/endpoints.rst b/source/endpoints.rst index b0488bb..0362b75 100644 --- a/source/endpoints.rst +++ b/source/endpoints.rst @@ -15,3 +15,11 @@ Secure-messaging subjects * ``verae.sm.log.summary`` -- central summaries (codes, lookup_id, dest_class). * ``verae.admin.config.sign`` -- Ed25519 wrap; unsigned files rejected. * ``verae.admin.history.append`` -- prev, new, unified diff on DataCube chain. + +Timeouts and filters +-------------------- + +Each derived row in ``catalog/pfc-derived.json`` has ``timeout_sec`` and +``filter``. Request-reply defaults to 5s, replica ingest 4s, pin 30s. +SM send rejects missing ``to``, empty ciphertext (unless ``plain-lab``), +plaintext ``body``, and summary records that contain ``ct``.