Skip to content

Deploying to Azure


Microsoft Azure provides ready-made VMs that support the latest attestation protocols. This document explains the background and provides a walkthrough showing how to get such a VM.

Background: The DCAP protocol


If you just want to deploy to Azure as quickly as possible you can skip this section.

There are two protocols for establishing what code is running in an enclave: EPID and DCAP. EPID is an older protocol designed for consumer applications, and as such includes some sophisticated privacy features. For servers where the IP address doesn't need to be hidden (because it's public in DNS to begin with), these features aren't helpful and thus there is DCAP (datacenter attestation primitives). DCAP requires more modern hardware but is otherwise simpler and more robust. You may also see DCAP referred to as "ECDSA attestation".

In DCAP repeating attestation requests aren't forwarded to Intel, but rather served from a cache. A newly installed machine obtains a machine certificate from Intel via the cache which may then be persisted to disk. All this is automated for you.

Because caches are run by cloud providers DCAP supports vendor-specific plugins. Intel provides a default one which requires a subscription.

Azure provides a DCAP plugin that does not require a subscription. Conclave bundles and uses that plugin by default. The Azure caches are open to the public internet and can actually be used from anywhere. Azure Confidential Computing instances (DC4s_v2) come pre-provisioned for DCAP and as Conclave comes with the necessary libraries bundled, you don't need to do any further setup.

Machine setup

You need to create an Ubuntu 18.04 LTS Gen2 VM from the confidential compute line (named like this: DC?s_v2) where the question mark is the size. Other distributions should work as long as they are on these VMs, but we haven't tested them.

You might have to click "Browse all public and private images" to find Gen2 image type. Pick a size that's got plenty of RAM, for example, you might want to click "Select size" to find DC4s_v2 type.

Just in case:

  • Check that the enclave device is present in the /dev/sgx/ directory
  • Check driver version dmesg | grep sgx. Conclave requires driver version 1.33+
  • If either check fails:

You may need to add your user into sgx_prv group to give it access to SGX.

sudo usermod -aG sgx_prv $USER

DCAP Plugin

In order to perform attestation using DCAP Conclave needs a way to gather information about the platform the enclave is hosted on. This information provides proof from Intel that a system supports SGX and that it is patched and up to date.

DCAP is designed to work on many different server topologies, therefore rather than directly connecting to Intel services to retrieve this information, the cloud vendor or owner of the SGX system must provide a DCAP client plugin that will provide the required information. Intel provide a generic DCAP client plugin as part of the DCAP runtime. In order to use this you also need to set up a Provisioning Certificate Caching Service (PCCS). Intel provide an example and some instructions here.

Microsoft has written a DCAP client plugin that works with its Azure Confidential Compute virtual machines. In fact, it also works outside of Azure for single CPU systems but this may not always be the case.

Our SDK comes bundled with the Azure client plugin. The bundled version will only be used if no other plugin has been found on the system. The runtime will use the first .so it encounters in the search order below:

Should you decide to use a bundled version (recommended), ensure the files listed above don't exist (delete or rename them if necessary) and skip the rest of this section.

You may want to set the Azure DCAP client logging level to FATAL as the default setting is fairly verbose:


If you would like to configure the DCAP plugin yourself, keep reading.

Azure client plugin

  • Identify the currently installed DCAP client plugin. It will always have one of the following names: or You might find other similarly named files, but they won't be used as a plugin.

    ls /usr/lib/x86_64-linux-gnu/*
    ls /usr/lib/*

  • If you already have the Azure plugin installed then it will contain the text 'AZDCAP'.

    grep AZDCAP /usr/lib/x86_64-linux-gnu/*
    grep AZDCAP /usr/lib/*

  • If the Azure plugin is not currently installed then:
    • You can build it from source.
    • Or extract from a pre-built package provided by Microsoft. E.g. for Ubuntu 18.04 via the command below (only is required).
      wget && ar x az-dcap-client_1.6_amd64.deb data.tar.xz && tar xvJf data.tar.xz --transform='s/.*\///' ./usr/lib/ && rm az-dcap-client_1.6_amd64.deb data.tar.xz
  • The preferred name and location of the DCAP client plugin is /usr/lib/x86_64-linux-gnu/
    cp $(Azure-DCAP-Client)/ /usr/lib/x86_64-linux-gnu/
    ln -sf /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
  • Set the Azure DCAP client logging level to FATAL as desired.

Intel DCAP plugin

Please read the installation instructions in the "Install the DCAP packages" section of the installation guide.


If you happen to have the Intel DCAP plugin installed alongside the Azure one, bear in mind that running apt update might reset the symlink above to point to Intel's plugin.

Using Docker container(s)

If you plan to use a Docker container with DCAP hardware, you must map two different device files like this:

docker run --device /dev/sgx/enclave --device /dev/sgx/provision ...


Azure offers a "Confidential Kubernetes" service. At this time we haven't tested Conclave with that. If you try it, let us and the community know if it works (

Running a Conclave Application

Once the machine is set up, you can follow the Compiling and running tutorial to run the hello-world sample.

The sample is configured to use DCAP attestation with the following line in

enclave.start(new AttestationParameters.DCAP(), ... );

DCAP doesn't require any specific API keys or parameters, so just creating the empty object is sufficient to choose it.