occlum/demos/remote_attestation
Junxian Xiao 86d11e9d44 Refactor the remote attestation demo
This commits consists of three major changes:

1. Support a new interface to get the base64 quote only.
This is useful in the case that application sends the quote
to service provider server and get the final IAS report there.
The application itself doesn't depend on IAS in this case.

2. Improve the C++ programming style. Now, we only provide
C++ classes and limited C APIs(for configuration and sgx device).

3. Use the more general keywords as names prefix.

Signed-off-by: Junxian Xiao <junxian.xjx@antfin.com>
2020-06-23 16:59:33 +08:00
..
app Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00
conf Support access key in remote attestaion demo 2020-06-05 14:52:31 +08:00
lib Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00
.gitignore Add SGX remote attestaion demo 2019-12-13 11:56:21 +00:00
CMakeLists.txt Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00
download_and_build.sh Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00
README.md Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00
run_on_occlum.sh Refactor the remote attestation demo 2020-06-23 16:59:33 +08:00

SGX Remote Attestation Demo

This project demonstrates how to do remote attestation on Occlum.

In a nutshell, Occlum provides SGX capabilities to user apps through ioctls on a special device (/dev/sgx). To hide the low-level details of ioctls from user apps, a user-friendly, remote attestation library is provided in this demo.

Prerequisites. This demo needs to access Intel Attestation Service (IAS). To do this, a developer needs to contact Intel to obtain a Service Provider ID (SPID) and the associated Access Key from here. After obtaining the SPID and Access Key, fill them in the config file conf/ra_config.json as shown below:

{
      "ias_url": "https://api.trustedservices.intel.com/sgx/dev/attestation/v4",
      "ias_access_key": "<YourAccessKey>",
      "enclave_spid": "<YourSPID>"
}

NOTE: The URL, SPID and Access Key above vary depending whether it is for development or production

Step 1. Build this demo

Build the code in debug mode with "--debug", otherwise it's in Relese mode by default.

./download_and_build.sh [--debug]

Step 2. Run this demo on Occlum

Build the occlum image and run the RA test application. Log level is "off" by default.

./run_on_occlum.sh [off|trace]