Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Conversation

@Hulongyin
Copy link
Contributor

This PR is to add verify RTMR with replayed event log related content to the How_to_Protect_AI_Models_in_Cloud_Native_Environments documentation.

@Hulongyin Hulongyin added the documentation Improvements or additions to documentation label Feb 1, 2024
@Hulongyin Hulongyin self-assigned this Feb 1, 2024
@Hulongyin Hulongyin requested a review from dongx1x February 1, 2024 07:47
@Hulongyin Hulongyin force-pushed the doc_eventlog branch 5 times, most recently from 81b37f0 to 0f0d371 Compare February 5, 2024 06:39
This design can be divided into three steps logically.
This design can be divided into four steps logically.
- A plain AI model is preprocessed before uploading or use in cloud native environment. AI model should be encrypted offline, and the encryption key will be stored in a key database server.
- Fetch and verify event logs. Event log is the record of measurements made to PCRs by the Platform Firmware, with some informational events not extended to PCRs. The informational events are used to convey valuable information to an evaluator of the log. Each measurement made, as well as the information events, are recorded in the event log as individual entries with specified fields. Event logs can assist the attestation/verification process. For more detail, please refer to [TCG_PCClient Spec](https://trustedcomputinggroup.org/wp-content/uploads/TCG_PCClientSpecPlat_TPM_2p0_1p04_pub.pdf).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCRs?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event logs or event log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.


The service supports attestation, measurement fetching and event log collecting of various platforms including Intel TDX, Trusted Platform Modules (TPM) and AMD Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP) (will be supported soon).

CCNP is a good choice to get event log and it hides the complexity and is easy to use, sample code from CCNP:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CCNP is a good choice to fetch these evidences including measurements and event logs, which hides the complexity of the underlying platforms and increase the usability of the APIs. Here's the sample code using CCNP:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, all fixed.

CCNP is a good choice to get event log and it hides the complexity and is easy to use, sample code from CCNP:

```Python
from ccnp import Eventlog, EventlogType
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import "EventlogType"

event_logs = Eventlog.get_platform_eventlog()
```

To verify that event log has not been tampered with, we can compare IMR (Integrated Measurement Register) value from CCNP fetching and replayed via event log.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To verify that the event logs have not been tampered with, we can compare the measurement replayed from event logs with the IMR (Integrated Measurement Register) values fetched using CCNP.

CNAP project’s Inference Service flow of getting AI model should be updated to support TEE environment since the AI model has been encrypted:

- Deploy CCNP as a [DaemonSet](https://intel.github.io/confidential-cloud-native-primitives/_rst/service.quote.html#deploy-as-daemonset-in-kubernetes), it will detect the TEE environment.
- Fetch and verify evnet log.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo. "evnet log" -> "event log"

### 2.5 Attestation
### 2.5 Fetch and Verify Event Log

CCNP provides an easy way to fetch and verify event log in TEE. After fetching event log, we can compare IMR (Integrated Measurement Register) value from CCNP fetching and replayed via event log to verify that event log has not been tampered with.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can compare the measurement replayed from event logs with the IMR (Integrated Measurement Register) values fetched using CCNP to verify that event logs have not been tampered with.

This document describes a common architecture to “design and run” a native AI Model into confidential computing environments. (1) AI Model preprocess (2) Attestation of the cloud native environment (3) AI Model fetching and decryption.
Intel’s TDX technology can provide a TEE running environment, and CCNP can simply the attestation of confidential native environment, last but not least, a sample KBS is introduced to help customer to connect with its own or vendor-independent attestation service (for example, Intel Trust Authority).
This document describes a common architecture to “design and run” a native AI Model into confidential computing environments. (1) AI Model preprocess (2) Fetch and verify event logs (3) Attestation of the cloud native environment (4) AI Model fetching and decryption.
Intel’s TDX technology can provide a TEE running environment, and CCNP can simply the event log, measurement fetching and attestation of confidential native environment, last but not least, a sample KBS is introduced to help customer to connect with its own or vendor-independent attestation service (for example, Intel Trust Authority).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can simply -> an simplify

Signed-off-by: Longyin Hu <longyin.hu@intel.com>
Copy link
Contributor

@dongx1x dongx1x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dongx1x dongx1x merged commit 1d2ff07 into intel:main Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants