mithril-security / blindai

Confidential AI deployment with secure enclaves :lock:
https://www.mithrilsecurity.io/
Apache License 2.0
502 stars 36 forks source link

AllowDebug false in policy.toml #25

Closed cchudant closed 2 years ago

cchudant commented 2 years ago

Description

When building in release mode for hardware mode, we should generate a policy.toml file that does not allow SGX debug mode. This probably requires changes to the rust code in order to launch the enclave in non-debug mode.

Motivation and Context

The hardware docker image we publish on dockerhub has no reason to have SGX debug mode on.

We should add a build option / environment variable to generate allow-debug policy files, for dev purposes.

Test plans

Either

This is a good opportunity to add the following tests:

Additional Information

none

Checklist

JoFrost commented 2 years ago

Noted and accepted. Applying this won't ask for much changes. As we are only supporting SGX+FLC and higher, we can disable debug by default without drawbacks. Doing a debug feature that will switch the enclave to debug mode is the right move.