Debian Codegraph @

gen/pb-rust/sigstore-protobuf-specs/src/generated/dev.sigstore.verification.v1.rs

raw
1 // This file is @generated by prost-build.
2 /// The identity of a X.509 Certificate signer.
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.verification.v1.CertificateIdentity")]
9 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
10 #[derive(Clone, PartialEq, ::prost::Message)]
11 pub struct CertificateIdentity {
12 /// The X.509v3 issuer extension (OID 1.3.6.1.4.1.57264.1.1)
13 #[prost(string, tag = "1")]
14 pub issuer: ::prost::alloc::string::String,
15 #[prost(message, optional, tag = "2")]
16 pub san: ::core::option::Option<super::super::common::v1::SubjectAlternativeName>,
17 /// An unordered list of OIDs that must be verified.
18 /// All OID/values provided in this list MUST exactly match against
19 /// the values in the certificate for verification to be successful.
20 #[prost(message, repeated, tag = "3")]
21 pub oids: ::prost::alloc::vec::Vec<
22 super::super::common::v1::ObjectIdentifierValuePair,
23 >,
24 }
25 #[derive(
26 sigstore_protobuf_specs_derive::Deserialize_proto,
27 sigstore_protobuf_specs_derive::Serialize_proto
28 )]
29 #[derive(::prost_reflect::ReflectMessage)]
30 #[prost_reflect(message_name = "dev.sigstore.verification.v1.CertificateIdentities")]
31 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
32 #[derive(Clone, PartialEq, ::prost::Message)]
33 pub struct CertificateIdentities {
34 #[prost(message, repeated, tag = "1")]
35 pub identities: ::prost::alloc::vec::Vec<CertificateIdentity>,
36 }
37 #[derive(
38 sigstore_protobuf_specs_derive::Deserialize_proto,
39 sigstore_protobuf_specs_derive::Serialize_proto
40 )]
41 #[derive(::prost_reflect::ReflectMessage)]
42 #[prost_reflect(message_name = "dev.sigstore.verification.v1.PublicKeyIdentities")]
43 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
44 #[derive(Clone, PartialEq, ::prost::Message)]
45 pub struct PublicKeyIdentities {
46 #[prost(message, repeated, tag = "1")]
47 pub public_keys: ::prost::alloc::vec::Vec<super::super::common::v1::PublicKey>,
48 }
49 /// A light-weight set of options/policies for identifying trusted signers,
50 /// used during verification of a single artifact.
51 #[derive(
52 sigstore_protobuf_specs_derive::Deserialize_proto,
53 sigstore_protobuf_specs_derive::Serialize_proto
54 )]
55 #[derive(::prost_reflect::ReflectMessage)]
56 #[prost_reflect(
57 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions"
58 )]
59 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
60 #[derive(Clone, PartialEq, ::prost::Message)]
61 pub struct ArtifactVerificationOptions {
62 /// Optional options for artifact transparency log verification.
63 /// If none is provided, the default verification options are:
64 /// Threshold: 1
65 /// Online verification: false
66 /// Disable: false
67 #[prost(message, optional, tag = "3")]
68 pub tlog_options: ::core::option::Option<artifact_verification_options::TlogOptions>,
69 /// Optional options for certificate transparency log verification.
70 /// If none is provided, the default verification options are:
71 /// Threshold: 1
72 /// Disable: false
73 #[prost(message, optional, tag = "4")]
74 pub ctlog_options: ::core::option::Option<
75 artifact_verification_options::CtlogOptions,
76 >,
77 /// Optional options for certificate signed timestamp verification.
78 /// If none is provided, the default verification options are:
79 /// Threshold: 0
80 /// Disable: true
81 #[prost(message, optional, tag = "5")]
82 pub tsa_options: ::core::option::Option<
83 artifact_verification_options::TimestampAuthorityOptions,
84 >,
85 /// Optional options for integrated timestamp verification.
86 /// If none is provided, the default verification options are:
87 /// Threshold: 0
88 /// Disable: true
89 #[prost(message, optional, tag = "6")]
90 pub integrated_ts_options: ::core::option::Option<
91 artifact_verification_options::TlogIntegratedTimestampOptions,
92 >,
93 /// Optional options for observed timestamp verification.
94 /// If none is provided, the default verification options are:
95 /// Threshold 1
96 /// Disable: false
97 #[prost(message, optional, tag = "7")]
98 pub observer_options: ::core::option::Option<
99 artifact_verification_options::ObserverTimestampOptions,
100 >,
101 /// At least one identity MUST be provided. Providing zero identities
102 /// is an error. If at least one provided identity is found as a
103 /// signer, the verification is considered successful.
104 #[prost(oneof = "artifact_verification_options::Signers", tags = "1, 2")]
105 pub signers: ::core::option::Option<artifact_verification_options::Signers>,
106 }
107 /// Nested message and enum types in `ArtifactVerificationOptions`.
108 pub mod artifact_verification_options {
109 #[derive(
110 sigstore_protobuf_specs_derive::Deserialize_proto,
111 sigstore_protobuf_specs_derive::Serialize_proto
112 )]
113 #[derive(::prost_reflect::ReflectMessage)]
114 #[prost_reflect(
115 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions.TlogOptions"
116 )]
117 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
118 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
119 pub struct TlogOptions {
120 /// Number of transparency logs the entry must appear on.
121 #[prost(int32, tag = "1")]
122 pub threshold: i32,
123 /// Perform an online inclusion proof.
124 #[prost(bool, tag = "2")]
125 pub perform_online_verification: bool,
126 /// Disable verification for transparency logs.
127 #[prost(bool, tag = "3")]
128 pub disable: bool,
129 }
130 #[derive(
131 sigstore_protobuf_specs_derive::Deserialize_proto,
132 sigstore_protobuf_specs_derive::Serialize_proto
133 )]
134 #[derive(::prost_reflect::ReflectMessage)]
135 #[prost_reflect(
136 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions.CtlogOptions"
137 )]
138 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
139 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
140 pub struct CtlogOptions {
141 /// The number of ct transparency logs the certificate must
142 /// appear on.
143 #[prost(int32, tag = "1")]
144 pub threshold: i32,
145 /// Disable ct transparency log verification
146 #[prost(bool, tag = "3")]
147 pub disable: bool,
148 }
149 #[derive(
150 sigstore_protobuf_specs_derive::Deserialize_proto,
151 sigstore_protobuf_specs_derive::Serialize_proto
152 )]
153 #[derive(::prost_reflect::ReflectMessage)]
154 #[prost_reflect(
155 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions.TimestampAuthorityOptions"
156 )]
157 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
158 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
159 pub struct TimestampAuthorityOptions {
160 /// The number of signed timestamps that are expected.
161 #[prost(int32, tag = "1")]
162 pub threshold: i32,
163 /// Disable signed timestamp verification.
164 #[prost(bool, tag = "2")]
165 pub disable: bool,
166 }
167 #[derive(
168 sigstore_protobuf_specs_derive::Deserialize_proto,
169 sigstore_protobuf_specs_derive::Serialize_proto
170 )]
171 #[derive(::prost_reflect::ReflectMessage)]
172 #[prost_reflect(
173 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions.TlogIntegratedTimestampOptions"
174 )]
175 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
176 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
177 pub struct TlogIntegratedTimestampOptions {
178 /// The number of integrated timestamps that are expected.
179 #[prost(int32, tag = "1")]
180 pub threshold: i32,
181 /// Disable integrated timestamp verification.
182 #[prost(bool, tag = "2")]
183 pub disable: bool,
184 }
185 #[derive(
186 sigstore_protobuf_specs_derive::Deserialize_proto,
187 sigstore_protobuf_specs_derive::Serialize_proto
188 )]
189 #[derive(::prost_reflect::ReflectMessage)]
190 #[prost_reflect(
191 message_name = "dev.sigstore.verification.v1.ArtifactVerificationOptions.ObserverTimestampOptions"
192 )]
193 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
194 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
195 pub struct ObserverTimestampOptions {
196 /// The number of external observers of the timestamp.
197 /// This is a union of RFC3161 signed timestamps, and
198 /// integrated timestamps from a transparency log, that
199 /// could include additional timestamp sources in the
200 /// future.
201 #[prost(int32, tag = "1")]
202 pub threshold: i32,
203 /// Disable observer timestamp verification.
204 #[prost(bool, tag = "2")]
205 pub disable: bool,
206 }
207 /// At least one identity MUST be provided. Providing zero identities
208 /// is an error. If at least one provided identity is found as a
209 /// signer, the verification is considered successful.
210 #[derive(
211 sigstore_protobuf_specs_derive::Deserialize_proto,
212 sigstore_protobuf_specs_derive::Serialize_proto
213 )]
214 #[derive(Clone, PartialEq, ::prost::Oneof)]
215 pub enum Signers {
216 #[prost(message, tag = "1")]
217 CertificateIdentities(super::CertificateIdentities),
218 /// To simplify verification implementation, the logic for
219 /// bundle verification should be implemented as a
220 /// higher-order function, where one of argument should be an
221 /// interface over the set of trusted public keys, like this:
222 /// `Verify(bytes artifact, bytes signature, string key_id)`.
223 /// This way the caller is in full control of mapping the
224 /// identified (or hinted) key in the bundle to one of the
225 /// trusted keys, as this process is inherently application
226 /// specific.
227 #[prost(message, tag = "2")]
228 PublicKeys(super::PublicKeyIdentities),
229 }
230 }
231 #[derive(
232 sigstore_protobuf_specs_derive::Deserialize_proto,
233 sigstore_protobuf_specs_derive::Serialize_proto
234 )]
235 #[derive(::prost_reflect::ReflectMessage)]
236 #[prost_reflect(message_name = "dev.sigstore.verification.v1.Artifact")]
237 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
238 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
239 pub struct Artifact {
240 #[prost(oneof = "artifact::Data", tags = "1, 2, 3")]
241 pub data: ::core::option::Option<artifact::Data>,
242 }
243 /// Nested message and enum types in `Artifact`.
244 pub mod artifact {
245 #[derive(
246 sigstore_protobuf_specs_derive::Deserialize_proto,
247 sigstore_protobuf_specs_derive::Serialize_proto
248 )]
249 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
250 pub enum Data {
251 /// Location of the artifact
252 #[prost(string, tag = "1")]
253 ArtifactUri(::prost::alloc::string::String),
254 /// The raw bytes of the artifact
255 #[prost(bytes, tag = "2")]
256 Artifact(::prost::alloc::vec::Vec<u8>),
257 /// Digest of the artifact. SHOULD NOT be used when verifying an
258 /// in-toto attestation as the subject digest cannot be
259 /// reconstructed. This option will not work with Ed25519
260 /// signatures, use Ed25519Ph or another algorithm instead.
261 #[prost(message, tag = "3")]
262 ArtifactDigest(super::super::super::common::v1::HashOutput),
263 }
264 }
265 /// Input captures all that is needed to call the bundle verification method,
266 /// to verify a single artifact referenced by the bundle.
267 #[derive(
268 sigstore_protobuf_specs_derive::Deserialize_proto,
269 sigstore_protobuf_specs_derive::Serialize_proto
270 )]
271 #[derive(::prost_reflect::ReflectMessage)]
272 #[prost_reflect(message_name = "dev.sigstore.verification.v1.Input")]
273 #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")]
274 #[derive(Clone, PartialEq, ::prost::Message)]
275 pub struct Input {
276 /// The verification materials provided during a bundle verification.
277 /// The running process is usually preloaded with a "global"
278 /// dev.sisgtore.trustroot.TrustedRoot.v1 instance. Prior to
279 /// verifying an artifact (i.e a bundle), and/or based on current
280 /// policy, some selection is expected to happen, to filter out the
281 /// exact certificate authority to use, which transparency logs are
282 /// relevant etc. The result should b ecaptured in the
283 /// `artifact_trust_root`.
284 #[prost(message, optional, tag = "1")]
285 pub artifact_trust_root: ::core::option::Option<
286 super::super::trustroot::v1::TrustedRoot,
287 >,
288 #[prost(message, optional, tag = "2")]
289 pub artifact_verification_options: ::core::option::Option<
290 ArtifactVerificationOptions,
291 >,
292 #[prost(message, optional, tag = "3")]
293 pub bundle: ::core::option::Option<super::super::bundle::v1::Bundle>,
294 /// If the bundle contains a message signature, the artifact must be
295 /// provided.
296 #[prost(message, optional, tag = "4")]
297 pub artifact: ::core::option::Option<Artifact>,
298 }