Use sample application for guest attestation
The guest attestation feature helps you to confirm that a confidential VM runs on a hardware-based trusted execution environment (TEE) with security features enabled for isolation and integrity.
Sample applications for use with the guest attestation APIs are available on GitHub.
Depending on your type of scenario, you can reuse the sample code in your client program or workload code.
- An Azure subscription.
- An Azure confidential VM or a VM with trusted launch enabled. You can use a Linux or Windows VM.
Use sample application
To use a sample application in C++ for use with the guest attestation APIs, follow the instructions for your operating system (OS).
Sign in to your VM.
Clone the sample Linux application.
build-essentialpackage. This package installs everything required for compiling the sample application.
sudo apt-get install build-essential
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libjsoncpp-dev
Download the attestation package from https://packages.microsoft.com/repos/azurecore/pool/main/a/azguestattestation1/.
Install the attestation package. Make sure to replace
<version>with the version that you downloaded.
sudo dpkg -i azguestattestation1_<latest-version>_amd64.deb