| 1 |
// This file is @generated by prost-build. |
| 2 |
/// KindVersion contains the entry's kind and api version. |
| 3 |
#[derive( |
| 4 |
sigstore_protobuf_specs_derive::Deserialize_proto, |
| 5 |
sigstore_protobuf_specs_derive::Serialize_proto |
| 6 |
)] |
| 7 |
#[derive(::prost_reflect::ReflectMessage)] |
| 8 |
#[prost_reflect(message_name = "dev.sigstore.rekor.v1.KindVersion")] |
| 9 |
#[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] |
| 10 |
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 11 |
pub struct KindVersion { |
| 12 |
/// Kind is the type of entry being stored in the log. |
| 13 |
/// See here for a list: <https://github.com/sigstore/rekor/tree/main/pkg/types> |
| 14 |
#[prost(string, tag = "1")] |
| 15 |
pub kind: ::prost::alloc::string::String, |
| 16 |
/// The specific api version of the type. |
| 17 |
#[prost(string, tag = "2")] |
| 18 |
pub version: ::prost::alloc::string::String, |
| 19 |
} |
| 20 |
/// The checkpoint MUST contain an origin string as a unique log identifier, |
| 21 |
/// the tree size, and the root hash. It MAY also be followed by optional data, |
| 22 |
/// and clients MUST NOT assume optional data. The checkpoint MUST also contain |
| 23 |
/// a signature over the root hash (tree head). The checkpoint MAY contain additional |
| 24 |
/// signatures, but the first SHOULD be the signature from the log. Checkpoint contents |
| 25 |
/// are concatenated with newlines into a single string. |
| 26 |
/// The checkpoint format is described in |
| 27 |
/// <https://github.com/transparency-dev/formats/blob/main/log/README.md> |
| 28 |
/// and <https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md.> |
| 29 |
/// An example implementation can be found in <https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go> |
| 30 |
#[derive( |
| 31 |
sigstore_protobuf_specs_derive::Deserialize_proto, |
| 32 |
sigstore_protobuf_specs_derive::Serialize_proto |
| 33 |
)] |
| 34 |
#[derive(::prost_reflect::ReflectMessage)] |
| 35 |
#[prost_reflect(message_name = "dev.sigstore.rekor.v1.Checkpoint")] |
| 36 |
#[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] |
| 37 |
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 38 |
pub struct Checkpoint { |
| 39 |
#[prost(string, tag = "1")] |
| 40 |
pub envelope: ::prost::alloc::string::String, |
| 41 |
} |
| 42 |
/// InclusionProof is the proof returned from the transparency log. Can |
| 43 |
/// be used for offline or online verification against the log. |
| 44 |
#[derive( |
| 45 |
sigstore_protobuf_specs_derive::Deserialize_proto, |
| 46 |
sigstore_protobuf_specs_derive::Serialize_proto |
| 47 |
)] |
| 48 |
#[derive(::prost_reflect::ReflectMessage)] |
| 49 |
#[prost_reflect(message_name = "dev.sigstore.rekor.v1.InclusionProof")] |
| 50 |
#[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] |
| 51 |
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 52 |
pub struct InclusionProof { |
| 53 |
/// The index of the entry in the tree it was written to. |
| 54 |
#[prost(int64, tag = "1")] |
| 55 |
pub log_index: i64, |
| 56 |
/// The hash digest stored at the root of the merkle tree at the time |
| 57 |
/// the proof was generated. |
| 58 |
#[prost(bytes = "vec", tag = "2")] |
| 59 |
pub root_hash: ::prost::alloc::vec::Vec<u8>, |
| 60 |
/// The size of the merkle tree at the time the proof was generated. |
| 61 |
#[prost(int64, tag = "3")] |
| 62 |
pub tree_size: i64, |
| 63 |
/// A list of hashes required to compute the inclusion proof, sorted |
| 64 |
/// in order from leaf to root. |
| 65 |
/// Note that leaf and root hashes are not included. |
| 66 |
/// The root hash is available separately in this message, and the |
| 67 |
/// leaf hash should be calculated by the client. |
| 68 |
#[prost(bytes = "vec", repeated, tag = "4")] |
| 69 |
pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, |
| 70 |
/// Signature of the tree head, as of the time of this proof was |
| 71 |
/// generated. See above info on 'Checkpoint' for more details. |
| 72 |
#[prost(message, optional, tag = "5")] |
| 73 |
pub checkpoint: ::core::option::Option<Checkpoint>, |
| 74 |
} |
| 75 |
/// The inclusion promise is calculated by Rekor. It's calculated as a |
| 76 |
/// signature over a canonical JSON serialization of the persisted entry, the |
| 77 |
/// log ID, log index and the integration timestamp. |
| 78 |
/// See <https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/api/entries.go#L54> |
| 79 |
/// The format of the signature depends on the transparency log's public key. |
| 80 |
/// If the signature algorithm requires a hash function and/or a signature |
| 81 |
/// scheme (e.g. RSA) those has to be retrieved out-of-band from the log's |
| 82 |
/// operators, together with the public key. |
| 83 |
/// This is used to verify the integration timestamp's value and that the log |
| 84 |
/// has promised to include the entry. |
| 85 |
#[derive( |
| 86 |
sigstore_protobuf_specs_derive::Deserialize_proto, |
| 87 |
sigstore_protobuf_specs_derive::Serialize_proto |
| 88 |
)] |
| 89 |
#[derive(::prost_reflect::ReflectMessage)] |
| 90 |
#[prost_reflect(message_name = "dev.sigstore.rekor.v1.InclusionPromise")] |
| 91 |
#[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] |
| 92 |
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 93 |
pub struct InclusionPromise { |
| 94 |
#[prost(bytes = "vec", tag = "1")] |
| 95 |
pub signed_entry_timestamp: ::prost::alloc::vec::Vec<u8>, |
| 96 |
} |
| 97 |
/// TransparencyLogEntry captures all the details required from Rekor to |
| 98 |
/// reconstruct an entry, given that the payload is provided via other means. |
| 99 |
/// This type can easily be created from the existing response from Rekor. |
| 100 |
/// Future iterations could rely on Rekor returning the minimal set of |
| 101 |
/// attributes (excluding the payload) that are required for verifying the |
| 102 |
/// inclusion promise. The inclusion promise (called SignedEntryTimestamp in |
| 103 |
/// the response from Rekor) is similar to a Signed Certificate Timestamp |
| 104 |
/// as described here <https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.> |
| 105 |
#[derive( |
| 106 |
sigstore_protobuf_specs_derive::Deserialize_proto, |
| 107 |
sigstore_protobuf_specs_derive::Serialize_proto |
| 108 |
)] |
| 109 |
#[derive(::prost_reflect::ReflectMessage)] |
| 110 |
#[prost_reflect(message_name = "dev.sigstore.rekor.v1.TransparencyLogEntry")] |
| 111 |
#[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] |
| 112 |
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 113 |
pub struct TransparencyLogEntry { |
| 114 |
/// The global index of the entry, used when querying the log by index. |
| 115 |
#[prost(int64, tag = "1")] |
| 116 |
pub log_index: i64, |
| 117 |
/// The unique identifier of the log. |
| 118 |
#[prost(message, optional, tag = "2")] |
| 119 |
pub log_id: ::core::option::Option<super::super::common::v1::LogId>, |
| 120 |
/// The kind (type) and version of the object associated with this |
| 121 |
/// entry. These values are required to construct the entry during |
| 122 |
/// verification. |
| 123 |
#[prost(message, optional, tag = "3")] |
| 124 |
pub kind_version: ::core::option::Option<KindVersion>, |
| 125 |
/// The UNIX timestamp from the log when the entry was persisted. |
| 126 |
/// The integration time MUST NOT be trusted if inclusion_promise |
| 127 |
/// is omitted. |
| 128 |
#[prost(int64, tag = "4")] |
| 129 |
pub integrated_time: i64, |
| 130 |
/// The inclusion promise/signed entry timestamp from the log. |
| 131 |
/// Required for v0.1 bundles, and MUST be verified. |
| 132 |
/// Optional for >= v0.2 bundles if another suitable source of |
| 133 |
/// time is present (such as another source of signed time, |
| 134 |
/// or the current system time for long-lived certificates). |
| 135 |
/// MUST be verified if no other suitable source of time is present, |
| 136 |
/// and SHOULD be verified otherwise. |
| 137 |
#[prost(message, optional, tag = "5")] |
| 138 |
pub inclusion_promise: ::core::option::Option<InclusionPromise>, |
| 139 |
/// The inclusion proof can be used for offline or online verification |
| 140 |
/// that the entry was appended to the log, and that the log has not been |
| 141 |
/// altered. |
| 142 |
#[prost(message, optional, tag = "6")] |
| 143 |
pub inclusion_proof: ::core::option::Option<InclusionProof>, |
| 144 |
/// Optional. The canonicalized transparency log entry, used to |
| 145 |
/// reconstruct the Signed Entry Timestamp (SET) during verification. |
| 146 |
/// The contents of this field are the same as the `body` field in |
| 147 |
/// a Rekor response, meaning that it does **not** include the "full" |
| 148 |
/// canonicalized form (of log index, ID, etc.) which are |
| 149 |
/// exposed as separate fields. The verifier is responsible for |
| 150 |
/// combining the `canonicalized_body`, `log_index`, `log_id`, |
| 151 |
/// and `integrated_time` into the payload that the SET's signature |
| 152 |
/// is generated over. |
| 153 |
/// This field is intended to be used in cases where the SET cannot be |
| 154 |
/// produced determinisitically (e.g. inconsistent JSON field ordering, |
| 155 |
/// differing whitespace, etc). |
| 156 |
/// |
| 157 |
/// If set, clients MUST verify that the signature referenced in the |
| 158 |
/// `canonicalized_body` matches the signature provided in the |
| 159 |
/// `Bundle.content`. |
| 160 |
/// If not set, clients are responsible for constructing an equivalent |
| 161 |
/// payload from other sources to verify the signature. |
| 162 |
#[prost(bytes = "vec", tag = "7")] |
| 163 |
pub canonicalized_body: ::prost::alloc::vec::Vec<u8>, |
| 164 |
} |