2021-08-24 13:23:37 +00:00
|
|
|
// Copyright 2021 The Pigweed Authors
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
|
// use this file except in compliance with the License. You may obtain a copy of
|
|
|
|
// the License at
|
|
|
|
//
|
|
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing permissions and limitations under
|
|
|
|
// the License.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-09-23 07:24:14 +00:00
|
|
|
package pw.software_update;
|
2021-08-24 13:23:37 +00:00
|
|
|
|
2021-08-25 23:10:28 +00:00
|
|
|
import "pw_software_update/tuf.proto";
|
2021-08-24 13:23:37 +00:00
|
|
|
|
|
|
|
message UpdateBundle {
|
2021-08-28 19:04:47 +00:00
|
|
|
// NOTE/TODO: SignedRootMetadata is not currently included as part of the
|
|
|
|
// UpdateBundle. Updating of the root metdata needs to be handled in a
|
|
|
|
// separate project-specific process. A standard upstream process can be added
|
|
|
|
// in the future.
|
2021-08-24 13:23:37 +00:00
|
|
|
|
2021-09-09 01:32:53 +00:00
|
|
|
// The timestamp role is used for freshness check of the snapshot. Any
|
|
|
|
// project-specific update metadata should go in the top-level
|
|
|
|
// targets_metadata or with the TargetFile information
|
2021-08-28 19:04:47 +00:00
|
|
|
optional SignedTimestampMetadata timestamp_metadata = 1;
|
2021-09-09 01:32:53 +00:00
|
|
|
|
|
|
|
// The snapshot role is used to ensure that the collection of targets_metadata
|
|
|
|
// files is securely consistent (no target metadata mix and match). Any
|
|
|
|
// project-specific update metadata should go in the top-level
|
|
|
|
// targets_metadata or with the TargetFile information
|
2021-08-28 19:04:47 +00:00
|
|
|
optional SignedSnapshotMetadata snapshot_metadata = 2;
|
|
|
|
|
|
|
|
// Map of target metadata name to target metadata.
|
|
|
|
// Target metadata name can be an arbitrary name or a path that describes
|
|
|
|
// where the file lives relative to the base directory of the repository, as
|
|
|
|
// described in the snapshot metadata. e.g. "path/to/target/0".
|
2021-09-09 01:32:53 +00:00
|
|
|
map<string, SignedTargetsMetadata> targets_metadata = 3;
|
2021-08-28 19:04:47 +00:00
|
|
|
|
|
|
|
// Map of target file name to target payload bytes.
|
|
|
|
// Target file name can be an arbitrary name or a path that describes where
|
|
|
|
// the file lives relative to the base directory of the repository, as
|
|
|
|
// described in the target metadata. e.g. "path/to/amber_tools/0".
|
|
|
|
map<string, bytes> target_payloads = 4;
|
2021-08-24 13:23:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Update bundle metadata
|
|
|
|
// Designed to inform the update server what the device currently has in-place.
|
|
|
|
message Manifest {
|
2021-08-28 19:04:47 +00:00
|
|
|
map<string, TargetsMetadata> targets_metadata = 2;
|
2021-08-24 13:23:37 +00:00
|
|
|
}
|