mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(iam): compare numeric and boolean condition values
A condition value written as a JSON number, such as
{"NumericLessThan":{"s3:max-keys":10}}, or as a boolean under an operator
other than Bool, parsed to an empty value list, so the condition never
matched. Compare both as strings, as IAM does.
* fix(iam): never match an unparsable numeric or date condition value
compareNumeric and compareDates returned 0 when a value failed to parse, so
NumericEquals and DateEquals matched a non-numeric or non-date value and an
Allow could grant access. Numeric values were also compared as doubles, so
integers beyond 2^53 collapsed together. Compare numbers as BigDecimal, and
treat a value that does not parse as not satisfying the operator.
* fix(iam): never match a null numeric or date condition value
* fix(iam): accept epoch seconds and W3C short date forms in date conditions
* fix(iam): read lowercase date-time separators in date conditions
* chore(iam): keep the policy-variable comment next to its pattern
* test(iam): cover Null conditions with unquoted boolean values