From 0d87698ed9c0aa8033144983d349da8a31eaba0c Mon Sep 17 00:00:00 2001 From: Tigran Najaryan Date: Wed, 2 Mar 2022 12:32:14 -0500 Subject: [PATCH] Define that DownloadFile content hash method is SHA256 Resolves https://github.com/open-telemetry/opamp-spec/issues/67 Without specifying the hashing method it was useless for the purposes it claims to exist for >The hash of the file content. Can be used by the Agent to verify that the file was downloaded correctly. You can't verify that the hash matches the content if you don't know the hashing method. Now it is precisely defined to be SHA256 of the content. --- specification.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification.md b/specification.md index cd41e38..6d6198f 100644 --- a/specification.md +++ b/specification.md @@ -1851,7 +1851,7 @@ There are 3 levels of hashes:

File Hash

-The hash of the addon file content. This is stored in the [hash](#hash) field in +The hash of the addon file content. This is stored in the [content_sha256](#content_sha256) field in the [DownloadableFile](#downloadablefile-message) message. This value SHOULD be used by the Agent to determine if the particular file it has is different on the Server and needs to be re-downloaded. @@ -1963,7 +1963,7 @@ The message has the following structure: ```protobuf message DownloadableFile { string download_url = 1; - bytes content_hash = 2; + bytes content_sha256 = 2; } ``` @@ -1973,9 +1973,9 @@ The URL from which the file can be downloaded using HTTP GET request. The server at the specified URL SHOULD support range requests to allow for resuming downloads. -

content_hash

+

content_sha256

-The hash of the file content. Can be used by the Agent to verify that the file +The SHA256 hash of the file content. Can be used by the Agent to verify that the file was downloaded correctly.

Agent Package Updates