You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During my work on SGX attestation, RA-TLS, Secret Provisioning and MAA, there were several issues raised. I'll need to create PRs to fix each of them:
Update the attestation readthedocs page with more specifics:
A clear distinction between "attestation evidence" (= SGX quotes), "attestation results" (aka "attestation report", "attestation claims"), and "SGX attestation schemes". Also, "verifier" vs "attester" (="relying party"). Basically, introduce a glossary at the beginning of the section, and rewrite the text to follow this glossary.
Explain again the differences between EPID, DCAP and MAA (in the future) attestation schemes, from the perspective of a user of Gramine. E.g., that IAS and IAS-related env variables are only used for EPID. That the gramine-sgx-ias-request utility is used to manually send the SGX quote and receive the IAS attestation report -- but normal users don't need to use this utility because that stuff is done by RA-TLS under the hood.
Use more explicit logic of specifying envvars in manifest.template files:
Instead of this: sgx.ra_client_spid = "{{ env.get('RA_CLIENT_SPID', '') }}"
we need this: sgx.ra_client_spid = "{{ ra_client_spid }}"
with the corresponding line in the Makefile: gramine-manifest ... -Dra_client_spid=$(RA_CLIENT_SPID).
Replace this everywhere, in all examples, in all Gramine repos.
Use UNIX error codes in RA-TLS and Secret Prov libraries:
Currently, there is an ugly mix of mbedTLS error codes, cJSON error codes and curl error codes with UNIX error codes in RA-TLS and Secret Prov codebases.
We need to introduce helpers mbedtls_to_unix_errno(), cjson_to_unix_errno(), curl_to_unix_errno(), if there are no such already (I know for sure that there are no such funcs in mbedTLS).
Add more ERROR() prints in error paths where errno is not enough.
Introduce an envvar to choose between quiet and verbose modes in RA-TLS and Secret Prov.
In the ra-tls-mbedtls example, the "in-enclave client" logic got out of control:
There is the exact same logic to create the manifest for the "in-enclave" client for EPID and for DCAP:
Description of the problem
During my work on SGX attestation, RA-TLS, Secret Provisioning and MAA, there were several issues raised. I'll need to create PRs to fix each of them:
Update the
attestation
readthedocs page with more specifics:gramine-sgx-ias-request
utility is used to manually send the SGX quote and receive the IAS attestation report -- but normal users don't need to use this utility because that stuff is done by RA-TLS under the hood.Use more explicit logic of specifying envvars in
manifest.template
files:sgx.ra_client_spid = "{{ env.get('RA_CLIENT_SPID', '') }}"
sgx.ra_client_spid = "{{ ra_client_spid }}"
gramine-manifest ... -Dra_client_spid=$(RA_CLIENT_SPID)
.Use UNIX error codes in RA-TLS and Secret Prov libraries:
mbedtls_to_unix_errno()
,cjson_to_unix_errno()
,curl_to_unix_errno()
, if there are no such already (I know for sure that there are no such funcs in mbedTLS).ERROR()
prints in error paths where errno is not enough.Introduce an envvar to choose between quiet and verbose modes in RA-TLS and Secret Prov.
In the
ra-tls-mbedtls
example, the "in-enclave client" logic got out of control:gramine/CI-Examples/ra-tls-mbedtls/Makefile
Lines 114 to 152 in aa4486b
RA_TLS_CLIENT_INSIDE_SGX
envvar logic is redundant, and the librarylibra_tls_verify_dcap_gramine.so
can be removed:gramine/CI-Examples/ra-tls-mbedtls/src/client.c
Line 180 in aa4486b
libra_tls_verify_dcap_gramine.so
differs from the normallibra_tls_verify_dcap.so
only in thera_tls_verify_dcap_urts.c
file:gramine/Pal/src/host/Linux-SGX/tools/ra-tls/meson.build
Line 112 in aa4486b
ra_tls_verify_dcap_urts.c
file provides dummies: https://github.com/gramineproject/gramine/blob/master/Pal/src/host/Linux-SGX/tools/ra-tls/ra_tls_verify_dcap_urts.clibsgx_dcap_quoteverify.so
library, and how we can circumvent those dummies.The text was updated successfully, but these errors were encountered: