Add get_blob_stream (prefer GetRawBlob)#114
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new get_blob_stream API that intelligently prefers the GetRawBlob method when supported by the proxy protocol, falling back to GetBlob otherwise. A significant addition is the VerifiedBlobReader and associated hashing logic, which enables on-the-fly digest and size verification for streamed blobs, enhancing data integrity. The changes also include necessary dependency updates (hex, sha2), new error types, and protocol version checks. The ProxyTooOld error message has been corrected for clarity. Overall, this is a well-implemented feature that improves the robustness and security of blob fetching.
|
Question on fallback robustness: cc: @cgwalters |
cgwalters
left a comment
There was a problem hiding this comment.
Thanks for working on this! Just as a first pass I think what would help build confidence here is ensuring in CI we're always testing both the old and new code.
One suggestion: A CI run that tests in quay.io/almalinuxorg/almalinux-bootc:10.0 as that uses skopeo version 1.18.1 which predates https://github.com/containers/skopeo/releases/tag/v1.19.0 when this feature appeared.
824950e to
a8886bc
Compare
|
@cgwalters I've updated the PR Can you please check? |
Signed-off-by: Priyanshu Kumar <priyanshu.kumar@broadcom.com>
Run tests in containers with skopeo 1.18 and >=1.19 to exercise both GetBlob fallback and GetRawBlob paths. Signed-off-by: Priyanshu Kumar <priyanshu.kumar@broadcom.com>
e92cf7a to
36efedf
Compare
36efedf to
89fad2a
Compare
Assisted-by: Codex (GPT-5) Signed-off-by: Priyanshu Kumar <priyanshu.kumar@broadcom.com> Signed-off-by: Colin Walters <walters@verbum.org>
89fad2a to
7ed1a8d
Compare
This adds a higher-level blob streaming API that prefers the newer GetRawBlob method (when supported by the negotiated proxy protocol version) and otherwise falls back to GetBlob.
Motivation: bootc-dev/bootc#1424