xref: /openbmc/docs/designs/redfish-spdm-attestation.md (revision 7754c5cd8e8fb5b97c246fb6ffb6b3642ef4d5dd)
1*7754c5cdSZhichuang Sun# Redfish SPDM Attestation Support
2*7754c5cdSZhichuang Sun
3*7754c5cdSZhichuang SunAuthor: Zhichuang Sun
4*7754c5cdSZhichuang Sun
5*7754c5cdSZhichuang SunOther contributors: Jerome Glisse, Ed Tanous
6*7754c5cdSZhichuang Sun
7*7754c5cdSZhichuang SunCreated: June 27th, 2023 Last Updated: Oct 30th, 2023
8*7754c5cdSZhichuang Sun
9*7754c5cdSZhichuang Sun## Problem Description
10*7754c5cdSZhichuang Sun
11*7754c5cdSZhichuang SunRedfish added schema for
12*7754c5cdSZhichuang Sun[ComponentIntegrity](https://redfish.dmtf.org/redfish/schema_index), which
13*7754c5cdSZhichuang Sunallows users to use [SPDM](https://www.dmtf.org/standards/spdm) or
14*7754c5cdSZhichuang Sun[TPM](https://trustedcomputinggroup.org/resource/trusted-platform-module-tpm-summary/)
15*7754c5cdSZhichuang Sunto authenticate device identity, hardware configuration and firmware integrity.
16*7754c5cdSZhichuang SunIt would be useful to add SPDM attestation support in BMCWeb, which provides
17*7754c5cdSZhichuang Sununified interface for device security attestation in data centers, and provide a
18*7754c5cdSZhichuang Sungeneric implementation for the SPDM D-Bus Daemon.
19*7754c5cdSZhichuang Sun
20*7754c5cdSZhichuang SunThis design focuses on SPDM.
21*7754c5cdSZhichuang Sun
22*7754c5cdSZhichuang Sun## Background and References
23*7754c5cdSZhichuang Sun
24*7754c5cdSZhichuang SunSPDM (Security Protocols and Data Models) is a spec published by
25*7754c5cdSZhichuang Sun[DMTF](https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.3.0.pdf).
26*7754c5cdSZhichuang SunIt is designed for secure attestation of devices. GitHub repo
27*7754c5cdSZhichuang Sun[libspdm](https://github.com/DMTF/libspdm) provides an open-source
28*7754c5cdSZhichuang Sunimplementation of the SPDM protocol. Redfish Schema
29*7754c5cdSZhichuang Sun[ComponentIntegrity](https://redfish.dmtf.org/schemas/v1/ComponentIntegrity.v1_2_1.json)
30*7754c5cdSZhichuang Sunadds support for doing SPDM-based device attestation over Redfish API.
31*7754c5cdSZhichuang Sun
32*7754c5cdSZhichuang Sun## Requirements
33*7754c5cdSZhichuang Sun
34*7754c5cdSZhichuang SunThis feature aims at supporting SPDM attestation through Redfish API and
35*7754c5cdSZhichuang Sunproviding system administrators and operators an easy way to remotely verify the
36*7754c5cdSZhichuang Sunidentity and integrity of devices.
37*7754c5cdSZhichuang Sun
38*7754c5cdSZhichuang SunThis design includes:
39*7754c5cdSZhichuang Sun
40*7754c5cdSZhichuang Sun- New D-Bus interfaces for Redfish resources `ComponentIntegrity` and
41*7754c5cdSZhichuang Sun  `TrustedComponent`.
42*7754c5cdSZhichuang Sun- BMCWeb changes for supporting the above Redfish resources.
43*7754c5cdSZhichuang Sun- Design for SPDM Attestation D-Bus Daemon, demonstrating how to fetch the
44*7754c5cdSZhichuang Sun  attestation results over D-Bus.
45*7754c5cdSZhichuang Sun
46*7754c5cdSZhichuang Sun## Proposed Design
47*7754c5cdSZhichuang Sun
48*7754c5cdSZhichuang Sun### Attestation related D-Bus Interfaces
49*7754c5cdSZhichuang Sun
50*7754c5cdSZhichuang SunThere are three type of information we will need from an attestation daemon on
51*7754c5cdSZhichuang SunD-Bus:
52*7754c5cdSZhichuang Sun
53*7754c5cdSZhichuang Sun1.  Basic information, like attestation protocol, enablement status, update
54*7754c5cdSZhichuang Sun    timestamp, etc.
55*7754c5cdSZhichuang Sun2.  Identity information, e.g., device identity certificates.
56*7754c5cdSZhichuang Sun3.  Measurements information, e.g., measurements of the component firmware,
57*7754c5cdSZhichuang Sun    hardware configuration, etc.
58*7754c5cdSZhichuang Sun
59*7754c5cdSZhichuang SunSo far, phosphor-dbus-interfaces lacks interfaces defined for attestation
60*7754c5cdSZhichuang Sunpurpose. Thus, we propose three new interfaces:
61*7754c5cdSZhichuang Sun
62*7754c5cdSZhichuang Sun- `Attestation.ComponentIntegrity`
63*7754c5cdSZhichuang Sun- `Attestation.IdentityAuthentication`
64*7754c5cdSZhichuang Sun- `Attestation.MeasurementSet`
65*7754c5cdSZhichuang Sun
66*7754c5cdSZhichuang Sun`Attestation.ComponentIntegrity` provides basic component integrity information,
67*7754c5cdSZhichuang Sunincluding the protocol to measure the integrity, last updated time, attestation
68*7754c5cdSZhichuang Sunenablement status, etc. There are also associations proposed for this interface,
69*7754c5cdSZhichuang Sunincluding a link to the trusted component that the component integrity object is
70*7754c5cdSZhichuang Sunreporting, and a link to the systems that the component integrity object is
71*7754c5cdSZhichuang Sunprotecting. Note, the "trusted component" in this doc refers to a trusted
72*7754c5cdSZhichuang Sundevice, such as a TPM, an integrated Root of Trust (ROT).
73*7754c5cdSZhichuang Sun
74*7754c5cdSZhichuang Sun`Attestation.IdentityAuthentication` provides identity verification information.
75*7754c5cdSZhichuang SunTwo associations are proposed to link it to the requester and the responder's
76*7754c5cdSZhichuang Suncertificates.
77*7754c5cdSZhichuang Sun
78*7754c5cdSZhichuang Sun`Attestation.MeasurementSet` defines the dbus method to get SPDM measurements.
79*7754c5cdSZhichuang SunIt can be extended to measurements fetched using other protocol in the future.
80*7754c5cdSZhichuang Sun
81*7754c5cdSZhichuang SunThe proposed Phosphor D-Bus Interfaces is here:
82*7754c5cdSZhichuang Sun[component-integrity](https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64354).
83*7754c5cdSZhichuang Sun
84*7754c5cdSZhichuang Sun### TrustedComponent related D-Bus Interfaces
85*7754c5cdSZhichuang Sun
86*7754c5cdSZhichuang SunWe also propose to add one Inventory interface for `TrustedComponent`, namely
87*7754c5cdSZhichuang Sun`Inventory.Item.TrustedComponent`. `TrustedComponent` represents a trusted
88*7754c5cdSZhichuang Sunhardware component, typically known as Root of Trust(ROT). It can be an
89*7754c5cdSZhichuang Sunexternally attached security chip, like a TPM, or a hardware IP integrated into
90*7754c5cdSZhichuang Suna device. It can securely measure the integrity information of a device.
91*7754c5cdSZhichuang Sun
92*7754c5cdSZhichuang Sun`Inventory.Item.TrustedComponent` interface defines the following properties
93*7754c5cdSZhichuang Sun
94*7754c5cdSZhichuang Sun- `AttachmentType`, which gives information on whether this trusted component is
95*7754c5cdSZhichuang Sun  integrated into the device or is discrete from the device.
96*7754c5cdSZhichuang Sun
97*7754c5cdSZhichuang SunA `TrustedComponent` is typically associated with other hardware components
98*7754c5cdSZhichuang Sunwhich it is protecting. It should also be associated with the component
99*7754c5cdSZhichuang Sunintegrity object reported by this `TrustedComponent`.
100*7754c5cdSZhichuang Sun
101*7754c5cdSZhichuang SunThe proposed Phosphor D-Bus Interfaces for `TrustedComponent` is here:
102*7754c5cdSZhichuang Sun[trusted-component](https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64355).
103*7754c5cdSZhichuang Sun
104*7754c5cdSZhichuang Sun### SPDM Attestation D-Bus Daemon
105*7754c5cdSZhichuang Sun
106*7754c5cdSZhichuang Sun[Experimental support for SPDM exists for `bmcweb`](https://github.com/openbmc/bmcweb/compare/master...sunzc:bmcweb:spdm),
107*7754c5cdSZhichuang Sunwhich adds routes in the BMCWeb for `ComponentIntegrity` and `TrustedComponent`
108*7754c5cdSZhichuang Sunto support it. But BMCWeb collects the information from D-Bus. The SPDM
109*7754c5cdSZhichuang SunAttestation D-Bus Daemon does the actual work.
110*7754c5cdSZhichuang Sun
111*7754c5cdSZhichuang SunSPDM protocol needs to be bound to a transport layer protocol, which transmits
112*7754c5cdSZhichuang SunSPDM messages between the BMC and the device. The transport layer protocol can
113*7754c5cdSZhichuang Sunbe MCTP, PCIe-DOE, or even TCP socket. For MCTP, the lower physical layer can be
114*7754c5cdSZhichuang SunPCI-VDM, SMBus/I2C, and so on. Note,
115*7754c5cdSZhichuang Sun[`libspdm` already provides transport layer protocol binding](https://github.com/DMTF/libspdm/blob/main/include/internal/libspdm_common_lib.h#L445-L446)
116*7754c5cdSZhichuang Sunwith message encoding/decoding support. The device send/receive function is left
117*7754c5cdSZhichuang Sunfor SPDM daemon to implement If the transport layer is using standard MCTP or
118*7754c5cdSZhichuang SunPCIe-DOE, setting up the transport layer connection could be easy. In this
119*7754c5cdSZhichuang Sundesign, we only consider SPDM over standard MCTP and PCIe-DOE connection.
120*7754c5cdSZhichuang Sun
121*7754c5cdSZhichuang SunFor SPDM-over-MCTP, SPDM daemon can query the mctpd for information about MCTP
122*7754c5cdSZhichuang Sunendpoint, including the endpoint id(eid) and upper layer responder, and create a
123*7754c5cdSZhichuang Sunconnection only for endpoint that has SPDM as its upper layer responder.
124*7754c5cdSZhichuang Sun
125*7754c5cdSZhichuang SunFor SPDM-over-PCIe-DOE, SPDM daemon need the PCIe device BDF to handle DOE
126*7754c5cdSZhichuang Sunmailbox discovery. Given that not all PCIe devices support DOE support SPDM, we
127*7754c5cdSZhichuang Suncannot query about whether a DOE capable device supports SPDM. Therefore, we
128*7754c5cdSZhichuang Sunneed a way to pass the device info to the dameon. However, PCIe device
129*7754c5cdSZhichuang SunBDF(Bus:Device:Function) info are dynamically assigned during system boot. The
130*7754c5cdSZhichuang Sunsame device may get assigned different BDF on different machine. What the daemon
131*7754c5cdSZhichuang Sunneeds should be the PCIe device ID, which is identified by `VendorId:DeviceId`.
132*7754c5cdSZhichuang SunFor the convenience of configuration, we should pass PCIe device ID to the
133*7754c5cdSZhichuang Sundaemon, so that the daemon can enumerate all the PCIe devices and find the
134*7754c5cdSZhichuang Sunmatching devices by their device ID. There are different ways to pass PCIe
135*7754c5cdSZhichuang Sundevice ID info to the dameon, e.g., configuration file, command line parameters.
136*7754c5cdSZhichuang Sun
137*7754c5cdSZhichuang SunFor PCIe DOE devices, SPDM daemon can enumerage all PCI devices under sysfs and
138*7754c5cdSZhichuang Sunfind out all BDFs with matching `VendorId:DeviceId`. SPDM daemon also needs to
139*7754c5cdSZhichuang Sunquery `InventoryManager` to get all PCI device inventory paths. By querying
140*7754c5cdSZhichuang Sun`InventoryManager` managed objects and checking object interface
141*7754c5cdSZhichuang Sun`xyz.openbmc_project.Inventory.Item.PCIeDevice`, which has property
142*7754c5cdSZhichuang Sun`FunctionXVendorId` and `FunctionXDeviceId` (X represents numbers from 0 to 7),
143*7754c5cdSZhichuang Sunwe can find all PCI device inventory paths with matching `VendorId:DeviceId`. So
144*7754c5cdSZhichuang Sunfar, there is no universal way to map a given device's BDF to its inventory
145*7754c5cdSZhichuang Sunpath. It is up to the vendor to do the association.
146*7754c5cdSZhichuang Sun
147*7754c5cdSZhichuang SunFor MCTP devices detection, the community has been working on `mctpreactor`
148*7754c5cdSZhichuang Sundaemon in dbus-sensors to handle the configuration. The link to implementation
149*7754c5cdSZhichuang Sunis [here](https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/69111), the
150*7754c5cdSZhichuang Sunrelated PR discussion is [here](https://github.com/CodeConstruct/mctp/pull/17).
151*7754c5cdSZhichuang SunSPDM daemon will monitor `mctpd` for `InterfacesAdded` signals providing the
152*7754c5cdSZhichuang Sun`xyz.openbmc_project.MCTP.Endpoint` interface, which exposes the message types
153*7754c5cdSZhichuang Sunsupported by the endpoint in the `SupportedMessageTypes` member. SPDM daemon set
154*7754c5cdSZhichuang Sunup a connection with the SPDM-capable endpoints to get certificates and
155*7754c5cdSZhichuang Sunmeasurements. For signals sent before SPDM daemon launches, SPDM daemon should
156*7754c5cdSZhichuang Sunquery the `mctpd` for any detected endpoints after it gets launched.
157*7754c5cdSZhichuang Sun
158*7754c5cdSZhichuang SunBelow is a high-level diagram showing the relationship between different
159*7754c5cdSZhichuang Suncomponents.
160*7754c5cdSZhichuang Sun
161*7754c5cdSZhichuang Sun```
162*7754c5cdSZhichuang Sun    +------+            +---------+
163*7754c5cdSZhichuang Sun    |Client|            |Inventory|
164*7754c5cdSZhichuang Sun    +--+---+            |Manager  |
165*7754c5cdSZhichuang Sun       |                +---^-----+           +-------+
166*7754c5cdSZhichuang Sun       |                    |                 |PCIe   |
167*7754c5cdSZhichuang Sun    +--v---+            +---+---+------------>|Device |
168*7754c5cdSZhichuang Sun    |BMCWeb+----------->|SPDM   |             +-------+
169*7754c5cdSZhichuang Sun    +------+            |Daemon |
170*7754c5cdSZhichuang Sun                        +---+---+------------>+-------+
171*7754c5cdSZhichuang Sun                            |                 |MCTP   |
172*7754c5cdSZhichuang Sun                        +---v---+             |Device |
173*7754c5cdSZhichuang Sun                        |mctpd  |             +-------+
174*7754c5cdSZhichuang Sun                        +-------+
175*7754c5cdSZhichuang Sun```
176*7754c5cdSZhichuang Sun
177*7754c5cdSZhichuang SunA reference D-Bus Daemon workflow would be like this:
178*7754c5cdSZhichuang Sun
179*7754c5cdSZhichuang Sun0. (Probing phase) Entity Manager will parse the configuration file for trusted
180*7754c5cdSZhichuang Sun   components; mctpd finish discovery of mctp endpoints. These are prerequisites
181*7754c5cdSZhichuang Sun   for SPDM daemon.
182*7754c5cdSZhichuang Sun1. Check transport layer protocol. For MCTP, it queries mctpd to gather all eids
183*7754c5cdSZhichuang Sun   that support SPDM; For PCIe-DOE, it performs DOE mailbox discovery with the
184*7754c5cdSZhichuang Sun   PCIe device ID.
185*7754c5cdSZhichuang Sun2. For each endpoint, which could be MCTP or PCIe-DOE, SPDM daemon query Entity
186*7754c5cdSZhichuang Sun   Manger for the matching trusted component configuration. It then creates and
187*7754c5cdSZhichuang Sun   initializes the corresponding D-Bus object for `TrustedComponent` and
188*7754c5cdSZhichuang Sun   `ComponentIntegrity` with device specific information.
189*7754c5cdSZhichuang Sun3. Create the associations between the above objects and associations with other
190*7754c5cdSZhichuang Sun   objects, e.g., protected components, active software images;
191*7754c5cdSZhichuang Sun4. Set up a connection between the BMC and each SPDM-capable device;
192*7754c5cdSZhichuang Sun5. Initialize the SPDM context on top of the connection.
193*7754c5cdSZhichuang Sun6. Exchange SPDM messages to get device certificates.
194*7754c5cdSZhichuang Sun7. Create device certificate objects and create certificate associations for
195*7754c5cdSZhichuang Sun   trusted component object and component integrity object.
196*7754c5cdSZhichuang Sun8. Wait on D-Bus and serve any runtime `SPDMGetSignedMeasurements` requests.
197*7754c5cdSZhichuang Sun
198*7754c5cdSZhichuang Sun### Device Certificate
199*7754c5cdSZhichuang Sun
200*7754c5cdSZhichuang SunIn OpenBMC, there is a
201*7754c5cdSZhichuang Sun[certificate manager](https://github.com/openbmc/phosphor-certificate-manager),
202*7754c5cdSZhichuang Sunwhich allows users to install or replace server/client certificates. However,
203*7754c5cdSZhichuang Sunthe existing certificates manager is designed for managing server/client
204*7754c5cdSZhichuang Suncertificates for HTTPS/LDAP services. It's not suitable for device certificates.
205*7754c5cdSZhichuang SunExisting cert manager has several limitations:
206*7754c5cdSZhichuang Sun
207*7754c5cdSZhichuang Sun- Each manager can only manage one certificate.
208*7754c5cdSZhichuang Sun- Each manager assumes access to both the private key and the public key (e.g.,
209*7754c5cdSZhichuang Sun  for completing CSR request).
210*7754c5cdSZhichuang Sun
211*7754c5cdSZhichuang SunDevice certificates have different requirements:
212*7754c5cdSZhichuang Sun
213*7754c5cdSZhichuang Sun- Device certificate manager manages several certificates for a group of
214*7754c5cdSZhichuang Sun  devices, for example, four GPUs would have four certificates.
215*7754c5cdSZhichuang Sun- Device certificate does not assume private key access. It is used for identity
216*7754c5cdSZhichuang Sun  authentication only. It does not provide CSR signing services. The private key
217*7754c5cdSZhichuang Sun  should never leave the device Root of Trust(RoT) component.
218*7754c5cdSZhichuang Sun
219*7754c5cdSZhichuang SunFor device certificates, we only need to create/replace certificate objects, no
220*7754c5cdSZhichuang Sunneed for a global cert manager that "manages" the device certificates. SPDM
221*7754c5cdSZhichuang SunD-Bus daemon can simply talk to the devices, get the certificates from them, and
222*7754c5cdSZhichuang Suncreate D-Bus object for the certificates.
223*7754c5cdSZhichuang Sun
224*7754c5cdSZhichuang SunIn Redfish, device certificates are under Chassis, and are accessible via
225*7754c5cdSZhichuang Sun`/redfish/v1/Chassis/{ChassisId}/Certificates/`. Existing cert manager
226*7754c5cdSZhichuang Sunconstructs cert path following the pattern
227*7754c5cdSZhichuang Sun`"/xyz/openbmc_project/certs/{type}/{endpoint}".` To comply with it, we propose
228*7754c5cdSZhichuang Sunto put device certificates under
229*7754c5cdSZhichuang Sun`/xyz/openbmc_project/certs/chassis/{ChassisId}/{certsId}`. So that for all
230*7754c5cdSZhichuang Sundevice certificates on a chassis, we can find those certificates with its
231*7754c5cdSZhichuang SunchassisId on D-Bus.
232*7754c5cdSZhichuang Sun
233*7754c5cdSZhichuang Sun### BMCWeb Support
234*7754c5cdSZhichuang Sun
235*7754c5cdSZhichuang SunIn BMCWeb, we need to add routes handler for `ComponentIntegrity`,
236*7754c5cdSZhichuang Sun`TrustedComponent` and `Certificates`. The corresponding URI are specified as
237*7754c5cdSZhichuang Sunfollows according to Redfish spec:
238*7754c5cdSZhichuang Sun
239*7754c5cdSZhichuang Sun- `/redfish/v1/ComponentIntegrity/`
240*7754c5cdSZhichuang Sun- `/redfish/v1/Chassis/{ChassisId}/TrustedComponents/`
241*7754c5cdSZhichuang Sun- `/redfish/v1/Chassis/{ChassisId}/Certificates/`
242*7754c5cdSZhichuang Sun
243*7754c5cdSZhichuang SunOn the D-Bus Daemon side, we propose that the dbus objects are organized in the
244*7754c5cdSZhichuang Sunfollowing way:
245*7754c5cdSZhichuang Sun
246*7754c5cdSZhichuang Sun- `/xyz/openbmc_project/ComponentIntegrity/{ComponentIntegrityId}`
247*7754c5cdSZhichuang Sun- `/xyz/openbmc_project/TrustedComponents/{TrustedComponentId}`
248*7754c5cdSZhichuang Sun- `/xyz/openbmc_project/certs/devices/{ChassisId}/{CertId}`
249*7754c5cdSZhichuang Sun
250*7754c5cdSZhichuang SunIn BMCWeb, we can reconstruct the following redfish URI by querying the
251*7754c5cdSZhichuang Sunassociated Chassis from the trusted component:
252*7754c5cdSZhichuang Sun
253*7754c5cdSZhichuang Sun- `/redfish/v1/Chassis/{ChassisId}/TrustedComponents/{TrustedComponentId}`
254*7754c5cdSZhichuang Sun
255*7754c5cdSZhichuang Sun## Alternatives Considered
256*7754c5cdSZhichuang Sun
257*7754c5cdSZhichuang SunAlternative way to manage device certificates would be modifying existing
258*7754c5cdSZhichuang Sun[phosphor-certificate-manager](https://github.com/openbmc/phosphor-certificate-manager).
259*7754c5cdSZhichuang Sun
260*7754c5cdSZhichuang SunDevice certificates management has two steps:
261*7754c5cdSZhichuang Sun
262*7754c5cdSZhichuang Sun- Step 1: fetch device certificate by exchange SPDM messages with device.
263*7754c5cdSZhichuang Sun- Step 2: create or update a dbus certificate object.
264*7754c5cdSZhichuang Sun
265*7754c5cdSZhichuang SunStep 1 can only be handled by the SPDM daemon. Step 2 is simple enough to be
266*7754c5cdSZhichuang Sunhandled by the D-Bus daemon, too. It would be a over-kill to modify existing
267*7754c5cdSZhichuang Sunphosphor-certificate-manager for the sole purpose.
268*7754c5cdSZhichuang Sun
269*7754c5cdSZhichuang Sun## Impacts
270*7754c5cdSZhichuang Sun
271*7754c5cdSZhichuang SunThis change will:
272*7754c5cdSZhichuang Sun
273*7754c5cdSZhichuang Sun- Create a SPDM daemon that can do SPDM attestation for SPDM-capable devices
274*7754c5cdSZhichuang Sun  over PCIe DOE or MCTP.
275*7754c5cdSZhichuang Sun- Add `ComponentIntegrity` and `TrustedComponent` related D-Bus interfaces in
276*7754c5cdSZhichuang Sun  phosphor-dbus-interfaces.
277*7754c5cdSZhichuang Sun- Extend existing certificate service in BMCWeb.
278*7754c5cdSZhichuang Sun- Add SPDM support in BMCWeb with new routes.
279*7754c5cdSZhichuang Sun
280*7754c5cdSZhichuang Sun### Organizational
281*7754c5cdSZhichuang Sun
282*7754c5cdSZhichuang SunThis repository requires creating a new repository for the SPDM daemon. In
283*7754c5cdSZhichuang Sunaddition, the following repositories are expected to be modified to execute this
284*7754c5cdSZhichuang Sundesign:
285*7754c5cdSZhichuang Sun
286*7754c5cdSZhichuang Sun- https://github.com/openbmc/bmcweb
287*7754c5cdSZhichuang Sun- https://github.com/openbmc/phosphor-dbus-interfaces
288*7754c5cdSZhichuang Sun
289*7754c5cdSZhichuang Sun## Testing
290*7754c5cdSZhichuang Sun
291*7754c5cdSZhichuang Sun### Unit Test
292*7754c5cdSZhichuang Sun
293*7754c5cdSZhichuang SunFor the BMCWeb changes, unit test can be done with the Redfish Service
294*7754c5cdSZhichuang SunValidator.
295*7754c5cdSZhichuang Sun
296*7754c5cdSZhichuang SunFor the SPDM Attestation D-Bus Daemon, unit tests should cover the following
297*7754c5cdSZhichuang Suncases:
298*7754c5cdSZhichuang Sun
299*7754c5cdSZhichuang Sun- Set up a transport layer connection with the device.
300*7754c5cdSZhichuang Sun- SPDM connection setup, including get capabilities, negotiate algorithms.
301*7754c5cdSZhichuang Sun- Get device certificates from device and create D-Bus object.
302*7754c5cdSZhichuang Sun- `SPDMGetSignedMeasurements` method test.
303*7754c5cdSZhichuang Sun- Enumerate trusted component D-Bus objects and check properties and
304*7754c5cdSZhichuang Sun  associations.
305*7754c5cdSZhichuang Sun- Enumerate component integraty D-Bus objects and check properties and
306*7754c5cdSZhichuang Sun  associations.
307*7754c5cdSZhichuang Sun
308*7754c5cdSZhichuang Sun### Integration Test
309*7754c5cdSZhichuang Sun
310*7754c5cdSZhichuang SunBMCWeb/D-Bus Daemon integration test should cover the following type of
311*7754c5cdSZhichuang Sunrequests:
312*7754c5cdSZhichuang Sun
313*7754c5cdSZhichuang Sun- Get a collection of `ComponentIntegrity` resources.
314*7754c5cdSZhichuang Sun- Get a collection of `TrustedComponent` resource.
315*7754c5cdSZhichuang Sun- Get properties of a `ComponentIntegrity` resources.
316*7754c5cdSZhichuang Sun- Get properties of a `TrustedComponent` resource.
317*7754c5cdSZhichuang Sun- Follow the resouces link to get the device certificates.
318*7754c5cdSZhichuang Sun- Call Action on the `ComponentIntegrity` resource to get measurements.
319