rbac.rs and the lexicons define public as "anyone signed in". But getGroup with no auth calls can_read(&[], ""), which is true for public, so a caller who is not signed in gets the profile and rules. listGroups, which takes no auth, shows the same, and /img serves meta images to anyone while the group is declared. Meanwhile Host::may with user = None gives nothing in a group's space (public_read is never set), so an unauthenticated read of the same meta records through the space methods is refused. A reader of the lexicon is misled, and the host's two paths disagree.
How to see it
Read against docs/fresh at 4636e6d, the code at: rbac.rs:13 (PUBLIC), rbac.rs:78; group_api.rs:217-221 (get_group), :374 (list_groups); authority.rs:149-151 (may); lexicons defs.json:726, access.json:44. Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Decide on one meaning. Given the declaration and unauthenticated listGroups, that is "anyone". Change the text in rbac.rs, defs.json and access.json to say so, and let may answer reads of a public space for user = None. Otherwise, gate the views on a caller.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
rbac.rs and the lexicons define
publicas "anyone signed in". ButgetGroupwith no auth callscan_read(&[], ""), which is true forpublic, so a caller who is not signed in gets the profile and rules.listGroups, which takes no auth, shows the same, and/imgserves meta images to anyone while the group is declared. MeanwhileHost::maywithuser = Nonegives nothing in a group's space (public_readis never set), so an unauthenticated read of the same meta records through the space methods is refused. A reader of the lexicon is misled, and the host's two paths disagree.How to see it
Read against
docs/freshat 4636e6d, the code at: rbac.rs:13 (PUBLIC), rbac.rs:78; group_api.rs:217-221 (get_group), :374 (list_groups); authority.rs:149-151 (may); lexicons defs.json:726, access.json:44. Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Decide on one meaning. Given the declaration and unauthenticated
listGroups, that is "anyone". Change the text in rbac.rs, defs.json and access.json to say so, and letmayanswer reads of apublicspace foruser = None. Otherwise, gate the views on a caller.Where
The host, as built from 4636e6d. Found while checking the docs against the code.