-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable DCAP quote generation #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions:
- Has this PR been tested when SPID/SPID_API_KEY aren't provided in DCAP mode, or does the eservice still expect dummy values for these?
- This may be a bit tangential: This PR presumably uses the latest SGX SDK 2.17 (Docker certainly always installs the latest). It may be good to update the documentation accordingly. Does this PR also require the latest SGX SSL?
EDIT: One more thing: the CI fails for wawaka, though at first glance the issue seems to be with CCF... not sure if these changes led to this problem, since the other CI instances did not fail.
eservice/bin/register-with-ledger.sh
Outdated
DeriveIasPublicKey | ||
Register | ||
else | ||
yell Registration failed! PDO_ATTESTATION_TYPE not set to epid-linkable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't we want to register DCAP quoting enclave keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eservice/pdo/eservice/pdo_enclave.py
Outdated
@@ -233,7 +242,7 @@ def get_enclave_service_info(spid, config=None) : | |||
logger.debug("Attempting to load enclave at: %s", signed_enclave) | |||
|
|||
num_of_enclaves = 1 | |||
pdo = enclave.pdo_enclave_info(signed_enclave, spid, num_of_enclaves) | |||
pdo = enclave.pdo_enclave_info(signed_enclave, spid, attestations_type, num_of_enclaves) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pdo = enclave.pdo_enclave_info(signed_enclave, spid, attestations_type, num_of_enclaves) | |
pdo = enclave.pdo_enclave_info(signed_enclave, spid, attestation_type, num_of_enclaves) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
This error was not detected during tests because this piece of code is not tested in this PR, but it is tested in #380 .
Hence, I'm going to covert this to a draft until the other is merged (and this is rebased).
(Long explanation, for the records)
The registration of the enclave info and IAS keys on the ledger is performed through the register-with-ledger.sh
script. This is only triggered in Sawtooth builds in HW mode, since CCF builds do not support HW mode currently.
This is visible in the docker/Makefile
, specifically in the make [..] register
occurrences.
The removal of Sawtooth implies the removal of the tests of the registration procedure -- which uses the python code for grabbing an enclave attestation to get the mrenclave and basename. This would result in a lower test coverage.
For this reason, #380 adds a make [..] register
occurrence in the test-env-setup-with-no-build-ccf
section.
This makes sure that the script is still triggered in HW mode.
This is important in conjunction with #379 , which allows to execute (only) the eservice in HW mode.
The script does not trigger errors since the interaction with the ledger is removed (again, the CCF TP does not support this feature), but provides warnings to remind to fix this once CCF TP support is completed.
In #382 , the script is further refined to trigger the registration only in HW mode when EPID is selected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter.
Nothing has changed regarding that. Info about the sdk the ssl are here:
I think I can safely say that that's an old issue (present also in main) which we still have not figure out. |
Signed-off-by: Bruno Vavala <[email protected]>
b754d72
to
bff1abc
Compare
Signed-off-by: Bruno Vavala <[email protected]>
Signed-off-by: Bruno Vavala <[email protected]>
bff1abc
to
6c08951
Compare
Closing it for now -- stale. |
This PR enables DCAP quote generation in PDO, alongside EPID quotes.
The PR adds the following features:
PDO_ATTESTATION_TYPE
variable to specify the type of attestation. Currently, it supports the following values:simulated
in SIM mode;epid-linkable
ordcap
in HW mode.PCCS_URL
variable.Testing.
Error returned from the p_sgx_get_quote_config API. 0xe019
./etc/sgx_default_qcnl.conf
on the host, or in the container, is set up correctly with a reachable PCCS.