aboutsummaryrefslogtreecommitdiffstats
path: root/src/access/registry.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:21 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:21 +0100
commit41657a4d749b1f1d44663ff6504f2e784f091537 (patch)
tree3f4f866f60988696bf047fa718351457a3309b75 /src/access/registry.rs
parenta3e936154e07ba3b95157d26ffeae9364f3d5cef (diff)
access: strict policy, signed paths
"values": "signed" (strict, requiring signatures too): the registry, _continuum/access, bans and the paths in _continuum/access/userSigned (* for any key) hold values their users signed. Envelopes read as the values they hold where the node reads protocol data. Auth plan M7.
Diffstat (limited to 'src/access/registry.rs')
-rw-r--r--src/access/registry.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/access/registry.rs b/src/access/registry.rs
index caa263d..618402b 100644
--- a/src/access/registry.rs
+++ b/src/access/registry.rs
@@ -128,10 +128,10 @@ impl User {
/// The entry of user `name`, if it has one.
pub(crate) fn user(doc: &impl ReadDoc, name: &str) -> Option<User> {
- let value = store::read_path(doc, &user_path(name)).ok()??;
+ let value = store::read_plain(doc, &user_path(name)).ok()??;
let mut user = value.is_object().then(|| User::from_json(&value))?;
// A damaged one revokes every token.
- user.tokens_not_before = match store::read_path(doc, &logouts_path(name)) {
+ user.tokens_not_before = match store::read_plain(doc, &logouts_path(name)) {
Ok(None) => 0,
Ok(Some(at)) => at.as_u64().unwrap_or(u64::MAX),
Err(_) => u64::MAX,