Debian Codegraph @

googleapis/grafeas/v1/attestation.pb.go

raw
1 // Copyright 2019 The Grafeas Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.26.0
18 // protoc v3.13.0
19 // source: grafeas/v1/attestation.proto
20
21 package grafeas
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38 // Note kind that represents a logical attestation "role" or "authority". For
39 // example, an organization might have one `Authority` for "QA" and one for
40 // "build". This note is intended to act strictly as a grouping mechanism for
41 // the attached occurrences (Attestations). This grouping mechanism also
42 // provides a security boundary, since IAM ACLs gate the ability for a principle
43 // to attach an occurrence to a given note. It also provides a single point of
44 // lookup to find all attached attestation occurrences, even if they don't all
45 // live in the same project.
46 type AttestationNote struct {
47 state protoimpl.MessageState
48 sizeCache protoimpl.SizeCache
49 unknownFields protoimpl.UnknownFields
50
51 // Hint hints at the purpose of the attestation authority.
52 Hint *AttestationNote_Hint `protobuf:"bytes,1,opt,name=hint,proto3" json:"hint,omitempty"`
53 }
54
55 func (x *AttestationNote) Reset() {
56 *x = AttestationNote{}
57 if protoimpl.UnsafeEnabled {
58 mi := &file_grafeas_v1_attestation_proto_msgTypes[0]
59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
60 ms.StoreMessageInfo(mi)
61 }
62 }
63
64 func (x *AttestationNote) String() string {
65 return protoimpl.X.MessageStringOf(x)
66 }
67
68 func (*AttestationNote) ProtoMessage() {}
69
70 func (x *AttestationNote) ProtoReflect() protoreflect.Message {
71 mi := &file_grafeas_v1_attestation_proto_msgTypes[0]
72 if protoimpl.UnsafeEnabled && x != nil {
73 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
74 if ms.LoadMessageInfo() == nil {
75 ms.StoreMessageInfo(mi)
76 }
77 return ms
78 }
79 return mi.MessageOf(x)
80 }
81
82 // Deprecated: Use AttestationNote.ProtoReflect.Descriptor instead.
83 func (*AttestationNote) Descriptor() ([]byte, []int) {
84 return file_grafeas_v1_attestation_proto_rawDescGZIP(), []int{0}
85 }
86
87 func (x *AttestationNote) GetHint() *AttestationNote_Hint {
88 if x != nil {
89 return x.Hint
90 }
91 return nil
92 }
93
94 type Jwt struct {
95 state protoimpl.MessageState
96 sizeCache protoimpl.SizeCache
97 unknownFields protoimpl.UnknownFields
98
99 // The compact encoding of a JWS, which is always three base64 encoded strings
100 // joined by periods. For details, see:
101 // https://tools.ietf.org/html/rfc7515.html#section-3.1
102 CompactJwt string `protobuf:"bytes,1,opt,name=compact_jwt,json=compactJwt,proto3" json:"compact_jwt,omitempty"`
103 }
104
105 func (x *Jwt) Reset() {
106 *x = Jwt{}
107 if protoimpl.UnsafeEnabled {
108 mi := &file_grafeas_v1_attestation_proto_msgTypes[1]
109 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
110 ms.StoreMessageInfo(mi)
111 }
112 }
113
114 func (x *Jwt) String() string {
115 return protoimpl.X.MessageStringOf(x)
116 }
117
118 func (*Jwt) ProtoMessage() {}
119
120 func (x *Jwt) ProtoReflect() protoreflect.Message {
121 mi := &file_grafeas_v1_attestation_proto_msgTypes[1]
122 if protoimpl.UnsafeEnabled && x != nil {
123 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
124 if ms.LoadMessageInfo() == nil {
125 ms.StoreMessageInfo(mi)
126 }
127 return ms
128 }
129 return mi.MessageOf(x)
130 }
131
132 // Deprecated: Use Jwt.ProtoReflect.Descriptor instead.
133 func (*Jwt) Descriptor() ([]byte, []int) {
134 return file_grafeas_v1_attestation_proto_rawDescGZIP(), []int{1}
135 }
136
137 func (x *Jwt) GetCompactJwt() string {
138 if x != nil {
139 return x.CompactJwt
140 }
141 return ""
142 }
143
144 // Occurrence that represents a single "attestation". The authenticity of an
145 // attestation can be verified using the attached signature. If the verifier
146 // trusts the public key of the signer, then verifying the signature is
147 // sufficient to establish trust. In this circumstance, the authority to which
148 // this attestation is attached is primarily useful for lookup (how to find
149 // this attestation if you already know the authority and artifact to be
150 // verified) and intent (for which authority this attestation was intended to
151 // sign.
152 type AttestationOccurrence struct {
153 state protoimpl.MessageState
154 sizeCache protoimpl.SizeCache
155 unknownFields protoimpl.UnknownFields
156
157 // Required. The serialized payload that is verified by one or more
158 // `signatures`.
159 SerializedPayload []byte `protobuf:"bytes,1,opt,name=serialized_payload,json=serializedPayload,proto3" json:"serialized_payload,omitempty"`
160 // One or more signatures over `serialized_payload`. Verifier implementations
161 // should consider this attestation message verified if at least one
162 // `signature` verifies `serialized_payload`. See `Signature` in common.proto
163 // for more details on signature structure and verification.
164 Signatures []*Signature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
165 // One or more JWTs encoding a self-contained attestation.
166 // Each JWT encodes the payload that it verifies within the JWT itself.
167 // Verifier implementation SHOULD ignore the `serialized_payload` field
168 // when verifying these JWTs.
169 // If only JWTs are present on this AttestationOccurrence, then the
170 // `serialized_payload` SHOULD be left empty.
171 // Each JWT SHOULD encode a claim specific to the `resource_uri` of this
172 // Occurrence, but this is not validated by Grafeas metadata API
173 // implementations. The JWT itself is opaque to Grafeas.
174 Jwts []*Jwt `protobuf:"bytes,3,rep,name=jwts,proto3" json:"jwts,omitempty"`
175 }
176
177 func (x *AttestationOccurrence) Reset() {
178 *x = AttestationOccurrence{}
179 if protoimpl.UnsafeEnabled {
180 mi := &file_grafeas_v1_attestation_proto_msgTypes[2]
181 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
182 ms.StoreMessageInfo(mi)
183 }
184 }
185
186 func (x *AttestationOccurrence) String() string {
187 return protoimpl.X.MessageStringOf(x)
188 }
189
190 func (*AttestationOccurrence) ProtoMessage() {}
191
192 func (x *AttestationOccurrence) ProtoReflect() protoreflect.Message {
193 mi := &file_grafeas_v1_attestation_proto_msgTypes[2]
194 if protoimpl.UnsafeEnabled && x != nil {
195 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
196 if ms.LoadMessageInfo() == nil {
197 ms.StoreMessageInfo(mi)
198 }
199 return ms
200 }
201 return mi.MessageOf(x)
202 }
203
204 // Deprecated: Use AttestationOccurrence.ProtoReflect.Descriptor instead.
205 func (*AttestationOccurrence) Descriptor() ([]byte, []int) {
206 return file_grafeas_v1_attestation_proto_rawDescGZIP(), []int{2}
207 }
208
209 func (x *AttestationOccurrence) GetSerializedPayload() []byte {
210 if x != nil {
211 return x.SerializedPayload
212 }
213 return nil
214 }
215
216 func (x *AttestationOccurrence) GetSignatures() []*Signature {
217 if x != nil {
218 return x.Signatures
219 }
220 return nil
221 }
222
223 func (x *AttestationOccurrence) GetJwts() []*Jwt {
224 if x != nil {
225 return x.Jwts
226 }
227 return nil
228 }
229
230 // This submessage provides human-readable hints about the purpose of the
231 // authority. Because the name of a note acts as its resource reference, it is
232 // important to disambiguate the canonical name of the Note (which might be a
233 // UUID for security purposes) from "readable" names more suitable for debug
234 // output. Note that these hints should not be used to look up authorities in
235 // security sensitive contexts, such as when looking up attestations to
236 // verify.
237 type AttestationNote_Hint struct {
238 state protoimpl.MessageState
239 sizeCache protoimpl.SizeCache
240 unknownFields protoimpl.UnknownFields
241
242 // Required. The human readable name of this attestation authority, for
243 // example "qa".
244 HumanReadableName string `protobuf:"bytes,1,opt,name=human_readable_name,json=humanReadableName,proto3" json:"human_readable_name,omitempty"`
245 }
246
247 func (x *AttestationNote_Hint) Reset() {
248 *x = AttestationNote_Hint{}
249 if protoimpl.UnsafeEnabled {
250 mi := &file_grafeas_v1_attestation_proto_msgTypes[3]
251 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
252 ms.StoreMessageInfo(mi)
253 }
254 }
255
256 func (x *AttestationNote_Hint) String() string {
257 return protoimpl.X.MessageStringOf(x)
258 }
259
260 func (*AttestationNote_Hint) ProtoMessage() {}
261
262 func (x *AttestationNote_Hint) ProtoReflect() protoreflect.Message {
263 mi := &file_grafeas_v1_attestation_proto_msgTypes[3]
264 if protoimpl.UnsafeEnabled && x != nil {
265 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
266 if ms.LoadMessageInfo() == nil {
267 ms.StoreMessageInfo(mi)
268 }
269 return ms
270 }
271 return mi.MessageOf(x)
272 }
273
274 // Deprecated: Use AttestationNote_Hint.ProtoReflect.Descriptor instead.
275 func (*AttestationNote_Hint) Descriptor() ([]byte, []int) {
276 return file_grafeas_v1_attestation_proto_rawDescGZIP(), []int{0, 0}
277 }
278
279 func (x *AttestationNote_Hint) GetHumanReadableName() string {
280 if x != nil {
281 return x.HumanReadableName
282 }
283 return ""
284 }
285
286 var File_grafeas_v1_attestation_proto protoreflect.FileDescriptor
287
288 var file_grafeas_v1_attestation_proto_rawDesc = []byte{
289 0x0a, 0x1c, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74,
290 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a,
291 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x67, 0x72, 0x61, 0x66,
292 0x65, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
293 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
294 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x01,
295 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0x2e, 0x76,
296 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74,
297 0x65, 0x2e, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x1a, 0x36, 0x0a, 0x04,
298 0x48, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x65,
299 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
300 0x09, 0x52, 0x11, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65,
301 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x26, 0x0a, 0x03, 0x4a, 0x77, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63,
302 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x5f, 0x6a, 0x77, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
303 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x4a, 0x77, 0x74, 0x22, 0xa2, 0x01, 0x0a,
304 0x15, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x63, 0x63, 0x75,
305 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c,
306 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01,
307 0x28, 0x0c, 0x52, 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x61,
308 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
309 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x61, 0x66,
310 0x65, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
311 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x04,
312 0x6a, 0x77, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x72, 0x61,
313 0x66, 0x65, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x04, 0x6a, 0x77, 0x74,
314 0x73, 0x42, 0x51, 0x0a, 0x0d, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0x2e,
315 0x76, 0x31, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c,
316 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
317 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x72, 0x61, 0x66,
318 0x65, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0xa2, 0x02,
319 0x03, 0x47, 0x52, 0x41, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
320 }
321
322 var (
323 file_grafeas_v1_attestation_proto_rawDescOnce sync.Once
324 file_grafeas_v1_attestation_proto_rawDescData = file_grafeas_v1_attestation_proto_rawDesc
325 )
326
327 func file_grafeas_v1_attestation_proto_rawDescGZIP() []byte {
328 file_grafeas_v1_attestation_proto_rawDescOnce.Do(func() {
329 file_grafeas_v1_attestation_proto_rawDescData = protoimpl.X.CompressGZIP(file_grafeas_v1_attestation_proto_rawDescData)
330 })
331 return file_grafeas_v1_attestation_proto_rawDescData
332 }
333
334 var file_grafeas_v1_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
335 var file_grafeas_v1_attestation_proto_goTypes = []interface{}{
336 (*AttestationNote)(nil), // 0: grafeas.v1.AttestationNote
337 (*Jwt)(nil), // 1: grafeas.v1.Jwt
338 (*AttestationOccurrence)(nil), // 2: grafeas.v1.AttestationOccurrence
339 (*AttestationNote_Hint)(nil), // 3: grafeas.v1.AttestationNote.Hint
340 (*Signature)(nil), // 4: grafeas.v1.Signature
341 }
342 var file_grafeas_v1_attestation_proto_depIdxs = []int32{
343 3, // 0: grafeas.v1.AttestationNote.hint:type_name -> grafeas.v1.AttestationNote.Hint
344 4, // 1: grafeas.v1.AttestationOccurrence.signatures:type_name -> grafeas.v1.Signature
345 1, // 2: grafeas.v1.AttestationOccurrence.jwts:type_name -> grafeas.v1.Jwt
346 3, // [3:3] is the sub-list for method output_type
347 3, // [3:3] is the sub-list for method input_type
348 3, // [3:3] is the sub-list for extension type_name
349 3, // [3:3] is the sub-list for extension extendee
350 0, // [0:3] is the sub-list for field type_name
351 }
352
353 func init() { file_grafeas_v1_attestation_proto_init() }
354 func file_grafeas_v1_attestation_proto_init() {
355 if File_grafeas_v1_attestation_proto != nil {
356 return
357 }
358 file_grafeas_v1_common_proto_init()
359 if !protoimpl.UnsafeEnabled {
360 file_grafeas_v1_attestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
361 switch v := v.(*AttestationNote); i {
362 case 0:
363 return &v.state
364 case 1:
365 return &v.sizeCache
366 case 2:
367 return &v.unknownFields
368 default:
369 return nil
370 }
371 }
372 file_grafeas_v1_attestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
373 switch v := v.(*Jwt); i {
374 case 0:
375 return &v.state
376 case 1:
377 return &v.sizeCache
378 case 2:
379 return &v.unknownFields
380 default:
381 return nil
382 }
383 }
384 file_grafeas_v1_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
385 switch v := v.(*AttestationOccurrence); i {
386 case 0:
387 return &v.state
388 case 1:
389 return &v.sizeCache
390 case 2:
391 return &v.unknownFields
392 default:
393 return nil
394 }
395 }
396 file_grafeas_v1_attestation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
397 switch v := v.(*AttestationNote_Hint); i {
398 case 0:
399 return &v.state
400 case 1:
401 return &v.sizeCache
402 case 2:
403 return &v.unknownFields
404 default:
405 return nil
406 }
407 }
408 }
409 type x struct{}
410 out := protoimpl.TypeBuilder{
411 File: protoimpl.DescBuilder{
412 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
413 RawDescriptor: file_grafeas_v1_attestation_proto_rawDesc,
414 NumEnums: 0,
415 NumMessages: 4,
416 NumExtensions: 0,
417 NumServices: 0,
418 },
419 GoTypes: file_grafeas_v1_attestation_proto_goTypes,
420 DependencyIndexes: file_grafeas_v1_attestation_proto_depIdxs,
421 MessageInfos: file_grafeas_v1_attestation_proto_msgTypes,
422 }.Build()
423 File_grafeas_v1_attestation_proto = out.File
424 file_grafeas_v1_attestation_proto_rawDesc = nil
425 file_grafeas_v1_attestation_proto_goTypes = nil
426 file_grafeas_v1_attestation_proto_depIdxs = nil
427 }