Skip to content

HDDS-15143. Add integration tests for signed S3 uploads in a secure cluster - #12010

Open
rich7420 wants to merge 5 commits into
apache:masterfrom
rich7420:HDDS-15143
Open

rich7420 wants to merge 5 commits into
apache:masterfrom
rich7420:HDDS-15143

Conversation

@rich7420

@rich7420 rich7420 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Signed aws-chunked uploads (STREAMING-AWS4-HMAC-SHA256-PAYLOAD and its -TRAILER variant) are verified only in secure mode, where OM returns the derived signing key, but the existing S3 SDK integration tests run against a non-secure cluster.

This adds tests that upload through S3 Gateway to a Kerberos-secured MiniOzoneCluster with the AWS SDK v2 client. Valid PutObject and UploadPart requests, with and without a CRC32C trailer, must succeed. Each rejected case changes one part of the signed body (a data chunk, the final chunk signature or the trailer), expects SignatureDoesNotMatch, and checks that the existing object or part is unchanged. The tests run with and without Ratis datastream, because S3 Gateway attaches the validator on a separate path for each.

ECDSA (SigV4a) is not covered: S3 Gateway accepts only AWS4-HMAC-SHA256 authorization, so there is no ECDSA verification to test.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15143

How was this patch tested?

Added tests in TestS3SignedChunksInSecureCluster and TestS3SignedChunksInSecureClusterWithRatisStreaming.
Fork CI: https://github.com/rich7420/ozone/actions/runs/46249263348

Copilot AI balanced review requested due to automatic review settings November 10, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the s3 S3 Gateway label Nov 10, 2026
@rich7420
rich7420 marked this pull request as ready for review November 12, 2026 23:00
With a trailer, the trailer signature check already rejects a tampered final chunk signature.
The trailer checksum is compared with or without signature verification, and s3gateway unit tests already cover it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants