Skip to content

Add configurable S3 checksum env vars for botocore >= 1.36.0 - #262

Draft
rooftopcellist wants to merge 1 commit into
ansible:mainfrom
rooftopcellist:fix/s3-checksum-configurable
Draft

rooftopcellist wants to merge 1 commit into
ansible:mainfrom
rooftopcellist:fix/s3-checksum-configurable

Conversation

@rooftopcellist

Copy link
Copy Markdown
Member

Summary

  • Adds two optional keys to the S3 storage secret: s3-request-checksum-calculation and s3-response-checksum-validation
  • Both default to when_required (pre-botocore 1.36.0 behavior), which is safe for all S3 backends
  • Users who need checksum enforcement on AWS S3 can set these to when_supported
  • Sets the values as env vars (AWS_REQUEST_CHECKSUM_CALCULATION, AWS_RESPONSE_CHECKSUM_VALIDATION) on galaxy-api, galaxy-content, and galaxy-worker deployments

Context

botocore >= 1.36.0 (January 2025) automatically computes CRC32 checksums on S3 write operations. Non-AWS S3-compatible backends (GCS, MinIO, Ceph, Backblaze B2, etc.) do not support the x-amz-sdk-checksum-algorithm header, causing SignatureDoesNotMatch errors.

Defaulting to when_required restores pre-1.36.0 behavior while keeping the setting configurable for users who want checksum enforcement on native AWS S3.

Ref

botocore 1.36.0 introduced automatic CRC32 checksums on S3 write
operations via the x-amz-sdk-checksum-algorithm header. Non-AWS
S3-compatible backends (GCS, MinIO, Ceph, etc.) do not support this
header, causing SignatureDoesNotMatch errors.

This adds two optional keys to the S3 storage secret:
  - s3-request-checksum-calculation
  - s3-response-checksum-validation

Both default to "when_required" (pre-1.36.0 behavior), which is safe
for all S3 backends including AWS. Users who need to enforce checksums
on AWS S3 can set these to "when_supported".

The values are set as environment variables on the galaxy-api,
galaxy-content, and galaxy-worker deployments when S3 storage is
configured.

Ref: AAP-75239
Signed-off-by: Christian M. Adams <chadams@redhat.com>
@rooftopcellist
rooftopcellist marked this pull request as draft May 15, 2026 14:46
@rooftopcellist

Copy link
Copy Markdown
Member Author

Needs more discussion on if this is the right approach or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant