-
Notifications
You must be signed in to change notification settings - Fork 378
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
Skip hash validation when it's unsafe when downloading Storage objects #9507
Comments
FYI: There was some recent movement in internal issues around this. One of the issues with hash validations was that for files doubly compressed, Storage was removing the outer compression layer on serve, see #7154 as well. |
Hey folks, skipping validation can now be done through new headers in the JSON API |
Assigning to @jskeet as per internal discussion with the wider team. |
Fixes googleapis#9507 (modulo the change to default in the next majro version) This detects if the x-goog-stored-content-encoding header is set to gzip, but the actual content encoding of the response is non-gzip, and disables validation in that specific case - while validating in the same way as normal for everything else. We will make this the default in the next major version. (This is recorded in the internal document.) Implementation note: this now *always* creates a HashValidatingDownloader, and puts that in control of whether validation is actually performed or not. That's simpler than the previous split of the choice being in StorageClientImpl.DownloadObject.cs with the hashing in HashValidatingDownloader.
Fixes googleapis#9507 (modulo the change to default in the next majro version) This detects if the x-goog-stored-content-encoding header is set to gzip, but the actual content encoding of the response is non-gzip, and disables validation in that specific case - while validating in the same way as normal for everything else. We will make this the default in the next major version. (This is recorded in the internal document.) Implementation note: this now *always* creates a HashValidatingDownloader, and puts that in control of whether validation is actually performed or not. That's simpler than the previous split of the choice being in StorageClientImpl.DownloadObject.cs with the hashing in HashValidatingDownloader.
Fixes #9507 (modulo the change to default in the next majro version) This detects if the x-goog-stored-content-encoding header is set to gzip, but the actual content encoding of the response is non-gzip, and disables validation in that specific case - while validating in the same way as normal for everything else. We will make this the default in the next major version. (This is recorded in the internal document.) Implementation note: this now *always* creates a HashValidatingDownloader, and puts that in control of whether validation is actually performed or not. That's simpler than the previous split of the choice being in StorageClientImpl.DownloadObject.cs with the hashing in HashValidatingDownloader.
In #1641 I proposed a
HashValidationMode
ofWhenAvailable
or similar - but we couldn't implement it at the time.With the new
x-goog-stored-content-encoding
header, we may be able to implement this - see the Node PR for an example.Ideally, we'd want to make this the default - but that should only happen at the next major version of Google.Cloud.Storage.V1.
The text was updated successfully, but these errors were encountered: