From fc6c7101cdb42666c1f79df4206029c7cf7e61c6 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Nov 2026 20:06:05 +0000 Subject: federated nodes: users who read the federation alone (--store-readers) On a federated node, every user its htpasswd or proxy lets in may do everything: put events, have it drop what it took, vote through it with its party's key, make fork roots, read the document. An application or someone watching needn't act for the node. `--store-readers USER,...` names users who read the federation and do nothing else (`api::access::federated`, before the registry's checks): GET and HEAD of the events API (/events and below), checking a fork (POST /events/fork), and keeping a session (whoami, refresh, logout); anything else is 403, saying so. Its other users are its operators, as all were: a node setting nothing changes nothing. --- src/node.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/node.rs') diff --git a/src/node.rs b/src/node.rs index 22aa0df..6fc8c66 100644 --- a/src/node.rs +++ b/src/node.rs @@ -62,6 +62,8 @@ pub(crate) struct NodeConfig { pub(crate) blob_chunk_bytes: u32, pub(crate) swarm_key: Option>, pub(crate) protocol_writers: HashSet, + /// `--store-readers`: on a node holding a federated store, the users who only read it. + pub(crate) store_readers: HashSet, /// On a genesis node: the swarm's first users, which it records /// (`access::registry::first_users`); empty elsewhere, and where none were named /// (the simulations: no registry). @@ -193,6 +195,7 @@ impl Node { blobs: Arc::new(swarm::blob::Blobs::new(config.blob_chunk_bytes)), speaking: Arc::default(), protocol_writers: Arc::new(config.protocol_writers), + store_readers: Arc::new(config.store_readers), first_users: Arc::new(config.first_users), first_policy: config.first_policy, node_key: config.node_key, -- cgit v1.3.1