Files
floci/docs
Priamo Germosen f9ed48de2a fix(iam): read an effect as written and a principal element that names nobody (#8402)
A statement's Effect was compared without regard to case, so "Effect":"allow"
granted and "Effect":"deny" overrode an allow, on a document no write of this
package would have stored: the write validator holds that element to the two
words the language defines, compared literally. The guide is explicit about the
element, "The Effect value is case sensitive", so the two words are the words
themselves here too, and a statement that spells one of them another way states
nothing, which is how an absent effect and one that is no string are already
read. The two service-reachability readers ask the statement for its effect
rather than spelling the word a third time, and denyStatementsOf, the one other
reader of the element in this package, collects a Deny written as Deny.

The principal half is an element that names nobody. A Principal or NotPrincipal
written as a string or a list came to a map carrying whatever the list named, an
empty one included, where the typed spelling already dropped a type whose
entries named nobody. It tells on NotPrincipal, the element whose statement
covers every caller it does not name: "NotPrincipal": [], or a list whose only
entry is no string, spared nobody and so covered everyone the statement
otherwise covered, an Allow written that way granting to any caller there is.
Each entry is written as a <principal_id_string>, so an element whose entries
are no strings names nobody, and a statement whose principal element names
nobody matches no caller now, which is how a NotAction or NotResource naming
nothing already leaves a statement matching neither. An element that is written
and names nobody is still the element the statement carries, so a statement
carrying both of them is decided by its Principal either way, that being the one
the grammar gives precedence, rather than by the NotPrincipal beside it.

S3 reads the same two elements in a pass of its own, the one that decides an
unsigned request, and it read both the old way: an effect without regard to
case, and any NotPrincipal that was there at all as an exclusion. Its readers
take the effect through one place that compares the words as written now, and a
NotPrincipal has to name somebody before it carves anybody out, so one bucket
policy answers a signed request and an anonymous one alike.

The Block Public Access status keeps the old question, and on purpose. It asks
what a policy could grant rather than whom a statement covers: S3 "begins by
assuming that the policy is public" and calls it non-public only when it grants
"only to fixed values" of a principal or of one of the recognised condition
keys. A NotPrincipal pins no principal to a fixed value whether it names
anybody or not, so a statement written that way leaves the policy public there
while granting nobody anything in the readers that decide a request. The effect
is the one element that reads alike everywhere, the guide's case rule being
about the element itself.

Every half reads a document already stored or supplied rather than checking one
being written: no code and no status moves, and nothing is refused that was not
refused before. A Deny whose NotPrincipal names nobody denies nobody for the
same reason an Allow written that way grants nobody, which is this emulator's
own reading of an element AWS leaves undefined.
2026-11-15 00:00:10 -04:00
..
2026-03-15 17:43:56 -05:00