Skip to content
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

Add Azure TDX (preview) support #170

Closed
wants to merge 3 commits into from

Commits on Jun 21, 2023

  1. attester: Make Attester::get_evidence() async

    Marking get_evidence as async allows running async functions from an
    attester. There are two motivators for this:
    
    - TDX report->quote conversion can require an HTTP request, and it's a
      good idea to run that async.
    - as we move to support the RATS passport model better the attester
      itself might need to talk to MAA or Amber to fetch an attestation
      token.
    
    If get_evidence is not async, then it becomes tricky to use reqwest from
    get_evidence. reqwest::blocking::Client panics because it internally
    uses tokio and get_evidence is called from a tokio runtime.
    
    Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
    jepio committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    b1237bb View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. attester: tdx: Detect platform using cpuid leaf

    This is equally good as a check if the TDX attester should be used.  An
    additional consideration is that while we can check for "known" device node
    names, there is no way to specify which ones the Intel SGX libraries use
    (hardcoded in C source) and the ioctl API also differs for the different names,
    including for the /dev/tdx_guest device that was upstreamed.
    
    Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
    jepio committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    2cd372e View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. attester: tdx: Support TDX CVM on Azure

    To get TDX attestation to work on Azure there are several changes
    needed:
    - the device node is called /dev/tdx_guest (upstream kernel name)
    - quote generation uses the IMDS (instance metadata service) instead
      of tdvmcall or vsock. This also means we can't use tdx_att_get_quote
      which combines quote and report fetching
    - no CCEL
    
    Implement the evidence gathering in a sub-module attester, but keep it
    within the TDX module because the evidence is fully compatible with the
    existing TDX verifier.
    
    It would be possible to use tdx_att_get_report, but calling an ioctl is
    easy enough that it doesn't make sense to add the dependency on the
    native library. The Intel library also seems to have an outdated
    definition of the ioctl.
    
    Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
    jepio committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    1b2ec06 View commit details
    Browse the repository at this point in the history