control-plane: the judgement of an organization (one evidence pack, 25 kinds in eight domains, each judged again by its published verifier with the relying party's own trust, revocations and clock; 74/74, 75/75 with --online on testnet 28001, view 48/48; negative controls 45/45 and 20/20); the compliance report is made again from its own findings

This commit is contained in:
Aere Network committed 2026-10-21 01:12:43 +03:00
1 parent 6ba33c477f
commit 82c5b261ac
10 files changed
+1902 -17

No files matched your search

+90 -1
View File
@@ -100,6 +100,89 @@ envelope recomputed, the plan folded in, and the execution chain checked again.
itself (`chainOk: true` over a modified log is reported as a suspect self-report). `consola-web/index.html` renders that output; it
computes nothing in the browser, and a bundle pasted there directly is shown as `UNCHECKED`.
## 6. Organization judgement: `organizatie.mjs`
node organizatie.mjs --pack pack.json [--context context.json] [--require shield,identity,...] [--at <RFC 3339>] [--online] [--json]
Exit code 0 = VALID, 1 = INVALID, 2 = NOT_MEASURED (or the command could not run), 3 = PARTIAL.
An organization brings an **evidence pack**; every artifact in it is judged again by the published verifier of its kind, and the
result is one verdict per domain and a summary that is never stronger than the weakest domain that was asked for. Nothing the pack
says about itself is believed.
**The pack** (`aere-organization-evidence-pack`):
{ "kind": "aere-organization-evidence-pack", "organization": "...", "createdAt": "...",
"artifacts": [ { "id": "...", "artifact": "<kind>", "input": { ... } }, ... ] }
`id` is letters, digits and `. _ : / -`, at most 128 characters, unique in the pack (a repeated id is judged once, its copies are
`NOT_MEASURED`). `artifact` is one of 25 kinds in eight domains:
| domain | kinds |
|---|---|
| `shield` | `shield-console` (a sidecar bundle, the plan and the execution chain, judged by `consola.mjs`; an execution given with a plan must be the executor's run of that plan) |
| `identity` | `identity-presentation`, `sdjwt-presentation`, `sdjwt-vc-presentation` |
| `compliance` | `compliance-presentation`, `travel-rule-binding`, `travel-rule-message`, `travel-rule-receipt`, `pq-compliance-report` (a report of section 4 and its envelope) |
| `ai` | `ai-trust-bundle`, `agent-ledger` |
| `payments` | `payment-risk`, `payment-receipt`, `market-timeline` |
| `devices` | `device-bundle`, `device-operation-log`, `device-reputation` |
| `audit` | `audit-log`, `audit-inclusion`, `audit-consistency` |
| `proofs` | `envelope` (AIP-23), `dataset-record`, `dataset-answer`, `dataset-consistency`, `dataset-sample` |
Cloud is not a domain of its own: what a Cloud product returns is judged in the domain of the artifact. The 23 kinds of the
conformance suite are judged through the suite's adapter (`../conformance/implementare-aere.mjs` beside a public copy of the control
plane), called as a program, so a verifier that does not start is seen as such; the two kinds of the control plane itself are judged
here (`shield-console` by the console's own evaluation, plus the binding of the execution to the plan given with it;
`pq-compliance-report` by `verifyReport`, by making the report again from its own findings with the same generator, which must give
exactly the report and the envelope's statement, and by the AIP-23 verifier for its envelope). The compliance envelope is not
signed, so a report bound to it shows only that the report is self-consistent; whether its findings are the real plan's is not
judged. A kind no verifier here judges is listed as unjudged.
**The context** (`aere-organization-context`) belongs to the party that relies on the pack, not to the organization:
{ "kind": "aere-organization-context", "now": "<RFC 3339>", "require": ["identity", ...],
"byKind": { "<kind>": { ... } }, "byArtifact": { "<id>": { ... } } }
Every input of every verifier is classified (the test derives the keys from the adapter's source, from the source of the module the
adapter hands a whole input to, and from the 791 vectors of the suite, and fails on a key without a class): the **artifact** comes
only from the pack; a **stapled** input (a status list, a revocation, a firmware policy, signed by a third party) is taken from the
context and from the pack, joined, the context's lists first (a verifier reads only the first entries of a long list, so lists brought
by the pack cannot push the relying party's own revocation out of what is read); a **verifier** input (the trusted issuers or
manufacturers, the audience, the nonce, the expected values, the relying party's own readings: a market's arbiter and arbitration
timeout, the facts a reputation is computed from) comes from the context, and if only the pack brings it, it is used but the artifact
cannot be VALID (`PARTIAL`, because the organization chose its own trust); a **verifier-only** input (the chain to read, a
beneficiary's private KEM keys, the time limit) is never taken from the pack; the **clock** comes from the context for that artifact
or kind, then `--at`, then the context's global `now`, then this machine, never from the pack. For a market timeline and a reputation,
whose module reads the whole input, a key the module does not read by name stays with the artifact (so a member too many is still
refused).
**The verdicts.** Each artifact gets the verifier's verdict (`VALID`, `INVALID`, `PARTIAL`), or `NOT_MEASURED` when the verifier
did not run or gave no verdict of the suite's form: a verdict whose own levels do not give it (by the suite's rule in `verdict.mjs`),
or a verdict for another kind than the one asked in its place (the order of the adapter's answers cannot then be trusted, so none of
them is). When a batch does not complete (too few answers, or the time limit), each artifact is judged alone, so one artifact cannot
take the verdicts of the others with it. A domain is as weak as its weakest artifact; a domain with no artifact is
`NOT_PRESENTED`, and a required domain that is not presented makes the summary `NOT_MEASURED`, never `VALID`. The required domains
are `--require`, then `context.require`, then all eight. Unjudged artifacts cap a `VALID` summary at `PARTIAL` (the pack claims more
than was measured). A verdict written in the pack (`verdict`, `summary.verdict`, an artifact's `verdict` or `expected.verdict`) is
ignored, and named as suspect when it differs from the measurement.
**The network.** Anchoring and finality on a chain are read only with `--online`, and only for the kinds whose verifier reads the
chain (an AIP-23 envelope, a payment receipt, a market timeline, an AI trust bundle, the report's envelope). Without it, each of those
that claims a notarization is listed in `network.needed` and its levels say `NOT_MEASURED`. A device bundle or an operation log
judges its notarization on the relying party's own readings (`anchors`, `readings` in the context), never on the chain read here,
with `--online` or not: when they are missing it is listed in `network.readings`. `network.unmeasured` lists what `--online` could
not read, and `network.finality` names the chain each finality was read on, a testnet said as such (the summary says it too). The
console's Shield evaluation does not read a chain even with `--online`: a notarization claimed inside a sidecar bundle has to be
presented as its own `envelope` artifact.
**What it does not judge.** The truth of what an artifact asserts beyond what its verifier checks (a market timeline, a payment
receipt without the relying party's transaction readings, the findings of a compliance report), the honesty of the host that produced
a sidecar bundle (section 5), and any kind outside the table. `consola-web/index.html` shows the output (`--json`) domain by domain,
each artifact with its verifier and the evidence it rests on; a pack pasted there directly is shown as `UNCHECKED`. The view judges
nothing, but it never shows a verdict stronger than the output's own rows give (a domain no stronger than its weakest artifact, the
summary no stronger than its weakest required domain): an edited output that contradicts itself is shown at the weaker reading and
named. Everything that comes from the pack is shown as text.
## Tests
bash probele-b1.sh # all seven below, each VERDE / ROSU / STRICAT (in the development repository only)
@@ -108,11 +191,17 @@ computes nothing in the browser, and a bundle pasted there directly is shown as
node proba-executa-migrare.mjs # 30: on real products started locally (KMS, PQ CA, gateway), with the attacks of the review
node proba-remediere.mjs # 33: real TLS servers on 127.0.0.1 scanned by the readiness scanner, before and after the recipe
node control-negativ-remediere.mjs # 7 of 7 guards broken in a copy, each turns the test red
node proba-raport-conformitate.mjs # 27: on the real outputs of the inventory and the scanner; the envelope through the AIP-23 verifier
node proba-raport-conformitate.mjs # 30: on the real outputs of the inventory and the scanner; the envelope through the AIP-23 verifier
node control-negativ-raport-conformitate.mjs # 3 plantings, each turns the named check red
node proba-consola.mjs # 8: a good bundle and four negative controls
node proba-consola-web.mjs # 26: the viewer in a real Chromium, phone (390 px) and desktop (1440 px); needs playwright-core and a Chromium
node control-negativ-consola-web.mjs # 8 defects planted in a copy of the page, each turns its named check red
node proba-organizatie.mjs # 74 (75 with --online): artifacts made by the real producers (the suite's vectors, checked against INDEX.json; a Shield state,
# a plan and a report made now), a good pack and one broken artifact per kind, and the attacks of the
# adversarial review of 2026-10-21; --online adds a row on testnet 28001
node control-negativ-organizatie.mjs # 45 of 45 guards removed in a copy, each turns its named row red
node proba-organizatie-web.mjs # 48: the organization view in a real Chromium, 390 px and 1440 px, edited outputs and text from the pack included
node control-negativ-organizatie-web.mjs # 20 defects planted in a copy of the page, each turns its named check red
The report test runs the envelope through the AIP-23 reference verifier (`AERE_VERIFY_PROOF=<verify-proof.mjs from aere.network/tools>`).
No third party has reviewed any of this.