Skip to content

Latest commit

 

History

History
77 lines (60 loc) · 7.29 KB

always-encrypted-enclaves-client-development.md

File metadata and controls

77 lines (60 loc) · 7.29 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic dev_langs ms.custom monikerRange
Develop applications using Always Encrypted with secure enclaves
Develop applications using Always Encrypted with secure enclaves
Pietervanhove
pivanho
vanto
11/14/2023
sql
security
conceptual
CSharp
ignite-2023
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

Develop applications using Always Encrypted with secure enclaves

[!INCLUDE sqlserver2019-windows-only-asdb]

Always Encrypted with secure enclaves extends Always Encrypted to enable richer functionality of application queries on encrypted sensitive database columns. It leverages secure enclave technologies to allow the query executor in [!INCLUDEssde-md] to delegate computations on encrypted columns to a secure enclave inside the [!INCLUDEssde-md] process.

Prerequisites

Your environment needs to meet the following requirements to support Always Encrypted with secure enclaves.

  • Your [!INCLUDE ssnoversion-md] instance or your database server in [!INCLUDE ssazure-sqldb] must be correctly configured to support enclaves and attestation, if applicable/required. For more information, see Set up the secure enclave and attestation.
  • Make sure your application:
    • Uses a client driver version supports Always Encrypted with secure enclaves.

    • Enables Always Encrypted when connecting to your database.

    • Sets an attestation protocol, which determines whether the client driver must attest the enclave before submitting enclave queries, and if so, which attestation service it should use. Most recent driver versions support the following attestation protocols:

      • Microsoft Azure Attestation - enforces attestation using Microsoft Azure Attestation.
      • Host Guardian Service - enforces attestation using Host Guardian Service.
      • None - allows using enclaves without attestation.

      The below table specifies attestation protocols valid for particular SQL products and enclave technologies:

      Product Enclave technology Supported attestation protocols
      [!INCLUDEsql-server-2019] and later VBS enclaves Host Guardian Service, None
      [!INCLUDE ssazure-sqldb] SGX enclaves (in DC-series databases) Microsoft Azure Attestation
      [!INCLUDE ssazure-sqldb] VBS enclaves None
    • Sets an attestation URL that is valid for your environment, if you're using attestation.

Client drivers for Always Encrypted with secure enclaves

To develop applications using Always Encrypted with secure enclaves, you need a SQL client driver version that supports secure enclaves. The client driver plays the following key role:

  • Before submitting a query that uses a secure enclave to [!INCLUDE ssnoversion-md] or [!INCLUDE ssazure-sqldb] for execution, the driver initiates enclave attestation (if it's configured) to verify the secure enclave is trustworthy and can be safely used to process sensitive data. For more information about attestation, see Secure Enclave Attestation.
  • The client driver establishes a secure session with the enclave by negotiating a shared secret.
  • The driver uses the shared secret to encrypt the column encryption keys the enclave will need to process the query, and sends the keys to [!INCLUDE ssnoversion-md], which forwards them to the secure enclave that decrypts the keys.
  • Finally, the driver submits the query for execution, which triggers computations inside the secure enclave.

The following client drivers support Always Encrypted with secure enclaves:

See also