Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

Spolupráce v meshi se připouští po jednotlivých linkách, replikuje se jedním žurnálem a každý povrch ji promítá stejně

Spolupráce v meshi se připouští po jednotlivých linkách, replikuje se jedním žurnálem a každý povrch ji promítá stejně

majordomus://rule/project.mesh-cooperation-is-authenticated@2aktivní meshbezpečnostspoluprácedoktrína

Zdůvodnění

Objevování říká, že někde v síti existuje klíč; neumí říct, že klíč právě odpovídá, obsluhuje stejný repozitář, mluví kompatibilním protokolem nebo patří někomu, komu tento repozitář důvěřuje. Mesh, který bere slyšení jako příslušnost k nám, nechá kteréhokoli hosta na segmentu vkládat nároky a předávky; mesh, jehož transporty, povrchy a testy mají každý vlastní představu, kdo je propojen, skončí tak, že Cockpit ukazuje zelenou tečku u runtime, o kterém CLI ví, že zmizel. ADR 0067 uzavírá obojí: přijetí je jeden handshake s typovanými odmítnutími, replikace je jeden podepsaný žurnál skládaný jednou čistou funkcí a každý povrch je jejich projekcí.

Pravidlo exkluzivity je slib produktu lidem, kteří provozují několik relací a několik strojů na jednom repozitáři: exkluzivní nárok vylučuje všude, nebo nikde. Dvě implementace — jedna pro lokální nástěnku, jedna pro vzdálené peery — by činily tento slib závislým na tom, kde zrovna běží druhý worker.

Požadované chování

  1. A link is established only by Cooperation::dial and Cooperation::accept_hello. The hello checks, in the order accept_hello runs them — the first that fails decides the refusal, whatever else is wrong with the hello:

    1. cooperation is running (not_active);
    2. the message is within the link message bound (oversized);
    3. it has the shape of a hello and a well-formed card (malformed);
    4. the Ed25519 signature verifies under the hello domain (signature);
    5. the timestamp is within the skew window (stale);
    6. the nonce is 32 hex characters (malformed);
    7. the protocol ranges meet (protocol_unsupported);
    8. the peer is not this runtime (self_link);
    9. a hello that names its recipient names this runtime (misaddressed);
    10. the peer's mesh repository id equals this runtime's (repository_mismatch);
    11. the peer's key is trusted by the declared policy (untrusted);
    12. the hello is no older than the one that made the peer's live link (replay);
    13. its nonce has not been answered before (replay);
    14. a new peer fits the peer table (capacity).

    Nothing a stranger says is believed before its signature, and the cheap checks run before the expensive ones. The recipient check precedes the replay checks so that a copy captured on its way to another runtime is refused without spending a nonce. The nonce cache is last of the checks a hello can fail on its own, because it holds only nonces of trusted keys of this repository: a stranger's hellos can neither fill it nor evict a real peer's nonce. The age check stands before it because a restart empties the cache, and a hello captured before the restart must not displace a link made since. The welcome a dialer receives is checked for its shape, its signature, the echoed nonce, its timestamp, the protocol, self, the repository and trust. Each failure is a RefusalCode, counted and listed with its detail.

  2. Id repozitáře v mesh se odvozuje z kořenových commitů repozitáře nebo se deklaruje jako cooperation.repository; nikdy se neodvozuje z cesty v souborovém systému, adresy ani názvu hostitele. Runtimy s různými id repozitáře se nikdy nepropojí.

  3. Relace, tvrzení, předávky a review překračují runtimy jen jako MeshEvent, podepsané klíčem uzlu svého původu. Relay ukládá a přeposílá bajty; událost, jejíž podpis, vazba klíče na stream, repozitář nebo meze neplatí, je odmítnuta u každého konzumenta. Události se identifikují pomocí (stream, seq), aplikují se v pořadí sekvence na stream a duplikát nezmění nic.

  4. Tvrzení rozhodují mesh::state::fold a admission_conflicts nad cestami, které se setkávají v peers::claims_meet. Tvrzení žije, dokud není uvolněno, jeho relace je otevřená a tep jeho proudu stoupl v rámci vypršení; souběžná výhradní tvrzení se všude rozhodnou pro nejnižší (lamport, stream, seq) a ostatní jsou pojmenované konflikty.

  5. CLI, HTTP, OpenAPI, MCP i Cockpit čtou a zapisují kooperaci jen přes schopnosti capability::builtin::mesh. Žádný povrch nedrží vlastní seznam peerů, stav spojení, nárok ani verdikt o životnosti; Cockpit vykresluje mesh.peers, mesh.state a mesh.cooperation.

  6. Nic, co propojený peer pošle, nic nespouští: žurnál nese metadata o práci; jediný soubor, jehož zapsání může vzdálená událost způsobit, je spotřebovaná předávka do adresáře předávek tohoto checkoutu, výslovným lokálním příkazem.

Chování při selhání

scripts/ci/mesh-check exits 10 naming a TCP link client or a link handler outside src/mesh/ and the mesh capability module, a Journal constructed outside src/mesh/, or a Cockpit page that renders mesh state without asking a mesh capability. What a static check cannot see is held by apps/majordomus-cli/tests/mesh_cooperation.rs (separate processes over TCP: links, isolation, trust refusal, crash expiry and restart, three-node convergence, hostile messages, two worktrees) and test/mesh-lab/run (separate Linux nodes on a real bridge: multicast discovery, partition and crash recovery), both run in CI. The order of the hello checks is held by the unit test mesh::cooperation::tests::the_hello_checks_run_in_the_order_the_rule_lists, which sends hellos failing each check and each adjacent pair of checks, asserts the refusal of the earlier one, and reads this rule and docs/MESH.md to assert that both list the checks in that order.

Ověření

cargo test --manifest-path apps/majordomus-cli/Cargo.toml --lib mesh (deduplikace a řazení žurnálu, konvergence a exkluzivita foldu jako vlastnosti, odmítnutí handshaku, relay tří runtime, usmíření po rozdělení sítě přes in-process transport), cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test mesh_cooperation a test/mesh-lab/run.

Odkud to pochází

kanonický soubor
.ai/repo/rules/project/mesh-cooperation-is-authenticated.v2.md
identity
project.mesh-cooperation-is-authenticated@2
dostupné také jako
Zdroj MCP majordomus://rule/project.mesh-cooperation-is-authenticated@2 · majordomus entity show rule/project-mesh-cooperation-is-authenticated-2 · GET /api/v1/entity?uri=majordomus://rule/project.mesh-cooperation-is-authenticated@2
v Cockpitu
/cockpit/objects/rule/project-mesh-cooperation-is-authenticated-2

Tato stránka je generována z výše uvedeného souboru pomocí scripts/generate-site-data; úprava stránky nic nemění, úprava souboru změní všechna rozhraní. Výše uvedené vztahy jsou hrany docs/generated/graph.json, které spustitelný program zapisuje ze stejného indexu.

Prohledává názvy a popisy všech stránek, které tento web publikuje.