##Enclave Manager: Enclave is a trusted execution environment (TEE) embedded in a process. The enclave manager is a server that provides communication between the enclave and the APD.
- Deploy Enclave (/enclave/deploy): This takes as input github repo link, branch, and name & ID of enclave, and brings the enclave up and runs the application inside it.
- Inference (/enclave/inference): The enclave will send back the inference to the task manager, after it is done running the application.
- Get State (/enclave/state): This will return a json object of the current state of the application, its description and the step it's currently on.
- Set State (/enclave/setstate): This will post a json object containing current state of the application, its description, the step it's currently on and the maximum number of steps.
- create virtual environment.
python -m venv .env enclaveManager
- source the virtual environment.
source ~/.env/enclaveManager/bin/activate
- install the dependencies from requirements.txt.
pip3 install -r requirements.txt
- Then clone the current repo and save it in home directory as sgx-enclave-manager.
git clone git@github.com:datakaveri/sgx-enclave-manager.git
The enclave manager server can be accessed in two different ways:
The enclave manager server runs publicly as a systemd service (enclavemanager). These endpoints can be run on the following domain: https://enclave-manager-sgx.iudx.io/ . It has the endpoints mentioned above. It requires basic authentication.
Steps:
- Move the systemd services to /etc/systemd/system.
cp ~/sgx-enclave-manager/systemd_services/enclavemanager.service /etc/systemd/system
cp ~/sgx-enclave-manager/systemd_services/enclave-manager-rev-tun.service /etc/systemd/system
- start the services.
sudo systemctl start enclavemanager.service
sudo systemctl start enclave-manager-rev-tun.service
- Access endpoints on https://enclave-manager-sgx.iudx.io/ .
The enclave manager server can be run locally on http://127.0.0.1:4000 or http://192.168.1.199:4000 for remote access. Steps:
- Run the following commands in terminal.
cd sgx-enclave-manager
./em.sh
- The server is now running on localhost and the endpoints can be accessed using Postman.