Skip to content

Commit

Permalink
remote_asset: link digest_function & checksum qual
Browse files Browse the repository at this point in the history
Ensure that the digest function in requests is consistent with the
digest function used in `checksum.sri` qualifier, this way server
implementations do not have to support replicating blob from one digest
function to another.

Such functionality is not the intended use case of Remote Asset APIs
and, instead, could be achieved via a different client-side API call.
  • Loading branch information
sluongng committed Apr 18, 2024
1 parent 1f36c31 commit b4676dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/bazel/remote/asset/v1/remote_asset.proto
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ message FetchBlobRequest {
// The digest function the server must use to compute the digest.
//
// If unset, the server SHOULD default to SHA256.
// If set, the function MUST be the same with the digest function used in
// "checksum.sri", the subresource integrity qualifier.
build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 6;
}

Expand Down Expand Up @@ -300,6 +302,8 @@ message FetchDirectoryRequest {
// The digest function the server must use to compute the digest.
//
// If unset, the server SHOULD default to SHA256.
// If set, the function MUST be the same with the digest function used in
// "checksum.sri", the subresource integrity qualifier.
build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 6;
}

Expand Down Expand Up @@ -438,6 +442,9 @@ message PushBlobRequest {
// that case the server SHOULD infer the digest function using the
// length of the action digest hash and the digest functions announced
// in the server's capabilities.
//
// If set, the function MUST be the same with the digest function used in
// "checksum.sri", the subresource integrity qualifier.
build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 8;
}

Expand Down Expand Up @@ -487,6 +494,9 @@ message PushDirectoryRequest {
// that case the server SHOULD infer the digest function using the
// length of the action digest hash and the digest functions announced
// in the server's capabilities.
//
// If set, the function MUST be the same with the digest function used in
// "checksum.sri", the subresource integrity qualifier.
build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 8;
}

Expand Down

0 comments on commit b4676dd

Please sign in to comment.