-
Notifications
You must be signed in to change notification settings - Fork 8
/
ietf-tpm-remote-attestation@2021-05-11.yang
1045 lines (1007 loc) · 32.8 KB
/
ietf-tpm-remote-attestation@2021-05-11.yang
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
module ietf-tpm-remote-attestation {
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation";
prefix tpm;
import ietf-yang-types {
prefix yang;
}
import ietf-hardware {
prefix ietfhw;
}
import ietf-keystore {
prefix ks;
}
import ietf-tcg-algs {
prefix taa;
}
organization
"IETF RATS (Remote ATtestation procedureS) Working Group";
contact
"WG Web : <http://datatracker.ietf.org/wg/rats/>
WG List : <mailto:rats@ietf.org>
Author : Eric Voit <evoit@cisco.com>
Author : Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Author : Michael Eckel <michael.eckel@sit.fraunhofer.de>
Author : Shwetha Bhandari <shwetha.bhandari@thoughtspot.com>
Author : Bill Sulzen <bsulzen@cisco.com>
Author : Liang Xia (Frank) <frank.xialiang@huawei.com>
Author : Tom Laffey <tom.laffey@hpe.com>
Author : Guy Fedorkow <gfedorkow@juniper.net>";
description
"A YANG module to enable a TPM 1.2 and TPM 2.0 based
remote attestation procedure using a challenge-response
interaction model and the TPM 1.2 and TPM 2.0 Quote
primitive operations.
Copyright (c) 2021 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision 2021-05-11 {
description
"Initial version";
reference
"draft-ietf-rats-yang-tpm-charra";
}
/*****************/
/* Features */
/*****************/
feature tpms {
description
"The device supports the remote attestation of multiple
TPM based cryptoprocessors.";
}
feature bios {
description
"The device supports the bios logs.";
reference
"https://trustedcomputinggroup.org/wp-content/uploads/
PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v51.pdf
Section 9.4.5.2";
}
feature ima {
description
"The device supports Integrity Measurement Architecture logs.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3";
}
feature netequip_boot {
description
"The device supports the netequip_boot logs.";
}
/*****************/
/* Typedefs */
/*****************/
typedef pcr {
type uint8 {
range "0..31";
}
description
"Valid index number for a PCR. At this point 0-31 is viable.";
}
typedef compute-node-ref {
type leafref {
path "/tpm:rats-support-structures/tpm:compute-nodes"
+ "/tpm:compute-node/tpm:node-name";
}
description
"This type is used to reference a hardware node. It is quite
possible this leafref will eventually point to another YANG
module's node.";
}
typedef certificate-name-ref {
type leafref {
path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm"
+ "/tpm:certificates/tpm:certificate/tpm:name";
}
description
"A type which allows identification of a TPM based certificate.";
}
/******************/
/* Identities */
/******************/
identity attested_event_log_type {
description
"Base identity allowing categorization of the reasons why and
attested measurement has been taken on an Attester.";
}
identity ima {
base attested_event_log_type;
description
"An event type recorded in IMA.";
}
identity bios {
base attested_event_log_type;
description
"An event type associated with BIOS/UEFI.";
}
identity netequip_boot {
base attested_event_log_type;
description
"An event type associated with Network Equipment Boot.";
}
/*****************/
/* Groupings */
/*****************/
grouping tpm20-hash-algo {
description
"The cryptographic algorithm used to hash the TPM 2.0 PCRs. This
must be from the list of platform supported options.";
leaf tpm20-hash-algo {
type identityref {
base taa:hash;
}
must '/tpm:rats-support-structures/tpm:attester-supported-algos'
+ '/tpm:tpm20-hash' {
error-message "This platform does not support tpm20-hash-algo";
}
default "taa:TPM_ALG_SHA256";
description
"The hash scheme that is used to hash a TPM 1.2 PCR. This
must be one of those supported by a platform.";
}
}
grouping tpm12-hash-algo {
description
"The cryptographic algorithm used to hash the TPM 1.2 PCRs.";
leaf tpm12-hash-algo {
type identityref {
base taa:hash;
}
must '/tpm:rats-support-structures/tpm:attester-supported-algos'
+ '/tpm:tpm12-hash' {
error-message "This platform does not support tpm12-hash-algo";
}
default "taa:TPM_ALG_SHA1";
description
"The hash scheme that is used to hash a TPM 1.2 PCR. This
MUST be one of those supported by a platform. This assumes
that an algorithm other than SHA1 can be supported on some
TPM 1.2 cryptoprocessor variant.";
}
}
grouping nonce {
description
"A random number intended to be used once to show freshness
and to allow the detection of replay attacks.";
leaf nonce-value {
type binary;
mandatory true;
description
"A cryptographically generated random number which should
not be predictable prior to its issuance from a random
number generation function. The random number MUST be
derived from an entropy source external to the Attester.";
}
}
grouping tpm12-pcr-selection {
description
"A Verifier can request one or more PCR values using its
individually created Attestation Key Certificate (AC).
The corresponding selection filter is represented in this
grouping.
Requesting a PCR value that is not in scope of the AC used,
detailed exposure via error msg should be avoided.";
leaf-list pcr-index {
type pcr;
must '/tpm:rats-support-structures/tpm:tpms'
+ '/tpm:tpm[name = current()] and '
+ '/tpm:rats-support-structures/tpm:tpms'
+ '/tpm:tpm[tpm12-pcrs = current()]' {
error-message "Acquiring this PCR index is not supported";
}
description
"The numbers/indexes of the PCRs. At the moment this is limited
to 32 items.";
}
}
grouping tpm20-pcr-selection {
description
"A Verifier can acquire one or more PCR values, which are hashed
together in a TPM2B_DIGEST coming from the TPM 2.0. The selection
list of desired PCRs and the Hash Algorithm is represented in
this grouping.";
list tpm20-pcr-selection {
unique "tpm20-hash-algo";
description
"Specifies the list of PCRs and Hash Algorithms that can be
returned within a TPM2B_DIGEST.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
uses tpm20-hash-algo;
leaf-list pcr-index {
type pcr;
must '/tpm:rats-support-structures/tpm:tpms'
+ '/tpm:tpm[name = current()] and '
+ '/tpm:rats-support-structures/tpm:tpms/tpm:tpm'
+ '/tpm:tpm20-pcr-bank[pcr-index = current()]' {
error-message "Acquiring this PCR index is not supported";
}
description
"The numbers of the PCRs that which are being tracked
with a hash based on the tpm20-hash-algo.";
}
}
}
grouping certificate-name-ref {
description
"Identifies a certificate in a keystore.";
leaf certificate-name {
type certificate-name-ref;
mandatory true;
description
"Identifies a certificate in a keystore.";
}
}
grouping tpm-name {
description
"A unique TPM on a device.";
leaf name {
type string;
description
"Unique system generated name for a TPM on a device.";
}
}
grouping tpm-name-selector {
description
"One or more TPM on a device.";
leaf-list name {
type string;
config false;
description
"Name of one or more unique TPMs on a device. If this object
exists, a selection should pull only the objects related to
these TPM(s). If it does not exist, all qualifying TPMs that
are 'hardware-based' equals true on the device are selected.";
}
}
grouping node-uptime {
description
"Uptime in seconds of the node.";
leaf up-time {
type uint32;
description
"Uptime in seconds of this node reporting its data";
}
}
grouping tpm12-attestation {
description
"Contains an instance of TPM 1.2 style signed cryptoprocessor
measurements. It is supplemented by unsigned Attester
information.";
uses node-uptime;
leaf TPM_QUOTE2 {
type binary;
description
"Result of a TPM 1.2 Quote2 operation. This includes PCR values,
signatures, locality, the provided nonce and other data which
can be further parsed to appraise the Attester.";
reference
"TPM 1.2 commands rev116 July 2007, https://trustedcomputinggroup.org/wp-content/uploads/TPM-Main-Part-3-Commands_v1.2_rev116_01032011.pdf Section 16.5";
}
}
grouping tpm20-attestation {
description
"Contains an instance of TPM 2.0 style signed cryptoprocessor
measurements. It is supplemented by unsigned Attester
information.";
leaf attestation-data {
type binary;
mandatory true;
description
"A composite hash of the latest PCR values (and the hash algorithm used)
which have been returned by an Attester for the selected PCRs
and Hash Algorithms (type: TPM2B_ATTEST). This also
includes the provided nonce and TPM 2.0 time and clock information.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.12.9";
}
leaf quote-signature {
type binary;
description
"Quote signature returned by TPM Quote (type: TPMT_SIGNATURE).
The signature was generated using the key associated with the
certificate 'name'.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 11.3.4";
}
uses node-uptime;
list unsigned-pcr-values {
description
"PCR values in each PCR bank. This might appear redundant with
the TPM2B_DIGEST, but that digest is calculated across multiple
PCRs. Having to verify across multiple PCRs does not
necessarily make it easy for a Verifier to appraise just the
minimum set of PCR information which has changed since the last
received TPM2B_DIGEST. Put another way, why should a Verifier
reconstruct the proper value of all PCR Quotes when only a
single PCR has changed?
To help this happen, if the Attester does know specific PCR
values, the Attester can provide these individual values via
'unsigned-pcr-values'. By comparing this information to the
what has previously been validated, it is possible for a
Verifier to confirm the Attester's signature while eliminating
significant processing.";
uses tpm20-hash-algo;
list pcr-values {
key "pcr-index";
description
"List of one PCR bank.";
leaf pcr-index {
type pcr;
description
"PCR index number.";
}
leaf pcr-value {
type binary;
description
"PCR value.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
}
}
}
}
grouping log-identifier {
description
"Identifier for type of log to be retrieved.";
leaf log-type {
type identityref {
base attested_event_log_type;
}
mandatory true;
description
"The corresponding measurement log type identity.";
}
}
grouping boot-event-log {
description
"Defines an event log corresponding to the event that extended
the PCR";
leaf event-number {
type uint32;
description
"Unique event number of this event";
}
leaf event-type {
type uint32;
description
"log event type";
}
leaf pcr-index {
type pcr;
description
"Defines the PCR index that this event extended";
}
list digest-list {
description
"Hash of event data";
leaf hash-algo {
type identityref {
base taa:hash;
}
description
"The hash scheme that is used to compress the event data in
each of the leaf-list digest items.";
}
leaf-list digest {
type binary;
description
"The hash of the event data using the algorithm of the
'hash-algo' against 'event data'.";
}
}
leaf event-size {
type uint32;
description
"Size of the event data";
}
leaf-list event-data {
type uint8;
description
"The event data size determined by event-size";
}
}
grouping bios-event-log {
description
"Measurement log created by the BIOS/UEFI.";
list bios-event-entry {
key event-number;
description
"Ordered list of TCG described event log
that extended the PCRs in the order they
were logged";
uses boot-event-log;
}
}
grouping ima-event {
description
"Defines an hash log extend event for IMA measurements";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3";
leaf event-number {
type uint64;
description
"Unique number for this event for sequencing";
}
leaf ima-template {
type string;
description
"Name of the template used for event logs
for e.g. ima, ima-ng, ima-sig";
}
leaf filename-hint {
type string;
description
"File that was measured";
}
leaf filedata-hash {
type binary;
description
"Hash of filedata";
}
leaf filedata-hash-algorithm {
type string;
description
"Algorithm used for filedata-hash";
}
leaf template-hash-algorithm {
type string;
description
"Algorithm used for template-hash";
}
leaf template-hash {
type binary;
description
"hash(filedata-hash, filename-hint)";
}
leaf pcr-index {
type pcr;
description
"Defines the PCR index that this event extended";
}
leaf signature {
type binary;
description
"The file signature";
}
}
grouping ima-event-log {
description
"Measurement log created by IMA.";
list ima-event-entry {
key event-number;
description
"Ordered list of ima event logs by event-number";
uses ima-event;
}
}
grouping network-equipment-boot-event-log {
description
"Measurement log created by Network Equipment Boot. The Network
Equipment Boot format is identical to the IMA format. In
contrast to the IMA log, the Network Equipment Boot log
includes every measurable event from an Attester, including
the boot stages of BIOS, Bootloader, etc. In essence, the scope
of events represented in this format combines the scope of BIOS
events and IMA events.";
list boot-event-entry {
key event-number;
description
"Ordered list of Network Equipment Boot event logs
by event-number, using the IMA event format.";
uses ima-event;
}
}
grouping event-logs {
description
"A selector for the log and its type.";
choice attested_event_log_type {
mandatory true;
description
"Event log type determines the event logs content.";
case bios {
if-feature "bios";
description
"BIOS/UEFI event logs";
container bios-event-logs {
description
"BIOS/UEFI event logs";
uses bios-event-log;
}
}
case ima {
if-feature "ima";
description
"IMA event logs.";
container ima-event-logs {
description
"IMA event logs.";
uses ima-event-log;
}
}
case netequip_boot {
if-feature "netequip_boot";
description
"Network Equipment Boot event logs";
container boot-event-logs {
description
"Network equipment boot event logs.";
uses network-equipment-boot-event-log;
}
}
}
}
/**********************/
/* RPC operations */
/**********************/
rpc tpm12-challenge-response-attestation {
if-feature "taa:tpm12";
description
"This RPC accepts the input for TSS TPM 1.2 commands made to the
attesting device.";
input {
container tpm12-attestation-challenge {
description
"This container includes every information element defined
in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on
TPM 1.2 structure definitions";
uses tpm12-pcr-selection;
uses nonce;
leaf-list certificate-name {
if-feature "tpm:tpms";
type certificate-name-ref;
must "/tpm:rats-support-structures/tpm:tpms"
+ "/tpm:tpm[tpm:firmware-version='taa:tpm12']"
+ "/tpm:certificates/"
+ "/tpm:certificate[name=current()]" {
error-message "Not an available TPM 1.2 AIK certificate.";
}
description
"When populated, the RPC will only get a Quote for the
TPMs associated with these certificate(s).";
}
}
}
output {
list tpm12-attestation-response {
unique "certificate-name";
description
"The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including
the PCR selection and other associated attestation evidence
metadata";
uses certificate-name-ref {
description
"Certificate associated with this tpm12-attestation.";
}
uses tpm12-attestation;
}
}
}
rpc tpm20-challenge-response-attestation {
if-feature "taa:tpm20";
description
"This RPC accepts the input for TSS TPM 2.0 commands of the
managed device. ComponentIndex from the hardware manager YANG
module to refer to dedicated TPM in composite devices,
e.g. smart NICs, is still a TODO.";
input {
container tpm20-attestation-challenge {
description
"This container includes every information element defined
in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on
TPM 2.0 structure definitions";
uses nonce;
uses tpm20-pcr-selection;
leaf-list certificate-name {
if-feature "tpm:tpms";
type certificate-name-ref;
must "/tpm:rats-support-structures/tpm:tpms"
+ "/tpm:tpm[tpm:firmware-version='taa:tpm20']"
+ "/tpm:certificates/"
+ "/tpm:certificate[name=current()]" {
error-message "Not an available TPM 2.0 AK certificate.";
}
description
"When populated, the RPC will only get a Quote for the
TPMs associated with the certificates.";
}
}
}
output {
list tpm20-attestation-response {
unique "certificate-name";
description
"The binary output of TPM2_Quote in one TPM chip of the
node which identified by node-id. An TPM2B_ATTEST structure
including a length, encapsulated in a signature";
uses certificate-name-ref {
description
"Certificate associated with this tpm20-attestation.";
}
uses tpm20-attestation;
}
}
}
rpc log-retrieval {
description
"Logs Entries are either identified via indices or via providing
the last line received. The number of lines returned can be
limited. The type of log is a choice that can be augmented.";
input {
list log-selector {
description
"Selection of log entries to be reported.";
uses tpm-name-selector;
choice index-type {
description
"Last log entry received, log index number, or timestamp.";
case last-entry {
description
"The last entry of the log already retrieved.";
leaf last-entry-value {
type binary;
description
"Content of an log event which matches 1:1 with a
unique event record contained within the log. Log
entries subsequent to this will be passed to the
requester. Note: if log entry values are not unique,
this MUST return an error.";
}
}
case index {
description
"Numeric index of the last log entry retrieved, or
zero.";
leaf last-index-number {
type uint64;
description
"The last numeric index number of a log entry.
Zero means to start at the beginning of the log.
Entries subsequent to this will be passed to the
requester.";
}
}
case timestamp {
leaf timestamp {
type yang:date-and-time;
description
"Timestamp from which to start the extraction. The
next log entry subsequent to this timestamp is to
be sent.";
}
description
"Timestamp from which to start the extraction.";
}
}
leaf log-entry-quantity {
type uint16;
description
"The number of log entries to be returned. If omitted, it
means all of them.";
}
}
uses log-identifier;
}
output {
container system-event-logs {
description
"The requested data of the measurement event logs";
list node-data {
unique "name";
description
"Event logs of a node in a distributed system
identified by the node name";
uses tpm-name;
uses node-uptime;
container log-result {
description
"The requested entries of the corresponding log.";
uses event-logs;
}
}
}
}
}
/**************************************/
/* Config & Oper accessible nodes */
/**************************************/
container rats-support-structures {
description
"The datastore definition enabling verifiers or relying
parties to discover the information necessary to use the
remote attestation RPCs appropriately.";
container compute-nodes {
if-feature "tpm:tpms";
description
"Holds the set device subsystems/components in this composite
device that support TPM operations.";
list compute-node {
key "node-id";
config false;
min-elements 2;
description
"A component within this composite device which
supports TPM operations.";
leaf node-id {
type string;
description
"ID of the compute node, such as Board Serial Number.";
}
leaf node-physical-index {
if-feature "ietfhw:entity-mib";
type int32 {
range "1..2147483647";
}
config false;
description
"The entPhysicalIndex for the compute node.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
}
leaf node-name {
type string;
description
"Name of the compute node.";
}
leaf node-location {
type string;
description
"Location of the compute node, such as slot number.";
}
}
}
container tpms {
description
"Holds the set of TPMs within an Attester.";
list tpm {
key "name";
unique "path";
description
"A list of TPMs in this composite device that RATS
can be conducted with.";
uses tpm-name;
leaf hardware-based {
type boolean;
config false;
description
"Answers the question: is this TPM is a hardware based
TPM?";
}
leaf physical-index {
if-feature "ietfhw:entity-mib";
type int32 {
range "1..2147483647";
}
config false;
description
"The entPhysicalIndex for the TPM.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
}
leaf path {
type string;
config false;
description
"Path to a unique TPM on a device. This can change across
reboots.";
}
leaf compute-node {
if-feature "tpm:tpms";
type compute-node-ref;
config false;
mandatory true;
description
"Indicates the compute node measured by this TPM.";
}
leaf manufacturer {
type string;
config false;
description
"TPM manufacturer name.";
}
leaf firmware-version {
type identityref {
base taa:cryptoprocessor;
}
mandatory true;
description
"Identifies the cryptoprocessor API set supported. This
is automatically configured by the device and should not
be changed.";
}
uses tpm12-hash-algo {
when "firmware-version = 'taa:tpm12'";
refine "tpm12-hash-algo" {
description
"The hash algorithm overwrites the default used for PCRs
on this TPM 1.2 compliant cryptoprocessor.";
}
}
leaf-list tpm12-pcrs {
when "../firmware-version = 'taa:tpm12'";
type pcr;
description
"The PCRs which may be extracted from this TPM 1.2
compliant cryptoprocessor.";
}
list tpm20-pcr-bank {
when "../firmware-version = 'taa:tpm20'";
key "tpm20-hash-algo";
description
"Specifies the list of PCRs that may be extracted for
a specific Hash Algorithm on this TPM 2.0 compliant
cryptoprocessor. A bank is a set of PCRs which are
extended using a particular hash algorithm.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
leaf tpm20-hash-algo {
type identityref {
base taa:hash;
}
must '/tpm:rats-support-structures'
+ '/tpm:attester-supported-algos'
+ '/tpm:tpm20-hash' {
error-message
"This platform does not support tpm20-hash-algo";
}
description
"The hash scheme actively being used to hash a
one or more TPM 2.0 PCRs.";
}
leaf-list pcr-index {
type tpm:pcr;
description
"Defines what TPM 2.0 PCRs are available to be extracted.";
}
}
leaf status {
type enumeration {
enum operational {
value 0;
description
"The TPM currently is currently running normally and
is ready to accept and process TPM quotes.";
reference
"TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
Section 12";
}
enum non-operational {
value 1;
description
"TPM is in a state such as startup or shutdown which
precludes the processing of TPM quotes.";
}
}
config false;
mandatory true;
description
"TPM chip self-test status.";
}
container certificates {
description
"The TPM's certificates, including EK certificates
and AK certificates.";
list certificate {
key "name";
description
"Three types of certificates can be accessed via
this statement, including Initial Attestation
Key Certificate, Local Attestation Key Certificate or
Endorsement Key Certificate.";
leaf name {
type string;
description
"An arbitrary name uniquely identifying a certificate
associated within key within a TPM.";
}
leaf keystore-ref {
type leafref {
path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
+ "/ks:certificates/ks:certificate/ks:name";
}
description
"A reference to a specific certificate of an
asymmetric key in the Keystore.";
}
leaf type {
type enumeration {
enum endorsement-certificate {
value 0;
description
"Endorsement Key (EK) Certificate type.";
reference
"https://trustedcomputinggroup.org/wp-content/
uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf
Section 3.11";
}
enum initial-attestation-certificate {
value 1;
description
"Initial Attestation key (IAK) Certificate type.";
reference
"https://trustedcomputinggroup.org/wp-content/
uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf
Section 3.2";
}
enum local-attestation-certificate {
value 2;
description
"Local Attestation Key (LAK) Certificate type.";
reference
"https://trustedcomputinggroup.org/wp-content/
uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf
Section 3.2";
}
}
description
"Function supported by this certificate from within the
TPM.";
}
}
}