mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
A presigned POST was authorized against the signing principal's identity policies alone, so a same-account caller that only the bucket policy named was denied. The IAM filter now resolves the applicable resource policies on that path too, letting either policy provide the grant while an explicit deny in either still wins and cross-account access still requires both. That resolution now also carries the global condition keys (aws:PrincipalAccount, aws:ResourceAccount, aws:RequestedRegion) filter() already supplies for every other enforcement path, instead of only aws:PrincipalArn, so a conditional bucket-policy statement is judged consistently between the two enforcement paths. Per-action, header-derived keys (s3:RequestObjectTag/* from x-amz-tagging) are deliberately not resolved here: a presigned POST's outer HTTP headers are not covered by its signed policy document and do not correspond to any tag S3Controller actually applies to the object, so trusting one would let a caller satisfy a tag-scoped grant condition without the object ever carrying that tag. Closes #4243 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>