IF Commons GitHub

Signing in the exchange and the merge

0009Active

0009-bridge-merge-signing · owner if · domain commons

Requirements

FR-001checkpassing

A replica given a signer MUST publish delta files that carry its signature (the identity of a file is made without it), and a replica under signed trust MUST take them and hold the same rows.

Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/signing.test.ts

Proved by: anyfs-bridge/suite/signing.test.ts

Tests: passed: suite/signing.test.ts a replica with a signer publishes files that carry its signature, and a replica under sign

FR-002checkpassing

An unsigned file, a file signed by a key that is not the origin's and a file whose rows were changed after it was signed MUST be refused with the kind each has and put aside for good (unsigned, bad-signature, as forged is); a file that is refused for the replica's own reasons MUST not be taken.

Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/signing.test.ts

Proved by: anyfs-bridge/suite/signing.test.ts

Tests: passed: suite/signing.test.ts an unsigned file, a file signed by a key of another replica and a file changed after it wa

FR-003checkpassing

A file whose key the trust does not know (unknown-key) MUST be refused but not put aside for good, so that it is taken when the roster is later given the key.

Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/signing.test.ts

Proved by: anyfs-bridge/suite/signing.test.ts

Tests: passed: suite/signing.test.ts a key that is not yet on the roster makes a file wait as refused (the roster may come), no

FR-004checkpassing

The exchange MUST judge each file by a trust of its own (trust) before the replica is asked, and the merge of two stores MUST sign each delta with the signer of its origin (a delta of an origin with no signer is unsigned) and judge what each side takes by the trust given for that side; a store that takes only signed deltas MUST refuse the unsigned delta of the other and the two MUST then not report the same rows.

Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/signing.test.ts

Proved by: anyfs-bridge/suite/signing.test.ts

Tests: passed: suite/signing.test.ts the trust of the exchange refuses what the replica itself would have taken, and a merge si

Acceptance scenarios

  1. Given a medium holding an unsigned file and a replica under signed trust, When it synchronises, Then the file is put aside as unsigned and nothing is taken, per FR-002.

Out of scope

  • Where the keys come from, which is for the program that uses the exchange.

Edge cases

  • A signer for one replica only: the deltas of the others go out unsigned, per FR-004.

Assumptions

  • A signer is a replica with a key; a trust is the one of the governance of AnyFS.

Open questions

  • None.

Key entities

  • Signer and Trust - as in AnyFS, handed to the exchange and to the merge.

Success criteria

SC-001success criterion

Two replicas that do not share a store but share a medium can require each other's signatures.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No implementation language beyond what the requirement needs
  • [x] Out of scope is stated

Titles, headings, exports, tables, columns and requirements. Esc closes.