Expand description
Row scoping: rows of a scoped entity reach only the sessions entitled to them.
An entity may name one string field as its scope field (the stack’s
LiveSpec rowScopes, carried on the entity spec as scope_field). Each
row’s value in that field is its scope id:
- an absent,
nullor empty value makes the row public: every session receives it; - any other string makes it scoped: a session receives it only when
its verified token’s
row_scopesclaim lists that id; - any other value makes it visible to nobody, so a malformed row fails closed.
The scopes a session may read come only from its verified token, never
from the subscription request. A client’s own partition and filters
still apply, but only on top of the scope check, so they can narrow what a
session receives and never widen it. Sessions without the claim, and
servers without authentication, receive only public rows of scoped
entities. Entities without a scope field are unaffected.
Structs§
- Scope
Field - The field of a scoped entity’s rows that holds their scope id.
Enums§
- RowScope
- A row’s scope.
Constants§
- DEFAULT_
MAX_ SCOPE_ PARTITIONS - Default cap on the scope partitions one sorted view keeps (see
SortedViewCache::partition_by_scope).
Functions§
- session_
row_ scopes - The row scopes a verified session may read: its
row_scopesclaim, without empty ids. Empty for a session without the claim or without authentication.