You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add an option for crc32/md5 client side validation for Storage.readAllBytes #353
Just to be sure: the crc32/md5 values should be user provided right? I could not find a way of getting the service's ones when downloading object's data.
We have an internal bug filed to provide it when downloading via headers. You can also get them via object metadata lookups, but that means a second API call if you don't already have the metadata.
@Capstan Yes I noticed that with the XML API we could access them via headers. However we would lose some other options.
We also avoided to do "extra" metadata requests elsewhere in gcloud-java and I think we should stick to this practice.
How to you see allowing the user to provide an explicity value for both crc32c and md5 until the JSON API adds the missing headers? Something like:
@azarov I don't believe we have an external mirror of Google's internal bug tracking database. If you know otherwise, or some linked db, I'm happy to use that.
@mziccard As for user-provided, we're not necessarily expecting users to have kept track of the hashes of their objects in a local datastore (though they well could), so this is less about specifying them as conditions and more about validating that the data you read is consistent. Bits can be flipped all the way from storage medium out to the network, even if TLS is used, and even then on the client's machine from the network buffer to the consumption point. A 200 only means the service thinks it's yielding you the right data: the final determination can only be made by the client that the checksums are in agreement with the received data.
@Capstan I see your point. Nevertheless having the user to explicitly provide those values was a way to avoid doing an extra get metadata under the hood: the user might have already got metadata or can get them himself before downloading the object.
As @aozarov said we should probably wait for the headers to be supported by the JSON API.
Activity
mziccard commentedon Nov 25, 2015
Just to be sure: the crc32/md5 values should be user provided right? I could not find a way of getting the service's ones when downloading object's data.
Capstan commentedon Nov 25, 2015
We have an internal bug filed to provide it when downloading via headers. You can also get them via object metadata lookups, but that means a second API call if you don't already have the metadata.
Capstan commentedon Nov 25, 2015
(The XML API already provides these via headers; it'd be a JSON API improvement to add them.)
mziccard commentedon Nov 25, 2015
@Capstan Yes I noticed that with the XML API we could access them via headers. However we would lose some other options.
We also avoided to do "extra" metadata requests elsewhere in gcloud-java and I think we should stick to this practice.
How to you see allowing the user to provide an explicity value for both crc32c and md5 until the JSON API adds the missing headers? Something like:
When using functional blob (which contains metadata) we could instead have
BlobSourceOption.crc32cMatch():aozarov commentedon Nov 25, 2015
@mziccard I think we should wait with this issue until the Json API supports it.
@Capstan is there a way for us to track it?
Capstan commentedon Nov 25, 2015
@azarov I don't believe we have an external mirror of Google's internal bug tracking database. If you know otherwise, or some linked db, I'm happy to use that.
@mziccard As for user-provided, we're not necessarily expecting users to have kept track of the hashes of their objects in a local datastore (though they well could), so this is less about specifying them as conditions and more about validating that the data you read is consistent. Bits can be flipped all the way from storage medium out to the network, even if TLS is used, and even then on the client's machine from the network buffer to the consumption point. A 200 only means the service thinks it's yielding you the right data: the final determination can only be made by the client that the checksums are in agreement with the received data.
mziccard commentedon Nov 26, 2015
@Capstan I see your point. Nevertheless having the user to explicitly provide those values was a way to avoid doing an extra get metadata under the hood: the user might have already got metadata or can get them himself before downloading the object.
As @aozarov said we should probably wait for the headers to be supported by the JSON API.
garrettjonesgoogle commentedon Jan 26, 2017
@Capstan any update?
11 remaining items
chore: add native image checks as required (#353)
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
chore(main): release 3.7.6-SNAPSHOT (#353)
chore(main): release 2.3.9 (#349)
chore(main): release 2.0.0 (#739)
chore: Update publish_javadoc.sh (#353)
chore: copy README to docfx-yml dir (#353)
chore(deps): update dependency com.google.cloud:google-cloud-datastor…
deps: update Guava to 28.1 (#353)
chore: Update publish_javadoc.sh (googleapis#353)
deps: update Guava to 28.1 (#353)
test(deps): update dependency junit:junit to v4.13.2 (googleapis#353)
chore: release 0.122.5 (#353)
chore: release 0.122.5 (#353)
chore(deps): update dependency com.google.cloud:libraries-bom to v7.0…