fix: Remove context passed to MinIO's NewSSEKMS#1428
Open
lbeckman314 wants to merge 6 commits into
Open
Conversation
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Gen3 Integration Tests
|
Gen3 Integration Tests
|
Gen3 Integration Tests
|
Gen3 Integration Tests
|
Gen3 Integration Tests
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview 🌀
This PR adds a fix to Funnel to resolve a malformed
x-amz-server-side-encryption-contextheader when using SSE-KMS with the MinIO Go client (Issue #2235).Current Behavior⚠️
encrypt.NewSSEKMS(kmskeyId, ctx)was called with acontext.Contextas the second argument (the KMS encryption context).Since
NewSSEKMSJSON-marshals whatever is passed, this produced a nested object{"Context":{"Context":{"Context":{}}}}which was base64-encoded into thex-amz-server-side-encryption-contextheader.S3 rejects this because it requires a flat string-string map, causing upload/download failures on KMS-enabled buckets.
New Behavior ✔️
encrypt.NewSSEKMS(kmskeyId, nil)is called instead.Passing
niltells the MinIO client to omit thex-amz-server-side-encryption-contextheader entirely, which is correct when no additional KMS encryption context key-value pairs are needed.Breaking Changes? ❌
KmsKeyIDleft empty) are unaffected.