-
Notifications
You must be signed in to change notification settings - Fork 14
/
attest.pb.go
1833 lines (1611 loc) · 71.3 KB
/
attest.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright(c) 2020 Zededa, Inc.
// All rights reserved.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.23.4
// source: attest/attest.proto
package attest
import (
certs "github.com/lf-edge/eve-api/go/certs"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ZAttestReqType int32
const (
ZAttestReqType_ATTEST_REQ_NONE ZAttestReqType = 0
ZAttestReqType_ATTEST_REQ_CERT ZAttestReqType = 1 //EVE X.509 certificates
ZAttestReqType_ATTEST_REQ_NONCE ZAttestReqType = 2 //nonce request to Controller
ZAttestReqType_ATTEST_REQ_QUOTE ZAttestReqType = 3 //quote msg
ZAttestReqType_Z_ATTEST_REQ_TYPE_STORE_KEYS ZAttestReqType = 4 //to store device keys in Controller
)
// Enum value maps for ZAttestReqType.
var (
ZAttestReqType_name = map[int32]string{
0: "ATTEST_REQ_NONE",
1: "ATTEST_REQ_CERT",
2: "ATTEST_REQ_NONCE",
3: "ATTEST_REQ_QUOTE",
4: "Z_ATTEST_REQ_TYPE_STORE_KEYS",
}
ZAttestReqType_value = map[string]int32{
"ATTEST_REQ_NONE": 0,
"ATTEST_REQ_CERT": 1,
"ATTEST_REQ_NONCE": 2,
"ATTEST_REQ_QUOTE": 3,
"Z_ATTEST_REQ_TYPE_STORE_KEYS": 4,
}
)
func (x ZAttestReqType) Enum() *ZAttestReqType {
p := new(ZAttestReqType)
*p = x
return p
}
func (x ZAttestReqType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ZAttestReqType) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[0].Descriptor()
}
func (ZAttestReqType) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[0]
}
func (x ZAttestReqType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ZAttestReqType.Descriptor instead.
func (ZAttestReqType) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{0}
}
type ZAttestRespType int32
const (
ZAttestRespType_ATTEST_RESP_NONE ZAttestRespType = 0
ZAttestRespType_ATTEST_RESP_CERT ZAttestRespType = 1 //response to cert msg
ZAttestRespType_ATTEST_RESP_NONCE ZAttestRespType = 2 //response to quote request
ZAttestRespType_ATTEST_RESP_QUOTE_RESP ZAttestRespType = 3 //response to quote msg
ZAttestRespType_Z_ATTEST_RESP_TYPE_STORE_KEYS ZAttestRespType = 4 //response to Z_ATTEST_REQ_TYPE_STORE_KEYS
)
// Enum value maps for ZAttestRespType.
var (
ZAttestRespType_name = map[int32]string{
0: "ATTEST_RESP_NONE",
1: "ATTEST_RESP_CERT",
2: "ATTEST_RESP_NONCE",
3: "ATTEST_RESP_QUOTE_RESP",
4: "Z_ATTEST_RESP_TYPE_STORE_KEYS",
}
ZAttestRespType_value = map[string]int32{
"ATTEST_RESP_NONE": 0,
"ATTEST_RESP_CERT": 1,
"ATTEST_RESP_NONCE": 2,
"ATTEST_RESP_QUOTE_RESP": 3,
"Z_ATTEST_RESP_TYPE_STORE_KEYS": 4,
}
)
func (x ZAttestRespType) Enum() *ZAttestRespType {
p := new(ZAttestRespType)
*p = x
return p
}
func (x ZAttestRespType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ZAttestRespType) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[1].Descriptor()
}
func (ZAttestRespType) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[1]
}
func (x ZAttestRespType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ZAttestRespType.Descriptor instead.
func (ZAttestRespType) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{1}
}
// Hash algo used in digests, and PCR Extend operations
type TpmHashAlgo int32
const (
TpmHashAlgo_TPM_HASH_ALGO_INVALID TpmHashAlgo = 0
TpmHashAlgo_TPM_HASH_ALGO_SHA1 TpmHashAlgo = 1
TpmHashAlgo_TPM_HASH_ALGO_SHA256 TpmHashAlgo = 2
TpmHashAlgo_TPM_HASH_ALGO_SHA512 TpmHashAlgo = 3
)
// Enum value maps for TpmHashAlgo.
var (
TpmHashAlgo_name = map[int32]string{
0: "TPM_HASH_ALGO_INVALID",
1: "TPM_HASH_ALGO_SHA1",
2: "TPM_HASH_ALGO_SHA256",
3: "TPM_HASH_ALGO_SHA512",
}
TpmHashAlgo_value = map[string]int32{
"TPM_HASH_ALGO_INVALID": 0,
"TPM_HASH_ALGO_SHA1": 1,
"TPM_HASH_ALGO_SHA256": 2,
"TPM_HASH_ALGO_SHA512": 3,
}
)
func (x TpmHashAlgo) Enum() *TpmHashAlgo {
p := new(TpmHashAlgo)
*p = x
return p
}
func (x TpmHashAlgo) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TpmHashAlgo) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[2].Descriptor()
}
func (TpmHashAlgo) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[2]
}
func (x TpmHashAlgo) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TpmHashAlgo.Descriptor instead.
func (TpmHashAlgo) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{2}
}
type AttestGPSInput int32
const (
AttestGPSInput_ATTEST_GPS_INPUT_INVALID AttestGPSInput = 0
AttestGPSInput_ATTEST_GPS_INPUT_PRESENT AttestGPSInput = 1 //GPS Coordinates are available
AttestGPSInput_ATTEST_GPS_INPUT_ABSENT AttestGPSInput = 2 //GPS Coordinates are not available/reliable
)
// Enum value maps for AttestGPSInput.
var (
AttestGPSInput_name = map[int32]string{
0: "ATTEST_GPS_INPUT_INVALID",
1: "ATTEST_GPS_INPUT_PRESENT",
2: "ATTEST_GPS_INPUT_ABSENT",
}
AttestGPSInput_value = map[string]int32{
"ATTEST_GPS_INPUT_INVALID": 0,
"ATTEST_GPS_INPUT_PRESENT": 1,
"ATTEST_GPS_INPUT_ABSENT": 2,
}
)
func (x AttestGPSInput) Enum() *AttestGPSInput {
p := new(AttestGPSInput)
*p = x
return p
}
func (x AttestGPSInput) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AttestGPSInput) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[3].Descriptor()
}
func (AttestGPSInput) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[3]
}
func (x AttestGPSInput) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AttestGPSInput.Descriptor instead.
func (AttestGPSInput) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{3}
}
type AttestVersionType int32
const (
AttestVersionType_ATTEST_VERSION_TYPE_INVALID AttestVersionType = 0
AttestVersionType_ATTEST_VERSION_TYPE_EVE AttestVersionType = 1 // BaseOS version
AttestVersionType_ATTEST_VERSION_TYPE_FIRMWARE AttestVersionType = 2 // Firmware version (e.g. UEFI)
)
// Enum value maps for AttestVersionType.
var (
AttestVersionType_name = map[int32]string{
0: "ATTEST_VERSION_TYPE_INVALID",
1: "ATTEST_VERSION_TYPE_EVE",
2: "ATTEST_VERSION_TYPE_FIRMWARE",
}
AttestVersionType_value = map[string]int32{
"ATTEST_VERSION_TYPE_INVALID": 0,
"ATTEST_VERSION_TYPE_EVE": 1,
"ATTEST_VERSION_TYPE_FIRMWARE": 2,
}
)
func (x AttestVersionType) Enum() *AttestVersionType {
p := new(AttestVersionType)
*p = x
return p
}
func (x AttestVersionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AttestVersionType) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[4].Descriptor()
}
func (AttestVersionType) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[4]
}
func (x AttestVersionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AttestVersionType.Descriptor instead.
func (AttestVersionType) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{4}
}
type ZAttestResponseCode int32
const (
ZAttestResponseCode_Z_ATTEST_RESPONSE_CODE_INVALID ZAttestResponseCode = 0
ZAttestResponseCode_Z_ATTEST_RESPONSE_CODE_SUCCESS ZAttestResponseCode = 1 //Attestation successful
ZAttestResponseCode_Z_ATTEST_RESPONSE_CODE_NONCE_MISMATCH ZAttestResponseCode = 2 //Attestation failed due to nonce mismatch
ZAttestResponseCode_Z_ATTEST_RESPONSE_CODE_NO_CERT_FOUND ZAttestResponseCode = 3 //There was no attestation certificate in Controller to validate attestation quote
ZAttestResponseCode_Z_ATTEST_RESPONSE_CODE_QUOTE_FAILED ZAttestResponseCode = 4 //Attestation failed due to quote mismatch
)
// Enum value maps for ZAttestResponseCode.
var (
ZAttestResponseCode_name = map[int32]string{
0: "Z_ATTEST_RESPONSE_CODE_INVALID",
1: "Z_ATTEST_RESPONSE_CODE_SUCCESS",
2: "Z_ATTEST_RESPONSE_CODE_NONCE_MISMATCH",
3: "Z_ATTEST_RESPONSE_CODE_NO_CERT_FOUND",
4: "Z_ATTEST_RESPONSE_CODE_QUOTE_FAILED",
}
ZAttestResponseCode_value = map[string]int32{
"Z_ATTEST_RESPONSE_CODE_INVALID": 0,
"Z_ATTEST_RESPONSE_CODE_SUCCESS": 1,
"Z_ATTEST_RESPONSE_CODE_NONCE_MISMATCH": 2,
"Z_ATTEST_RESPONSE_CODE_NO_CERT_FOUND": 3,
"Z_ATTEST_RESPONSE_CODE_QUOTE_FAILED": 4,
}
)
func (x ZAttestResponseCode) Enum() *ZAttestResponseCode {
p := new(ZAttestResponseCode)
*p = x
return p
}
func (x ZAttestResponseCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ZAttestResponseCode) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[5].Descriptor()
}
func (ZAttestResponseCode) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[5]
}
func (x ZAttestResponseCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ZAttestResponseCode.Descriptor instead.
func (ZAttestResponseCode) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{5}
}
type AttestVolumeKeyType int32
const (
AttestVolumeKeyType_ATTEST_VOLUME_KEY_TYPE_INVALID AttestVolumeKeyType = 0
AttestVolumeKeyType_ATTEST_VOLUME_KEY_TYPE_VSK AttestVolumeKeyType = 1 //Volume storage key, for /persist/vault
)
// Enum value maps for AttestVolumeKeyType.
var (
AttestVolumeKeyType_name = map[int32]string{
0: "ATTEST_VOLUME_KEY_TYPE_INVALID",
1: "ATTEST_VOLUME_KEY_TYPE_VSK",
}
AttestVolumeKeyType_value = map[string]int32{
"ATTEST_VOLUME_KEY_TYPE_INVALID": 0,
"ATTEST_VOLUME_KEY_TYPE_VSK": 1,
}
)
func (x AttestVolumeKeyType) Enum() *AttestVolumeKeyType {
p := new(AttestVolumeKeyType)
*p = x
return p
}
func (x AttestVolumeKeyType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AttestVolumeKeyType) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[6].Descriptor()
}
func (AttestVolumeKeyType) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[6]
}
func (x AttestVolumeKeyType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AttestVolumeKeyType.Descriptor instead.
func (AttestVolumeKeyType) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{6}
}
type AttestStorageKeysResponseCode int32
const (
AttestStorageKeysResponseCode_ATTEST_STORAGE_KEYS_RESPONSE_CODE_INVALID AttestStorageKeysResponseCode = 0
AttestStorageKeysResponseCode_ATTEST_STORAGE_KEYS_RESPONSE_CODE_SUCCESS AttestStorageKeysResponseCode = 1 // key(s) successfully stored
AttestStorageKeysResponseCode_ATTEST_STORAGE_KEYS_RESPONSE_CODE_ITOKEN_MISMATCH AttestStorageKeysResponseCode = 2 // integrity_token was not valid, try after successful attestation
)
// Enum value maps for AttestStorageKeysResponseCode.
var (
AttestStorageKeysResponseCode_name = map[int32]string{
0: "ATTEST_STORAGE_KEYS_RESPONSE_CODE_INVALID",
1: "ATTEST_STORAGE_KEYS_RESPONSE_CODE_SUCCESS",
2: "ATTEST_STORAGE_KEYS_RESPONSE_CODE_ITOKEN_MISMATCH",
}
AttestStorageKeysResponseCode_value = map[string]int32{
"ATTEST_STORAGE_KEYS_RESPONSE_CODE_INVALID": 0,
"ATTEST_STORAGE_KEYS_RESPONSE_CODE_SUCCESS": 1,
"ATTEST_STORAGE_KEYS_RESPONSE_CODE_ITOKEN_MISMATCH": 2,
}
)
func (x AttestStorageKeysResponseCode) Enum() *AttestStorageKeysResponseCode {
p := new(AttestStorageKeysResponseCode)
*p = x
return p
}
func (x AttestStorageKeysResponseCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AttestStorageKeysResponseCode) Descriptor() protoreflect.EnumDescriptor {
return file_attest_attest_proto_enumTypes[7].Descriptor()
}
func (AttestStorageKeysResponseCode) Type() protoreflect.EnumType {
return &file_attest_attest_proto_enumTypes[7]
}
func (x AttestStorageKeysResponseCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AttestStorageKeysResponseCode.Descriptor instead.
func (AttestStorageKeysResponseCode) EnumDescriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{7}
}
// This is the request payload for POST /api/v2/edgeDevice/id/<uuid>/attest
// The message is assumed to be protected by signing envelope
type ZAttestReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReqType ZAttestReqType `protobuf:"varint,1,opt,name=reqType,proto3,enum=org.lfedge.eve.attest.ZAttestReqType" json:"reqType,omitempty"` //type of the request
Quote *ZAttestQuote `protobuf:"bytes,2,opt,name=quote,proto3" json:"quote,omitempty"` //attestation quote msg
Certs []*certs.ZCert `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` //X509 certs in .PEM format, signed by device certificate
StorageKeys *AttestStorageKeys `protobuf:"bytes,4,opt,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"` //encrypted secrets to be saved by the Controller, like encrypted keys for the volume storage vaults
}
func (x *ZAttestReq) Reset() {
*x = ZAttestReq{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZAttestReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZAttestReq) ProtoMessage() {}
func (x *ZAttestReq) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ZAttestReq.ProtoReflect.Descriptor instead.
func (*ZAttestReq) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{0}
}
func (x *ZAttestReq) GetReqType() ZAttestReqType {
if x != nil {
return x.ReqType
}
return ZAttestReqType_ATTEST_REQ_NONE
}
func (x *ZAttestReq) GetQuote() *ZAttestQuote {
if x != nil {
return x.Quote
}
return nil
}
func (x *ZAttestReq) GetCerts() []*certs.ZCert {
if x != nil {
return x.Certs
}
return nil
}
func (x *ZAttestReq) GetStorageKeys() *AttestStorageKeys {
if x != nil {
return x.StorageKeys
}
return nil
}
// This is the response payload for POST /api/v2/edgeDevice/id/<uuid>/attest
// The message is assumed to be protected by signing envelope
type ZAttestResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RespType ZAttestRespType `protobuf:"varint,1,opt,name=respType,proto3,enum=org.lfedge.eve.attest.ZAttestRespType" json:"respType,omitempty"` //type of the response
Nonce *ZAttestNonceResp `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` //nonce from Controller
QuoteResp *ZAttestQuoteResp `protobuf:"bytes,3,opt,name=quoteResp,proto3" json:"quoteResp,omitempty"` //attest quote response from Controller
StorageKeysResp *AttestStorageKeysResp `protobuf:"bytes,4,opt,name=storage_keys_resp,json=storageKeysResp,proto3" json:"storage_keys_resp,omitempty"` //attest storage_keys response from Controller
}
func (x *ZAttestResponse) Reset() {
*x = ZAttestResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZAttestResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZAttestResponse) ProtoMessage() {}
func (x *ZAttestResponse) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ZAttestResponse.ProtoReflect.Descriptor instead.
func (*ZAttestResponse) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{1}
}
func (x *ZAttestResponse) GetRespType() ZAttestRespType {
if x != nil {
return x.RespType
}
return ZAttestRespType_ATTEST_RESP_NONE
}
func (x *ZAttestResponse) GetNonce() *ZAttestNonceResp {
if x != nil {
return x.Nonce
}
return nil
}
func (x *ZAttestResponse) GetQuoteResp() *ZAttestQuoteResp {
if x != nil {
return x.QuoteResp
}
return nil
}
func (x *ZAttestResponse) GetStorageKeysResp() *AttestStorageKeysResp {
if x != nil {
return x.StorageKeysResp
}
return nil
}
type ZAttestNonceResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` //nonce to use in quote generation
}
func (x *ZAttestNonceResp) Reset() {
*x = ZAttestNonceResp{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZAttestNonceResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZAttestNonceResp) ProtoMessage() {}
func (x *ZAttestNonceResp) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ZAttestNonceResp.ProtoReflect.Descriptor instead.
func (*ZAttestNonceResp) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{2}
}
func (x *ZAttestNonceResp) GetNonce() []byte {
if x != nil {
return x.Nonce
}
return nil
}
// A hash algo, and corresponding digest derived using that algo
type TpmEventDigest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HashAlgo TpmHashAlgo `protobuf:"varint,1,opt,name=hash_algo,json=hashAlgo,proto3,enum=org.lfedge.eve.attest.TpmHashAlgo" json:"hash_algo,omitempty"`
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
}
func (x *TpmEventDigest) Reset() {
*x = TpmEventDigest{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TpmEventDigest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TpmEventDigest) ProtoMessage() {}
func (x *TpmEventDigest) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TpmEventDigest.ProtoReflect.Descriptor instead.
func (*TpmEventDigest) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{3}
}
func (x *TpmEventDigest) GetHashAlgo() TpmHashAlgo {
if x != nil {
return x.HashAlgo
}
return TpmHashAlgo_TPM_HASH_ALGO_INVALID
}
func (x *TpmEventDigest) GetDigest() []byte {
if x != nil {
return x.Digest
}
return nil
}
// Taken from
// 5.2 Crypto Agile Log Entry Format, from https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf
type TpmEventLogEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` // Sequential index of event in the log
PcrIndex uint32 `protobuf:"varint,2,opt,name=pcr_index,json=pcrIndex,proto3" json:"pcr_index,omitempty"` // PCR index to which this event was measured
EventType uint32 `protobuf:"varint,3,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // The type of this event
Digest *TpmEventDigest `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` // The digest corresponding to this event
EventDataBinary []byte `protobuf:"bytes,5,opt,name=event_data_binary,json=eventDataBinary,proto3" json:"event_data_binary,omitempty"` // The raw event data bytes
EventDataString string `protobuf:"bytes,6,opt,name=event_data_string,json=eventDataString,proto3" json:"event_data_string,omitempty"` // Textual representation of the event data
EventBinarySize uint32 `protobuf:"varint,7,opt,name=event_binary_size,json=eventBinarySize,proto3" json:"event_binary_size,omitempty"` // Size of binary data in bytes. We keep the size value when we omit the data
}
func (x *TpmEventLogEntry) Reset() {
*x = TpmEventLogEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TpmEventLogEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TpmEventLogEntry) ProtoMessage() {}
func (x *TpmEventLogEntry) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TpmEventLogEntry.ProtoReflect.Descriptor instead.
func (*TpmEventLogEntry) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{4}
}
func (x *TpmEventLogEntry) GetIndex() uint32 {
if x != nil {
return x.Index
}
return 0
}
func (x *TpmEventLogEntry) GetPcrIndex() uint32 {
if x != nil {
return x.PcrIndex
}
return 0
}
func (x *TpmEventLogEntry) GetEventType() uint32 {
if x != nil {
return x.EventType
}
return 0
}
func (x *TpmEventLogEntry) GetDigest() *TpmEventDigest {
if x != nil {
return x.Digest
}
return nil
}
func (x *TpmEventLogEntry) GetEventDataBinary() []byte {
if x != nil {
return x.EventDataBinary
}
return nil
}
func (x *TpmEventLogEntry) GetEventDataString() string {
if x != nil {
return x.EventDataString
}
return ""
}
func (x *TpmEventLogEntry) GetEventBinarySize() uint32 {
if x != nil {
return x.EventBinarySize
}
return 0
}
type AttestGPSCoordinates struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GpsInput AttestGPSInput `protobuf:"varint,1,opt,name=gps_input,json=gpsInput,proto3,enum=org.lfedge.eve.attest.AttestGPSInput" json:"gps_input,omitempty"` // Are the coordinates populated ?
Latitude float64 `protobuf:"fixed64,2,opt,name=latitude,proto3" json:"latitude,omitempty"` // Latitude of the device geo-location
Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"` // Longitude of the device geo-location
}
func (x *AttestGPSCoordinates) Reset() {
*x = AttestGPSCoordinates{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AttestGPSCoordinates) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AttestGPSCoordinates) ProtoMessage() {}
func (x *AttestGPSCoordinates) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AttestGPSCoordinates.ProtoReflect.Descriptor instead.
func (*AttestGPSCoordinates) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{5}
}
func (x *AttestGPSCoordinates) GetGpsInput() AttestGPSInput {
if x != nil {
return x.GpsInput
}
return AttestGPSInput_ATTEST_GPS_INPUT_INVALID
}
func (x *AttestGPSCoordinates) GetLatitude() float64 {
if x != nil {
return x.Latitude
}
return 0
}
func (x *AttestGPSCoordinates) GetLongitude() float64 {
if x != nil {
return x.Longitude
}
return 0
}
// examples
// ATTEST_VERSION_TYPE_EVE, "5.6.1-amd64"
// ATTEST_VERSION_TYPE_FIRMWARE, "American Megatrends Inc.-5.12"
type AttestVersionInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
VersionType AttestVersionType `protobuf:"varint,1,opt,name=version_type,json=versionType,proto3,enum=org.lfedge.eve.attest.AttestVersionType" json:"version_type,omitempty"` // One of VersionType
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Version string of the corresponding package
}
func (x *AttestVersionInfo) Reset() {
*x = AttestVersionInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AttestVersionInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AttestVersionInfo) ProtoMessage() {}
func (x *AttestVersionInfo) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AttestVersionInfo.ProtoReflect.Descriptor instead.
func (*AttestVersionInfo) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{6}
}
func (x *AttestVersionInfo) GetVersionType() AttestVersionType {
if x != nil {
return x.VersionType
}
return AttestVersionType_ATTEST_VERSION_TYPE_INVALID
}
func (x *AttestVersionInfo) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
// Holds one single PCR value from TPM, from a particular hash bank
type TpmPCRValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` //PCR index
HashAlgo TpmHashAlgo `protobuf:"varint,2,opt,name=hash_algo,json=hashAlgo,proto3,enum=org.lfedge.eve.attest.TpmHashAlgo" json:"hash_algo,omitempty"` //SHA1/SHA256/SHA384/SHA256
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` //value in PCR
}
func (x *TpmPCRValue) Reset() {
*x = TpmPCRValue{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TpmPCRValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TpmPCRValue) ProtoMessage() {}
func (x *TpmPCRValue) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TpmPCRValue.ProtoReflect.Descriptor instead.
func (*TpmPCRValue) Descriptor() ([]byte, []int) {
return file_attest_attest_proto_rawDescGZIP(), []int{7}
}
func (x *TpmPCRValue) GetIndex() uint32 {
if x != nil {
return x.Index
}
return 0
}
func (x *TpmPCRValue) GetHashAlgo() TpmHashAlgo {
if x != nil {
return x.HashAlgo
}
return TpmHashAlgo_TPM_HASH_ALGO_INVALID
}
func (x *TpmPCRValue) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
// attestData is taken from
// TPMS_ATTEST Table 2:123) in https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-2-Structures-01.38.pdf
type ZAttestQuote struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AttestData []byte `protobuf:"bytes,1,opt,name=attestData,proto3" json:"attestData,omitempty"` // Nonce is included in attestData, see comment above
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // Signature to verify attestData
PcrValues []*TpmPCRValue `protobuf:"bytes,3,rep,name=pcr_values,json=pcrValues,proto3" json:"pcr_values,omitempty"` // Current values of TPM PCRs 0-15
EventLog []*TpmEventLogEntry `protobuf:"bytes,4,rep,name=event_log,json=eventLog,proto3" json:"event_log,omitempty"` // TPM Event log
Versions []*AttestVersionInfo `protobuf:"bytes,5,rep,name=versions,proto3" json:"versions,omitempty"` // Versions of various software packages, as defined by VersionType
GpsInfo *AttestGPSCoordinates `protobuf:"bytes,6,opt,name=gps_info,json=gpsInfo,proto3" json:"gps_info,omitempty"` // Geo-Coordinates of the device
}
func (x *ZAttestQuote) Reset() {
*x = ZAttestQuote{}
if protoimpl.UnsafeEnabled {
mi := &file_attest_attest_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZAttestQuote) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZAttestQuote) ProtoMessage() {}
func (x *ZAttestQuote) ProtoReflect() protoreflect.Message {
mi := &file_attest_attest_proto_msgTypes[8]