mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
An action, a resource and a principal are written as strings: the policy grammar spells each one out, as an <action_string>, a <resource_string> and a <principal_id_string>. The evaluator read an element that was no string as naming no value when it stood on its own and as the text of that value when it sat in a list, so "Resource": 123 named no resource while "Resource": [123] named the pattern 123. A list is read like the bare element now, and an entry that is no string names nothing. It tells where the element carves an exception out, since a statement matches on whichever of the two elements it names: a NotAction or a NotResource whose only entry was a number excluded that one text and so covered every action or every resource there is, which made an Allow a grant over everything and a Deny a refusal of everything. Naming no value leaves the statement matching neither. Condition values keep the reading they had. The grammar's JSON rules say quotation marks "are optional for numeric and Boolean values", a lone number or boolean was read as the text of the value already, and a list of them is read that way still, so the two readings sit under names that say which is which. Naming no value is a shape the access report had to learn as well. deniesEveryRequest read a Deny that names no resource as one that bites on every request, where matchesResource reads the same statement as matching nothing, so an allow-everything beside a Deny whose Resource carries only a number took the service off the Organizations access report although every request still reached it. The report reads a statement the way the decision does now: a Deny covers every request only when its Resource names *.