diff options
| author | tv <tv@krebsco.de> | 2026-11-19 20:06:05 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-19 21:26:49 +0100 |
| commit | fc6c7101cdb42666c1f79df4206029c7cf7e61c6 (patch) | |
| tree | b9a2f088aedcafa762d552cada23eba134f9e849 /src/node.rs | |
| parent | d93f574d14a2e52a1d7dfd1e256f70c6eb9644ef (diff) | |
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.
Diffstat (limited to 'src/node.rs')
| -rw-r--r-- | src/node.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<Arc<SwarmKey>>, pub(crate) protocol_writers: HashSet<String>, + /// `--store-readers`: on a node holding a federated store, the users who only read it. + pub(crate) store_readers: HashSet<String>, /// 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, |
