Skip to content

AWS: S3SignerServlet should strip out more request headers for caching#15428

Draft
steveloughran wants to merge 3 commits intoapache:mainfrom
steveloughran:pr/15417-S3SignerServlet
Draft

AWS: S3SignerServlet should strip out more request headers for caching#15428
steveloughran wants to merge 3 commits intoapache:mainfrom
steveloughran:pr/15417-S3SignerServlet

Conversation

@steveloughran
Copy link
Contributor

#15417

A bit concerned that the cache is static so spans all signers; for s3a I'd like a prefix in the cache with every fs instance having a different prefix.
This allows for different encryption settings per instance

The test does show that unsigned headers (here: ifMatch()) can be changed without the signature becoming invalid

@steveloughran steveloughran marked this pull request as draft February 24, 2026 11:03
@github-actions github-actions bot added the AWS label Feb 24, 2026
@steveloughran
Copy link
Contributor Author

I don't like that the server client needs to guess which headers in a new request are excluded from the sign and hence safe to cache. Change encryption for example and everything blows up with a signing failure.

Either the signer should parse and cache the header list from the signature, or (slightly better) the rest servlet should return that list independently. The signer can then use that header list in the cache information to decide whether to reuse. Simplest strategy: include the list of headers alongside the signature, and if changed, don't use the cache value.

@steveloughran steveloughran changed the title S3SignerServlet should strip out more request headers for caching AWS: S3SignerServlet should strip out more request headers for caching Feb 25, 2026
A bit concerned that the cache is static so spans all signers; for
s3a I'd like a prefix in the cache with every fs instance having
a different prefix.
This allows for different encryption settings per instance
@steveloughran steveloughran force-pushed the pr/15417-S3SignerServlet branch from c56182e to 7f8cbfb Compare February 25, 2026 14:13
@steveloughran
Copy link
Contributor Author

If the signing string is parsed then the cache should already have everything needed to identify conflicting s3 requests.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant