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

Gateway leaks x-goog- headers when running on Google Storage Engine #65

Closed
dekobon opened this issue Nov 3, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@dekobon
Copy link
Collaborator

dekobon commented Nov 3, 2022

When using Google Storage Engine, the gateway fails to strip Google-specific headers from the response and thereby potentially leaks metadata about the object and bucket.

For example:

Server: nginx
Date: Thu, 03 Nov 2022 22:08:51 GMT
Content-Type: text/plain
Content-Length: 2132
Connection: keep-alive
X-GUploader-UploadID: ADPycdt0MrPnE__VwGIJ4k7a0XvuYOk6fel0l5WLn1mgo97NQnKsnrxY6hq85PCW64L6xJ2n_D7CgAI1Za3p9eKh4hru7A
Cache-Control: public
Expires: Thu, 03 Nov 2022 22:08:14 GMT
Last-Modified: Thu, 03 Nov 2022 21:57:33 GMT
ETag: "7d59bff32f153073ff8e8a461cb4979b"
x-goog-generation: 1667512653610340
x-goog-metageneration: 3
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 2132
x-goog-hash: crc32c=0AaUeg==
x-goog-hash: md5=fVm/8y8VMHP/jopGHLSXmw==
x-goog-storage-class: STANDARD
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Accept-Ranges: bytes
@dekobon dekobon added the bug Something isn't working label Nov 3, 2022
@dekobon dekobon closed this as completed in 3052946 Nov 4, 2022
@dekobon
Copy link
Collaborator Author

dekobon commented Nov 4, 2022

With the commit 3052946, one can now add a list of headers to strip from responses. To strip out the Google specific headers, one can now do:

HEADER_PREFIXES_TO_STRIP=x-goog-;x-guploader-uploadid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant