diff --git a/sgx.attest.sample.intel.sdk/readme.md b/sgx.attest.sample.intel.sdk/readme.md index 0407df5..f222900 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: ``` @@ -115,8 +127,19 @@ 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 +sudo apt install libsecret-1-dev +``` + +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 +``` -4. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** +7. Reboot the VM. **This is required to complete the SGX DCAP driver installation.** ``` sudo reboot now @@ -160,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 ``` 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));