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/state | |
| 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/state')
| -rw-r--r-- | src/state/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs index cbdc509..68eafec 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -145,6 +145,10 @@ pub(crate) struct AppState { /// HTTP API users who may write protocol data through the store API /// (`--protocol-writers`). pub(crate) protocol_writers: Arc<std::collections::HashSet<String>>, + /// HTTP API users who only read the federated store this node holds + /// (`--store-readers`, `api::access::federated`). + #[cfg_attr(not(feature = "federation"), allow(dead_code))] + pub(crate) store_readers: Arc<std::collections::HashSet<String>>, /// The swarm's first users, recorded by a genesis node (`NodeConfig::first_users`). pub(crate) first_users: Arc<crate::access::registry::FirstUsers>, /// The swarm's policy, recorded by a genesis node (`NodeConfig::first_policy`). |
