mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(s3): enforce SigV4/SigV4A algorithm prefix in AccountResolver * fix(s3): require X-Amz-Algorithm in AccountContextFilter presigned query resolution * fix(s3): reject malformed Authorization header in S3HeaderSignatureFilter * fix(s3): reject query presigned requests missing X-Amz-Algorithm in PreSignedUrlFilter * test(s3): add reproduction tests for unverified credential account routing (#4825) * fix(s3): isolate presigned query auth and permit SigV4A headers (#4825) * fix(s3): gate signature checks on validation setting and restore unsigned presigned steering (#4825) * fix(s3): stop unverified credentials from selecting an account (#4825) Account selection now requires a SigV4/SigV4A Authorization scheme or a query string carrying X-Amz-Algorithm. A bare "Credential=" header or an X-Amz-Credential without X-Amz-Algorithm keeps feeding region resolution only, so it can no longer steer a request into another account. Credentials rebuilt outside the header (IAM presigned query, presigned POST form) now carry the AWS4-HMAC-SHA256 scheme so IAM enforcement still recognises them. With signature validation on, a query holding only X-Amz-Signature is rejected with AuthorizationQueryParametersError. * fix(s3): ignore unsupported Authorization headers for region and keep credential-only download URLs working (#4825) A header without a SigV4/SigV4A scheme now selects neither account nor region, so it cannot misattribute S3 data events to another region. Floci's own download URLs (Lambda layers, Kubernetes init containers) carry only X-Amz-Credential, so that parameter steers the account and region again without X-Amz-Algorithm. * fix(s3): let a present Authorization header win over X-Amz-Credential in account routing (#4825) IamEnforcementFilter reads the query credential only when no Authorization header exists. AccountContextFilter fell back to the query whenever the header was unrecognised, so a malformed header plus X-Amz-Credential picked an account that IAM then skipped. Both filters now use the same precedence. * fix(s3): treat a whitespace-only Authorization header as absent in account routing (#4825) S3's authorization parser ignores a blank header and uses the presigned query credential, so AccountContextFilter must do the same instead of falling back to the default account. * fix(iam): treat a whitespace-only Authorization header as absent in IAM enforcement (#4825) AccountContextFilter and S3 already ignore a blank header and use the presigned query credential. IamEnforcementFilter only checked for null, so a blank header made it find no access key and skip authorization for the account the query credential had selected. All three now agree. * fix(s3): presign internal lambda download URLs * test(macie2): include SigV4 algorithm in account routing check * docs(s3): list the SigV4A and incomplete presigned URL 400s under signature verification (#4825) * docs(s3): say Floci does not verify SigV4A signatures yet instead of cannot