Are you a guardian of your domain? Lean how to leverage your aptitude in security to protect Microsoft Azure technologies, with a goal of earning the Microsoft Certified: Azure Security Engineer Associate certification!
Prepare and test your skills

Prepare and test your skills


A sequence diagram showing how the client driver retrieves an encrypted Column Encryption Key from the database, sends it to Azure Key Vault to be decrypted with the Column Master Key, and then uses the decrypted key to encrypt and decrypt query data.
Always Encrypted is a security feature in Azure SQL Database and Azure SQL Managed Instance designed to protect sensitive data while it is in use by encrypting it on the client side before it ever reaches the database engine, meaning the data is never visible as plaintext in the database memory. This protection safeguards highly sensitive columns against unauthorized access by high-privileged users such as database administrators, cloud operators, or malicious actors.
Client applications must connect using supported database drivers such as ADO.NET, JDBC, or ODBC to use Always Encrypted. These drivers transparently encrypt plaintext data before sending it to the database and decrypt the encrypted results returned from queries, with the encryption process happening entirely on the client side.
Deterministic encryption always generates the same encrypted value for a given plaintext value, allowing the database to perform equality comparisons, point lookups, and joins on those columns. Randomized encryption secures data more heavily by generating a different encrypted value every time, but it completely prevents any indexing or computational operations on the encrypted columns.
Security administrators manage Column Master Keys in Azure Key Vault, keeping them completely out of reach of the database engine, while database administrators manage only the metadata for Column Encryption Keys within the database without having access to the actual plaintext keys. This creates a strong separation of duties where DBAs cannot see sensitive data even with full database access.
Always Encrypted is a security feature in Azure SQL Database and Azure SQL Managed Instance designed to protect sensitive data while it is in use. This feature secures data by encrypting it on the client side before it ever reaches the database engine, meaning the data is never visible as plaintext in the database memory. This protection safeguards highly sensitive columns against unauthorized access by high-privileged users, such as database administrators, cloud operators, or malicious actors. Organizations use this mechanism to achieve a strong separation of duties and to comply with regulatory standards like PCI DSS and GDPR.
To use Always Encrypted, client applications must connect using supported database drivers like ADO.NET, JDBC, or ODBC. These drivers transparently encrypt plaintext data before sending it to the database and decrypt the encrypted results returned from queries. Because the encryption process happens entirely on the client, the client application architecture must have the processing power to handle these cryptographic operations locally. Additionally, some business intelligence and extract, transform, load (ETL) tools may not support these compatible drivers, which is a critical compatibility constraint to evaluate before deployment.
Implementing Always Encrypted introduces significant query and performance limitations depending on the encryption type chosen. Deterministic encryption always generates the same encrypted value for a given plaintext value, which allows the database to perform equality comparisons, point lookups, and joins on those columns. In contrast, randomized encryption secures data more heavily by generating a different encrypted value every time, but it completely prevents any indexing or computational operations. Because of these constraints, developers must often refactor database objects like stored procedures, views, and triggers to move sensitive logic from the database to the client application.
Proper security depends on managing two types of keys: Column Encryption Keys, which encrypt the actual database columns, and Column Master Keys, which protect the Column Encryption Keys. Azure Key Vault acts as a secure key store to hold the Column Master Keys, keeping them completely out of reach of the database engine. Security administrators manage these master keys in Azure Key Vault, while database administrators manage only the metadata for the Column Encryption Keys within the database without having access to the actual plaintext keys. When rotating keys to maintain security compliance, utilizing online encryption helps update the keys with minimal disruption to running applications.