Add UUID to manifest and verify integrity before decompression
- Add UUID field to both inner and outer manifest messages - Generate random v4 UUID when creating manifest - Hash compressed data (not uncompressed) for integrity check - Verify hash before decompression to prevent malicious payloads - Validate UUIDs are proper format and match between inner/outer - Sign string format: MAGIC-UUID-MULTIHASH
This commit is contained in:
@@ -28,6 +28,9 @@ message MFFileOuter {
|
||||
int64 size = 103;
|
||||
bytes sha256 = 104;
|
||||
|
||||
// uuid must match the uuid in the inner message
|
||||
bytes uuid = 105;
|
||||
|
||||
bytes innerMessage = 199;
|
||||
// 2xx for optional manifest root attributes
|
||||
// think we might use gosignify instead of gpg:
|
||||
@@ -72,6 +75,10 @@ message MFFile {
|
||||
// required manifest attributes:
|
||||
repeated MFFilePath files = 101;
|
||||
|
||||
// uuid is a random v4 UUID generated when creating the manifest
|
||||
// used as part of the signature to prevent replay attacks
|
||||
bytes uuid = 102;
|
||||
|
||||
// optional manifest attributes 2xx:
|
||||
optional Timestamp createdAt = 201;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user