bijection/schema.ts
Writing a disclosure rule
A disclosure rule is a query that takesdisclosureArgs and returns
readAccessResults, like a read rule. It uses the same policy inputs, the
tables listed in reads.
bijection/access.ts
requests: the reads of this table that the releasing function made, in the same shape a read rule receives.destination: where the data is going.
Destinations
destination.kind says what kind of release is being decided:
component is null for your app’s own tables and the component path
otherwise. For a table release, changes holds each written document before
and after the write, null for absent, so the rule can check what is being
written as well as where.
What a release means
The evidence for a release is every protected read the transaction made, not the individual fields that ended up in the output. A mutation that reads a task and then writes an unrelated row still releases task data into that row’s table. Once a table release commits, the new rows are governed by their own table’s rules. Revoking access to the source afterwards doesn’t retract what was already written. A view, in contrast, keeps the obligations of the rows it was computed from. An HTTP release authorizes the destination, not the body: Bijection doesn’t inspect what the request contains. Once an external system has received data, Bijection can’t recall it.Scheduled work
Acustody release is decided when a transaction that read the table
schedules or cancels work of a component, when a scheduled action starts, and
for reads the scheduled work makes without a caller. It is always decided with
no identity: ctx.auth.getUserIdentity() returns null.
A rule that only permits signed-in members therefore never permits it.
Custody releases nothing by itself. What the scheduled work keeps still carries
the source’s read obligations, and each later write, request or effect it makes
is checked as a release of its own. To let your own scheduled functions work
with task data, permit custody for your app’s root component:
bijection/access.ts
Permitting custody lets deployment administrators who can’t read the table
see that the work exists, its target function, its timing and argument size,
and the outcome and resource usage of each attempt. Its arguments, logs and
return value stay withheld.