* add read, write and time to the default symbol table
remove authority an ambient from the symbol table, as they are not used
anymore
* restrict the execution scope to the authority and current block
previously when evaluating a block, we used facts from the authorizer
and all previous blocks. This changes the execution scope to use only
the authority block, authorizer and the current block, which is a much
safer default and aligns more with expectations.
Execution using all previous blocks will be accessible again in the
future through an option
this removes unused symbol from the default table and adds more symbols to the list.
to allow for further growth of the default symbol table, we reserve
indexes from 0 to 1023. Any custom symbol defined in tokens or
authorizers must start from 1024
symbols were a kind of strings with less available operations and some
specific optimizations: they store in index into a symbol table carried
by the token, to reduce size by avoiding repetitions.
They were too confusing for users, and now that #authority and #ambient
are gone, we can remove them completely.
The symbol table was useful though, so now the symbol table is used for
all predicate names and strings
the scoped execution model ensures that checks and rules only
have access to facts added or generated in the current or previous
blocks. They cannot be affected by facts from later blocks. Verifier
rules, checks and policies are executed in the context of the authority
block
Since this change can prevent check from the authority block and the
verifier from being affected by facts from later block, we can remove
the #authority and #ambient symbols
there are two use cases for this:
- quickly loading verifier policies from a serialized state instead of
manually adding datalog elements one by one through the verifier API.
The policies could even be written in a different system then published
to running instances dynamically
- save the state of a verifier, including ambient data, facts, rules and
checks coming from a token, to later load it into another verifier and inspect
it