[PR #2352] [MERGED] Set SSE headers when checking bucket #2495

Closed
opened 2026-03-04 02:05:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2352
Author: @jstastny
Created: 10/18/2023
Status: Merged
Merged: 10/18/2023
Merged by: @gaul

Base: masterHead: js/check-bucket-sse


📝 Commits (1)

  • d2b7848 Set SSE headers when checking bucket

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 src/curl.cpp (+8 -0)

📄 Description

Relevant Issue (if applicable)

Without this, the check fails when mounting a subdirectory in the bucket (for example AWSSSECKEYS=vgXEublG7JJkhfRSZT1Ze3lefY2d7j3i s3fs -f -d -o bucket=my-bucket:/my-subdir/,complement_stat,allow_other,uid=0,gid=100,use_cache=/tmp/s3fs-cache,del_cache,ensure_diskfree=10000,curldbg,use_sse=custom /mnt/s3 when using SSE.

Before this PR, this would fail with:

2023-10-18T11:43:57.132Z [ERR] curl.cpp:RequestPerform(2561): HTTP response code 400, returning EIO. Body Text: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>The object was stored using a form of Server Side Encryption. The correct parameters must be provided to retrieve the object.</Message><RequestId>T0X9HXZ34AMSCGB9</RequestId><HostId>dVaEyuY7JaiD3b3tqmtfPUeLfCFi0qwewT2JXRTIniJjGobA0VLiuZJbC1f+VdsppcLiqRdVdaU=</HostId></Error>
2023-10-18T11:43:57.132Z [ERR] curl.cpp:CheckBucket(3742): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>The object was stored using a form of Server Side Encryption. The correct parameters must be provided to retrieve the object.</Message><RequestId>T0X9HXZ34AMSCGB9</RequestId><HostId>dVaEyuY7JaiD3b3tqmtfPUeLfCFi0qwewT2JXRTIniJjGobA0VLiuZJbC1f+VdsppcLiqRdVdaU=</HostId></Error>
2023-10-18T11:43:57.132Z [CRT] s3fs.cpp:s3fs_check_service(4520): Failed to check bucket and directory for mount point : Bad Request(host=https://s3.amazonaws.com)
2023-10-18T11:43:57.132Z [ERR] s3fs.cpp:s3fs_exit_fuseloop(4277): Exiting FUSE event loop due to errors

Details

This adds the SSE headers to the GET http request same as how it is done in other methods.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2352 **Author:** [@jstastny](https://github.com/jstastny) **Created:** 10/18/2023 **Status:** ✅ Merged **Merged:** 10/18/2023 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `js/check-bucket-sse` --- ### 📝 Commits (1) - [`d2b7848`](https://github.com/s3fs-fuse/s3fs-fuse/commit/d2b78483ac50a2927b092c4fc22ef28feea2c58b) Set SSE headers when checking bucket ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+8 -0) </details> ### 📄 Description <!-- -------------------------------------------------------------------------- Please describe the purpose of the pull request(such as resolving the issue) and what the fix/update is. --------------------------------------------------------------------------- --> ### Relevant Issue (if applicable) Without this, the check fails when mounting a subdirectory in the bucket (for example `AWSSSECKEYS=vgXEublG7JJkhfRSZT1Ze3lefY2d7j3i s3fs -f -d -o bucket=my-bucket:/my-subdir/,complement_stat,allow_other,uid=0,gid=100,use_cache=/tmp/s3fs-cache,del_cache,ensure_diskfree=10000,curldbg,use_sse=custom /mnt/s3` when using SSE. Before this PR, this would fail with: ``` 2023-10-18T11:43:57.132Z [ERR] curl.cpp:RequestPerform(2561): HTTP response code 400, returning EIO. Body Text: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidRequest</Code><Message>The object was stored using a form of Server Side Encryption. The correct parameters must be provided to retrieve the object.</Message><RequestId>T0X9HXZ34AMSCGB9</RequestId><HostId>dVaEyuY7JaiD3b3tqmtfPUeLfCFi0qwewT2JXRTIniJjGobA0VLiuZJbC1f+VdsppcLiqRdVdaU=</HostId></Error> 2023-10-18T11:43:57.132Z [ERR] curl.cpp:CheckBucket(3742): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidRequest</Code><Message>The object was stored using a form of Server Side Encryption. The correct parameters must be provided to retrieve the object.</Message><RequestId>T0X9HXZ34AMSCGB9</RequestId><HostId>dVaEyuY7JaiD3b3tqmtfPUeLfCFi0qwewT2JXRTIniJjGobA0VLiuZJbC1f+VdsppcLiqRdVdaU=</HostId></Error> 2023-10-18T11:43:57.132Z [CRT] s3fs.cpp:s3fs_check_service(4520): Failed to check bucket and directory for mount point : Bad Request(host=https://s3.amazonaws.com) 2023-10-18T11:43:57.132Z [ERR] s3fs.cpp:s3fs_exit_fuseloop(4277): Exiting FUSE event loop due to errors ``` ### Details This adds the SSE headers to the `GET` http request same as how it is done in other methods. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2495
No description provided.