Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSE-C not fully implemented #662

Open
skepticalwaves opened this issue Oct 2, 2021 · 1 comment
Open

SSE-C not fully implemented #662

skepticalwaves opened this issue Oct 2, 2021 · 1 comment

Comments

@skepticalwaves
Copy link

skepticalwaves commented Oct 2, 2021

I am testing SSE-C, I provide on the command line

--sse --sse-c <key redacted>

I then created some files, and both attempted to access them from the web interface, and mounting the bucket on another system without providing the sse-c key.

I found that in both cases I can read the contents of the file, which should not be the case for SSE.

Reading over the commit: a2375a6

It does not appear that the get/put code was touched, which is required according to the AWS API:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/specifying-s3-c-encryption.html

Edit:
It looks like the Get/Put code was modified, but whatever is happening, it doesn't work.

@skepticalwaves
Copy link
Author

Turning debugging on
The key is provided properly during bucket mounting:

Oct 02 21:11:13 matrix systemd[1]: Started Matrix Goofys media store.
Oct 02 21:11:14 matrix matrix-goofys[1681205]: 2021/10/02 21:11:14.839750 s3.DEBUG DEBUG: Request s3/HeadObject Details:
Oct 02 21:11:14 matrix matrix-goofys[1681205]: ---[ REQUEST POST-SIGN ]-----------------------------
Oct 02 21:11:14 matrix matrix-goofys[1681205]: HEAD /<REDACTED>/matrix/<REDACTED> HTTP/1.1
Oct 02 21:11:14 matrix matrix-goofys[1681205]: Host: s3.eu-central-1.wasabisys.com
Oct 02 21:11:14 matrix matrix-goofys[1681205]: User-Agent: aws-sdk-go/1.17.13 (go1.15.7; linux; amd64)
Oct 02 21:11:14 matrix matrix-goofys[1681205]: Authorization: AWS4-HMAC-SHA256 Credential=<REDACTED>, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-server-side-encryption-customer-algorithm;x-amz-server-side-encryption-customer-key;x-amz-server-side-encryption-customer-key-md5, Signature=<REDACTED>
Oct 02 21:11:14 matrix matrix-goofys[1681205]: X-Amz-Content-Sha256: <REDACTED>
Oct 02 21:11:14 matrix matrix-goofys[1681205]: X-Amz-Date: 20211002T211114Z
Oct 02 21:11:14 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption-Customer-Algorithm: AES256
Oct 02 21:11:14 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption-Customer-Key: <REDACTED>
Oct 02 21:11:14 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption-Customer-Key-Md5: <REDACTED>

But it appears not all of the required headers are provided for the PutObject call

Oct 02 21:26:41 matrix matrix-goofys[1681205]: -----------------------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 2021/10/02 21:26:41.611325 s3.DEBUG DEBUG: Response s3/PutObject Details:
Oct 02 21:26:41 matrix matrix-goofys[1681205]: ---[ RESPONSE ]--------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: HTTP/1.1 200 OK
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Content-Length: 0
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Date: Sat, 02 Oct 2021 21:26:41 GMT
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Etag: "<REDACTED>"
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Server: WasabiS3/7.1.198-2021-09-17-22521bb (head04)
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Id-2: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Request-Id: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption: AES256
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 
Oct 02 21:26:41 matrix matrix-goofys[1681205]: -----------------------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 2021/10/02 21:26:41.612965 buffer.DEBUG requesting 5242880
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 2021/10/02 21:26:41.614118 s3.DEBUG DEBUG: Request s3/PutObject Details:
Oct 02 21:26:41 matrix matrix-goofys[1681205]: ---[ REQUEST POST-SIGN ]-----------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: PUT /<REDACTED>/matrix/test5 HTTP/1.1
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Host: s3.eu-central-1.wasabisys.com
Oct 02 21:26:41 matrix matrix-goofys[1681205]: User-Agent: aws-sdk-go/1.17.13 (go1.15.7; linux; amd64)
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Content-Length: 6
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Authorization: AWS4-HMAC-SHA256 Credential=<REDACTED>, SignedHeaders=content-length;content-md5;host;x-amz-content-sha256;x-amz-date;x-amz-server-side-encryption;x-amz-storage-class, Signature=<REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Content-Md5: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Content-Sha256: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Date: 20211002T212641Z
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption: AES256
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Storage-Class: STANDARD
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Accept-Encoding: gzip
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 
Oct 02 21:26:41 matrix matrix-goofys[1681205]: -----------------------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 2021/10/02 21:26:41.750576 s3.DEBUG DEBUG: Response s3/PutObject Details:
Oct 02 21:26:41 matrix matrix-goofys[1681205]: ---[ RESPONSE ]--------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: HTTP/1.1 200 OK
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Content-Length: 0
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Date: Sat, 02 Oct 2021 21:26:41 GMT
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Etag: "<REDACTED>"
Oct 02 21:26:41 matrix matrix-goofys[1681205]: Server: WasabiS3/7.1.198-2021-09-17-22521bb (head04)
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Id-2: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Request-Id: <REDACTED>
Oct 02 21:26:41 matrix matrix-goofys[1681205]: X-Amz-Server-Side-Encryption: AES256
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 
Oct 02 21:26:41 matrix matrix-goofys[1681205]: -----------------------------------------------------
Oct 02 21:26:41 matrix matrix-goofys[1681205]: 2021/10/02 21:26:41.750618 buffer.DEBUG returning 6

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

No branches or pull requests

1 participant