feat(storage): hash pins on S3/GCS via object metadata - #952
Merged
Conversation
Signed reland of #947 (by @jgrund). Records the SHA-256 integrity pin as object metadata (x-amz-meta-sha256 / x-goog-meta-sha256) on the S3 and GCS backends, written atomically with the object so bytes are never stored unpinned; get re-verifies the pin on read and fails closed on a mismatch. Raw uploads are validated against an RFC 9530 Repr-Digest header when present. Also adds a direct validate_storage_key() at the top of Storage::get() for defense in depth. main requires verified signatures and the original commits were unsigned, so this re-lands the reviewed diff as one web-flow-signed commit. Co-authored-by: Joe Grund <grundjoseph@gmail.com> Closes #947
|
🐳 Test image pushed: docker pull ghcr.io/getnora-io/nora:pr-952
docker run --rm -p 4000:4000 ghcr.io/getnora-io/nora:pr-952 |
ertime037
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed reland of #947 (by @jgrund) —
mainrequires verified signatures and the original commits were unsigned, so this lands the reviewed diff as one web-flow-signed commit.Records the SHA-256 integrity pin as object metadata (
x-amz-meta-sha256/x-goog-meta-sha256) on the S3 and GCS backends, written atomically with the object so bytes are never stored unpinned;getre-verifies on read and fails closed on a mismatch. Raw uploads are validated against an RFC 9530Repr-Digestheader when present. Also adds a directvalidate_storage_key()at the top ofStorage::get()for defense in depth.Supersedes #951. Closes #947