From 504acfd49c32af5eae07b2a8f0a18451313754d2 Mon Sep 17 00:00:00 2001 From: Bala Siva Sai Akhil Malepati Date: Thu, 29 Jun 2023 19:16:33 -0700 Subject: [PATCH 1/5] Add few pre-requisites required for generating quote --- sgx.attest.sample.intel.sdk/readme.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sgx.attest.sample.intel.sdk/readme.md b/sgx.attest.sample.intel.sdk/readme.md index 0407df5..e26764a 100644 --- a/sgx.attest.sample.intel.sdk/readme.md +++ b/sgx.attest.sample.intel.sdk/readme.md @@ -115,8 +115,13 @@ rm packages-microsoft-prod.deb sudo apt update sudo apt install -y apt-transport-https && sudo apt update && sudo apt install -y dotnet-sdk-5.0 ``` +4. Install pre-requisites +``` +sudo apt-get install build-essential +sudo apt-get install libssl-dev +``` -4. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** +5. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** ``` sudo reboot now From be992ea1739586a4ed22fb1c21961f118408f415 Mon Sep 17 00:00:00 2001 From: Bala Siva Sai Akhil Malepati Date: Thu, 29 Jun 2023 19:22:47 -0700 Subject: [PATCH 2/5] Add details about Installing Azure DCAP Client --- sgx.attest.sample.intel.sdk/readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sgx.attest.sample.intel.sdk/readme.md b/sgx.attest.sample.intel.sdk/readme.md index e26764a..76dcfc6 100644 --- a/sgx.attest.sample.intel.sdk/readme.md +++ b/sgx.attest.sample.intel.sdk/readme.md @@ -94,6 +94,18 @@ sudo chmod a+x sgx_linux_x64_sdk.bin sudo ./sgx_linux_x64_sdk.bin ``` +If you have installed Intel SGX DCAP Quote Provider Library (QPL), you have to purge it: +``` +apt purge libsgx-dcap-default-qpl +``` + +Install Azure DCAP Client: +``` +echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main" | sudo tee /etc/apt/sources.list.d/msprod.listdeb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main +sudo apt update +sudo apt install az-dcap-client +``` + Specify a directory to install the Intel SGX SDK. For example, `/opt/intel` If the SDK is installed into /opt/intel, run the following command: ``` From 1462e830def98ac63793c80abb40b877b4f8ee79 Mon Sep 17 00:00:00 2001 From: Bala Siva Sai Akhil Malepati Date: Thu, 29 Jun 2023 19:25:47 -0700 Subject: [PATCH 3/5] Add pre-requisite for installing libsecret-1-dev This is required for the quote verification part, where a shared library 'libsecret-1.so.0' is one of the dependencies --- sgx.attest.sample.intel.sdk/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sgx.attest.sample.intel.sdk/readme.md b/sgx.attest.sample.intel.sdk/readme.md index 76dcfc6..579b4cb 100644 --- a/sgx.attest.sample.intel.sdk/readme.md +++ b/sgx.attest.sample.intel.sdk/readme.md @@ -131,6 +131,7 @@ sudo apt install -y apt-transport-https && sudo apt update && sudo apt install - ``` sudo apt-get install build-essential sudo apt-get install libssl-dev +sudo apt install libsecret-1-dev ``` 5. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** From 0e6b91b558492f9b683e181a14e2df4588452812 Mon Sep 17 00:00:00 2001 From: Bala Siva Sai Akhil Malepati Date: Fri, 30 Jun 2023 02:32:41 +0000 Subject: [PATCH 4/5] Excluding SharedTokenCacheCredential to avoid D-Bus related Error --- sgx.attest.sample.intel.sdk/validatequotes.core/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgx.attest.sample.intel.sdk/validatequotes.core/Program.cs b/sgx.attest.sample.intel.sdk/validatequotes.core/Program.cs index 80848f8..da275ba 100644 --- a/sgx.attest.sample.intel.sdk/validatequotes.core/Program.cs +++ b/sgx.attest.sample.intel.sdk/validatequotes.core/Program.cs @@ -71,7 +71,7 @@ public async Task RunAsync() return Task.CompletedTask; }; - var maaService = new AttestationClient(new Uri(endpoint), new DefaultAzureCredential(), options); + var maaService = new AttestationClient(new Uri(endpoint), new DefaultAzureCredential(new DefaultAzureCredentialOptions { ExcludeSharedTokenCacheCredential = true }), options); BinaryData sgxEnclaveReport = BinaryData.FromBytes(HexHelper.ConvertHexToByteArray(enclaveInfo.QuoteHex)); From 30ea6bf56cc635be2a77984cce1cf4e3a2049c53 Mon Sep 17 00:00:00 2001 From: Bala Siva Sai Akhil Malepati Date: Thu, 29 Jun 2023 19:51:36 -0700 Subject: [PATCH 5/5] Add instructions for Azure CLI installation and Azure login This is required for verification of quote(s) --- sgx.attest.sample.intel.sdk/readme.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sgx.attest.sample.intel.sdk/readme.md b/sgx.attest.sample.intel.sdk/readme.md index 579b4cb..f222900 100644 --- a/sgx.attest.sample.intel.sdk/readme.md +++ b/sgx.attest.sample.intel.sdk/readme.md @@ -134,7 +134,12 @@ sudo apt-get install libssl-dev sudo apt install libsecret-1-dev ``` -5. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** +5. Install Azure CLI (https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-1-install-with-one-command) +``` +curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash +``` + +7. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** ``` sudo reboot now @@ -178,12 +183,16 @@ sudo ./runall.sh This runs the application in four different enclave configurations to generate four different remote quotes. You should see four new files created in the ```./genquotes/out``` directory. -5. Build, run and validate the JSON files with the MAA service do the following: +5. Perform Azure login, build, run and validate the JSON files with the MAA service do the following: ``` cd validatequotes.core ``` +``` +az login +``` + ``` ./runall.sh ```