OEEP RFC 0004: Distributed Repository Discovery
We have a standard evidence format (RFC 0002) and a way to know who signed it (RFC 0003). Now a client needs to know where to send it.
The obvious answer is a central list of repositories. But a central list is a central point of control. Whoever runs it can remove a repository, and if it goes down, new clients can't find anyone.
So OEEP avoids requiring repositories to register with any single service.
Repository manifests and capability discovery
Each repository publishes a signed, machine-readable manifest at a standard location:
https://observer.example/.well-known/oeep.json
{
"protocolVersion": "1.0",
"repositoryId": "observer-example",
"name": "Example Election Observer",
"publicKey": "...",
"endpoints": {
"submit": "https://observer.example/v1/submissions",
"retrieve": "https://observer.example/v1/submissions",
"feed": "https://observer.example/v1/feed",
"attachments": "https://observer.example/v1/blobs"
},
"supportedElections": ["ng-2027-general"],
"version": 4,
"signature": "..."
}
The manifest tells clients what the repository supports: which elections, which endpoints, which protocol version. Because it's signed with the repository's key, nobody can swap out the endpoints without breaking the signature.
Every client as a manifest directory
In OEEP, every client and every repository keeps a local cache of the manifests it knows about. Every phone is a small directory.
There is no "official" directory. There are many directories, and they all hold copies of the same signed manifests.
Gossip-based manifest propagation
When two peers connect, they exchange the manifests the other is missing.
Agent B only knows about repositories B and D. After syncing with Repository A, which knows about A through E, Agent B now knows about all five.
This is a gossip protocol. Information spreads peer to peer, and nobody has to coordinate it centrally. It's slower than a central list, but it has no single place to shut down.
Network bootstrapping and partition recovery
A new client has to learn about at least one peer before gossip can work. That's bootstrapping, and OEEP allows several methods side by side:
- A small seed list shipped with the app.
- A list provided by the agent's party or observer organisation during training.
- Scanning a QR code from another device.
- Importing a manifest file shared over any channel: WhatsApp, Bluetooth, email.
None of these is authoritative. They're just ways to find a first peer.
Parts of the network will sometimes get cut off, e.g. a region losing connectivity. That's a network partition. Peers inside the partition can keep gossiping locally. When connectivity returns, they sync with the rest of the network and converge.
Manifest versioning and synchronization
Each manifest carries a monotonically increasing version. When a peer sees two signed manifests for the same repositoryId, it keeps the higher version.
Sync can be efficient: peers exchange a compact summary (e.g. repositoryId + version pairs) first, then only fetch the manifests that differ.
Manifests should be shared well before election day, so the network has settled by the time it matters.
Repository selection and trust evaluation
Knowing about a repository is not the same as trusting it.
An open protocol does not mean every device must blindly transmit data to every endpoint on the internet.
If clients sent evidence to every manifest they saw, fake repositories could be used for:
- Surveillance: tracking who submits what, from where.
- Denial of service: draining agents' data and battery.
- Wasted bandwidth: on a day when mobile networks are already congested.
So each client evaluates manifests against a local trust policy, for example:
- Only send to repositories endorsed by my issuing organisation.
- Only send to repositories listed in the signed trust directory.
- Cap the number of direct recipients, e.g. no more than 5–10.
- Cap how much storage and bandwidth discovery can consume.
- Prefer repositories in different failure domains.
That last point matters more than it looks. Ten media houses running on the same cloud account, the same hosting provider, or the same managed auth service are not ten independent repositories. They're one failure domain with ten logos.
Manifest poisoning and malicious endpoint mitigation
A malicious peer might gossip a poisoned manifest: one that claims to be a known repository but points to the attacker's servers.
The signature handles this. A manifest for observer-example must be signed with observer-example's known key. If it isn't, it's dropped.
Additional mitigations:
- Pin a repository's key on first trusted contact, and treat key changes as suspicious unless they're properly rotated.
- Reject manifests that are oversized or change suspiciously often.
- Rate-limit how many new manifests a client accepts from one peer.
- If a new version looks suspicious, keep the last trusted version and flag it.
Security considerations and trade-offs
- Gossip is eventually consistent. A new repository might take minutes or hours to be widely known. That's fine for elections, if manifests are distributed ahead of time.
- Clients have more decisions to make. Agents shouldn't have to understand any of this. The app should apply sensible policies quietly.
- Discovery leaks a little information. Who you gossip with can reveal who you are affiliated with. Clients should avoid gossiping with untrusted peers in sensitive contexts.
Open questions
- How many repositories should a client deliver to directly before relying on replication?
- Should repository endorsements be a first-class part of the manifest?
- What's the most practical bootstrap method for areas with very poor connectivity?
Tomorrow, in RFC 0005, we'll follow evidence as it travels from the phone to the repositories, including when there's no internet at all. Let me know your thoughts in the comments below.