Skip to content

Fix SSE-C signed URLs#280

Open
lukasgabriel wants to merge 1 commit intovmware-tanzu:mainfrom
mway-io:fix/sse-c-presigned-url
Open

Fix SSE-C signed URLs#280
lukasgabriel wants to merge 1 commit intovmware-tanzu:mainfrom
mway-io:fix/sse-c-presigned-url

Conversation

@lukasgabriel
Copy link
Copy Markdown

Related Issues

Problem

When SSE-C encryption is configured (customerKeyEncryptionFile or customerKeyEncryptionSecret), the CreateSignedURL method does not include SSE-C headers in the presigned URL request. This causes S3-compatible backends to reject read operations with:

Requests specifying Server Side Encryption with Customer provided keys must provide a valid encryption algorithm.

Testing

Tested against Hetzner Object Storage (Ceph) with SSE-C enabled. After this fix, the error changes from InvalidArgument (missing algorithm) to SignatureDoesNotMatch, confirming the headers are now correctly included in the signature.

The BackupStorageLocation used for testing:

- name: default
  provider: aws
  default: true
  bucket: redacted
  config:
    region: fsn1
    s3ForcePathStyle: true
    s3Url: https://fsn1.your-objectstorage.com
    customerKeyEncryptionSecret: velero-sse-key/customer-key

Remaining Issues

This PR fixes the plugin side only. A complete fix requires additional work in the Velero CLI, which currently performs plain HTTP GET requests to presigned URLs without sending the required SSE-C headers. This is tracked in vmware-tanzu/velero#8668. I think the necessary changes would need to be done in https://github.com/vmware-tanzu/velero/blob/main/pkg/cmd/util/downloadrequest/downloadrequest.go.

Signed-off-by: Lukas Gabriel <lukasgabriel@lukasgabriel.net>
@lukasgabriel lukasgabriel force-pushed the fix/sse-c-presigned-url branch from 56c9931 to 229639d Compare February 6, 2026 09:01
@kaovilai
Copy link
Copy Markdown
Collaborator

kaovilai commented Feb 6, 2026

Thanks for your PR!

@Minding000
Copy link
Copy Markdown

@reasonerjt @ywk253100 @blackpiglet
Another review is needed here
As someone facing the issue I'd greatly appreciate it :)

@Minding000
Copy link
Copy Markdown

@kaovilai Is there anything still needed for this to be merged that I can help with?

@kaovilai
Copy link
Copy Markdown
Collaborator

Not from me, maybe after kubecon EU they'll review.

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.

3 participants