Learn Secure compute, storage, and databases (AZ-500) with Interactive Flashcards

Master key concepts in Secure compute, storage, and databases through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.

Azure Bastion and just-in-time (JIT) VM access

Azure Bastion and Just-in-Time (JIT) VM access are two powerful security features in Azure that help protect virtual machines from unauthorized access and reduce attack surfaces.

Azure Bastion is a fully managed PaaS service that provides secure and seamless RDP and SSH connectivity to your virtual machines through the Azure portal. When you deploy Azure Bastion, it is provisioned in your virtual network and provides connectivity to all VMs within that VNet or peered VNets. The key benefit is that your VMs no longer require public IP addresses for remote management access. Users connect through an HTML5 browser session over TLS, eliminating exposure of RDP and SSH ports to the public internet. Azure Bastion sits at the perimeter of your virtual network and acts as a hardened jump server, handling all connection requests while protecting against port scanning and zero-day exploits.

Just-in-Time VM access is a feature of Microsoft Defender for Cloud that locks down inbound traffic to Azure VMs by creating Network Security Group (NSG) rules. When enabled, management ports like RDP (3389) and SSH (22) remain closed until access is requested. Users must request access through the Azure portal, specifying the duration, source IP addresses, and target ports. Administrators can approve or deny these requests, and once approved, temporary NSG rules are created to allow traffic for the specified time period only. After the time expires, the ports automatically close again.

Used together, these services create a defense-in-depth approach to VM security. Azure Bastion eliminates the need for public IPs while providing secure browser-based access, and JIT ensures management ports remain closed until legitimately needed. This combination significantly reduces the attack surface and helps organizations meet compliance requirements while maintaining operational flexibility for administrators.

Network isolation for Azure Kubernetes Service (AKS)

Network isolation for Azure Kubernetes Service (AKS) is a critical security measure that enables organizations to control and restrict network traffic within their Kubernetes clusters. This approach helps protect containerized workloads from unauthorized access and potential threats.

AKS provides several mechanisms for implementing network isolation:

**Network Policies**: Kubernetes network policies allow you to define rules that control traffic flow between pods. You can specify which pods can communicate with each other based on labels, namespaces, and IP blocks. Azure supports both Azure Network Policy and Calico Network Policy implementations.

**Private Clusters**: AKS private clusters ensure that the API server has an internal IP address, meaning communication between nodes and the API server remains on the private network. This prevents exposure of the Kubernetes API to the public internet.

**Virtual Network Integration**: AKS clusters can be deployed into Azure Virtual Networks (VNets), allowing you to leverage Azure networking features like Network Security Groups (NSGs), User Defined Routes (UDRs), and VNet peering. This integration enables you to isolate cluster traffic from other Azure resources.

**Subnet Segmentation**: You can place node pools in separate subnets, applying different security policies to each. This creates logical boundaries between different workload types.

**Azure Firewall and Application Gateway**: These services can be integrated with AKS to filter and inspect traffic entering and leaving the cluster, providing an additional layer of protection.

**Service Mesh**: Implementing a service mesh like Istio or Linkerd adds mutual TLS encryption between services and enables fine-grained traffic control policies.

**Egress Controls**: You can restrict outbound traffic from your cluster using Azure Firewall or NAT Gateway, ensuring pods can only reach approved external destinations.

Implementing network isolation in AKS follows the zero-trust security model, where no traffic is trusted by default, and all communication must be explicitly permitted through defined policies.

AKS security and monitoring

Azure Kubernetes Service (AKS) security and monitoring encompasses multiple layers of protection and observability for containerized workloads. At the cluster level, AKS integrates with Azure Active Directory (Azure AD) for authentication, enabling role-based access control (RBAC) to define granular permissions for users and service accounts. Kubernetes RBAC further restricts what actions authenticated identities can perform within the cluster.

Network security in AKS involves Network Policies to control pod-to-pod communication, Azure Network Security Groups (NSGs) for subnet-level filtering, and Azure Firewall or Application Gateway for ingress protection. Private clusters keep the API server endpoint accessible only through private networks, reducing exposure to public internet threats.

For workload protection, Azure Defender for Kubernetes provides threat detection capabilities, identifying suspicious activities like cryptocurrency mining or privilege escalation attempts. Container image scanning through Microsoft Defender for Containers analyzes images in Azure Container Registry for vulnerabilities before deployment.

Secrets management leverages Azure Key Vault integration through the Secrets Store CSI Driver, allowing pods to access certificates and secrets stored securely outside the cluster. Pod Security Standards and admission controllers enforce security policies preventing privileged containers or root access.

Monitoring in AKS centers on Azure Monitor and Container Insights, which collect metrics, logs, and performance data from nodes, pods, and containers. Log Analytics workspaces store this telemetry for analysis and alerting. Prometheus metrics integration enables custom application monitoring, while Azure Monitor managed service for Prometheus provides scalable metric collection.

Azure Policy for AKS enforces organizational standards through built-in policy definitions covering aspects like allowed registries, resource limits, and security configurations. Workload identity replaces pod-managed identities, providing a more secure method for pods to authenticate to Azure services using federated credentials tied to Kubernetes service accounts.

Authentication for AKS

Azure Kubernetes Service (AKS) authentication is a critical security component that controls how users, applications, and services verify their identity when accessing the cluster. AKS supports multiple authentication mechanisms to ensure secure access to Kubernetes resources.

The primary authentication method in AKS is Azure Active Directory (Azure AD) integration. When Azure AD is enabled, users authenticate using their Azure AD credentials, leveraging existing enterprise identity management. This integration supports Single Sign-On (SSO), Multi-Factor Authentication (MFA), and Conditional Access policies, providing enterprise-grade security controls.

AKS offers two Azure AD integration modes: legacy Azure AD integration and AKS-managed Azure AD integration. The AKS-managed option simplifies configuration by handling the Azure AD application registration automatically, making it the recommended approach for new deployments.

For programmatic access and service accounts, AKS uses Kubernetes service accounts combined with role-based access control (RBAC). Kubernetes RBAC works alongside Azure RBAC to provide granular permission management. Azure RBAC for Kubernetes allows administrators to manage cluster access using familiar Azure role assignments.

Workload identity is another authentication mechanism that enables pods to authenticate to Azure services using Azure AD identities. This eliminates the need to store credentials in the cluster, as pods can obtain tokens through the Azure AD workload identity federation.

For cluster administration, AKS provides local accounts with client certificates, though this method should be disabled in production environments favoring Azure AD authentication. The kubeconfig file contains authentication credentials used by kubectl to communicate with the API server.

Managed identities play a crucial role in AKS authentication, allowing the cluster control plane and node pools to authenticate to Azure resources like Azure Container Registry, Key Vault, and storage accounts. System-assigned and user-assigned managed identities eliminate credential management overhead while maintaining secure resource access.

Implementing proper authentication in AKS requires combining these mechanisms with network policies, pod security standards, and continuous monitoring to maintain a robust security posture.

Security monitoring for Azure Container Instances (ACIs)

Azure Container Instances (ACIs) provide a serverless container hosting solution that requires comprehensive security monitoring to protect containerized workloads. Security monitoring for ACIs involves several key components and best practices.

Microsoft Defender for Containers offers threat detection capabilities specifically designed for container environments, including ACIs. This service identifies suspicious activities, vulnerabilities, and potential security breaches in real-time. It analyzes container behavior patterns and alerts administrators when anomalies are detected.

Azure Monitor plays a central role in ACI security monitoring by collecting metrics, logs, and diagnostic data from container instances. Container logs can be forwarded to Log Analytics workspaces, enabling security teams to query and analyze operational data for security-related events. Custom alerts can be configured to notify teams of specific security conditions.

Network security monitoring for ACIs includes tracking network traffic patterns, monitoring for unauthorized access attempts, and ensuring containers communicate only through approved channels. Virtual network integration allows ACIs to be placed within secured network boundaries where Network Security Groups can filter traffic.

Azure Policy helps enforce security compliance by defining and applying governance rules to ACI deployments. Policies can mandate specific security configurations, such as requiring containers to run with specific resource limits or prohibiting privileged container execution.

Image security scanning is essential before deploying containers. Azure Container Registry integrates with Microsoft Defender to scan container images for known vulnerabilities, malware, and misconfigurations. Only approved and scanned images should be deployed to ACIs.

Activity logs capture control plane operations, documenting who created, modified, or deleted ACI resources. These logs support audit requirements and help investigate security incidents.

Implementing a robust security monitoring strategy for ACIs requires combining these tools with proper access controls using Azure RBAC, ensuring least privilege principles, and maintaining regular security assessments of container configurations and runtime behaviors.

Security monitoring for Azure Container Apps (ACAs)

Azure Container Apps (ACAs) is a serverless container platform that requires comprehensive security monitoring to protect containerized workloads. Security monitoring for ACAs involves multiple layers and integrations with Azure security services.

Microsoft Defender for Containers provides threat protection specifically designed for container environments. When enabled, it continuously analyzes container images for vulnerabilities, monitors runtime behavior for suspicious activities, and generates security alerts when anomalies are detected. This includes detecting malicious container images, cryptocurrency mining attempts, and lateral movement within the container environment.

Azure Monitor and Log Analytics serve as the central hub for collecting and analyzing security-related data from Container Apps. You can configure diagnostic settings to capture container console logs, system logs, and application logs. These logs help identify authentication failures, unauthorized access attempts, and unusual application behavior patterns.

Network security monitoring involves tracking ingress and egress traffic patterns using Network Security Groups (NSGs) and Azure Firewall logs. Container Apps environments can be deployed within virtual networks, enabling you to monitor traffic flow and detect potential data exfiltration or command-and-control communications.

Microsoft Sentinel can be integrated to provide advanced threat detection using built-in analytics rules and machine learning. Security analysts can create custom detection queries to identify container-specific threats and automate response actions through playbooks.

Azure Policy helps enforce security baselines by ensuring Container Apps configurations meet organizational requirements. Policies can mandate specific security settings such as requiring HTTPS-only ingress, enforcing managed identity usage, and restricting container image sources to trusted registries.

Identity and access monitoring through Azure Active Directory audit logs tracks who accesses and modifies Container Apps resources. Role-based access control (RBAC) assignments should be regularly reviewed to ensure principle of least privilege.

Implementing health probes and availability monitoring ensures application reliability while also detecting potential denial-of-service conditions or resource exhaustion attacks targeting your containerized applications.

Access management for Azure Container Registry (ACR)

Azure Container Registry (ACR) access management is a critical security component that controls who can push, pull, and manage container images within your registry. ACR integrates seamlessly with Microsoft Entra ID (formerly Azure Active Directory) to provide robust identity-based access control.

There are several authentication methods available for ACR. The primary approach uses Microsoft Entra ID authentication, which supports both individual identities and service principals. Service principals are ideal for automated scenarios like CI/CD pipelines, allowing applications to authenticate programmatically using credentials or certificates.

Managed identities offer another secure authentication option, eliminating the need to store credentials in code. System-assigned and user-assigned managed identities enable Azure resources like Azure Kubernetes Service (AKS) or Azure Container Instances to pull images securely.

ACR implements role-based access control (RBAC) through several built-in roles. The AcrPull role grants read-only access for pulling images. AcrPush allows both pulling and pushing images. AcrDelete permits deletion of repository data. The Owner and Contributor roles provide full administrative capabilities including role assignments and registry configuration.

For enhanced security, ACR supports repository-scoped permissions, enabling granular access control at the individual repository level rather than the entire registry. Token-based authentication with scope maps allows fine-grained access patterns for specific repositories.

Network security features complement access management. Private endpoints restrict registry access to specific virtual networks. Firewall rules limit access to approved IP ranges. Content trust ensures image integrity through signed images.

ACR Premium tier offers additional security features including geo-replication, customer-managed keys for encryption, and dedicated data endpoints. Enabling admin accounts is possible but not recommended for production environments due to shared credential risks. Instead, implement service principals or managed identities for secure, auditable access to your container registry resources.

Disk encryption (ADE, encryption at host, confidential disk)

Azure provides multiple disk encryption options to protect data at rest for virtual machines and storage resources.

**Azure Disk Encryption (ADE)** uses BitLocker for Windows VMs and DM-Crypt for Linux VMs to encrypt OS and data disks. ADE integrates with Azure Key Vault to manage encryption keys and secrets. This solution encrypts the virtual hard disks, ensuring data remains protected even if the physical disk is compromised. ADE supports both managed and unmanaged disks and provides volume-level encryption.

**Encryption at Host** provides end-to-end encryption for your VM data. When enabled, encryption starts on the VM host itself, covering temporary disks, OS disk caches, and data disk caches. The data flows encrypted to the Azure Storage service where it remains encrypted at rest. This approach ensures that data is never stored unencrypted on the physical host infrastructure. Encryption at host uses platform-managed keys by default but supports customer-managed keys through Azure Key Vault.

**Confidential Disk Encryption** is designed for confidential computing scenarios where VMs use AMD SEV-SNP or Intel TDX technology. This encryption type binds disk encryption keys to the VM's Trusted Platform Module (TPM) and the protected VM content. The encryption keys are only accessible within the trusted execution environment, providing protection against privileged users, host administrators, and hypervisor-level threats. Confidential disk encryption ensures that the OS disk is encrypted with keys tied to hardware-based security features.

**Key Differences:**
- ADE operates at the guest OS level
- Encryption at host operates at the infrastructure level before data reaches storage
- Confidential disk encryption provides hardware-backed protection with TPM binding

Organizations often combine these encryption methods based on compliance requirements and threat models. All options integrate with Azure Key Vault for centralized key management and support both platform-managed and customer-managed keys for flexibility in security governance.

Security configurations for Azure API Management

Azure API Management (APIM) is a critical service that requires robust security configurations to protect APIs and backend services. Here are the key security configurations for Azure API Management:

**Authentication and Authorization:**
APIM supports multiple authentication mechanisms including OAuth 2.0, OpenID Connect, client certificates, and subscription keys. You can configure Azure Active Directory integration for identity management and implement JWT validation policies to verify tokens before requests reach backend services.

**Network Security:**
Deploy APIM within a Virtual Network (VNet) to isolate traffic and control inbound/outbound connectivity. Use Private Endpoints to ensure APIs are accessible only through private IP addresses. Configure Network Security Groups (NSGs) to restrict traffic flow and implement Azure Firewall for additional protection.

**Encryption:**
All data in transit is protected using TLS 1.2 or higher. Configure custom SSL certificates for your API domains. Enable encryption at rest for sensitive data stored within APIM using Microsoft-managed or customer-managed keys in Azure Key Vault.

**Access Control:**
Implement Role-Based Access Control (RBAC) to manage who can administer APIM instances. Use products and subscriptions to control API access levels. Configure IP filtering policies to allow or deny requests from specific IP ranges.

**Threat Protection:**
Enable rate limiting and throttling policies to prevent denial-of-service attacks. Implement request validation policies to check headers, query parameters, and request bodies. Configure quota policies to limit API consumption.

**Monitoring and Auditing:**
Integrate with Azure Monitor and Application Insights for comprehensive logging. Enable diagnostic settings to capture detailed request/response information. Use Azure Sentinel for security information and event management (SIEM) capabilities.

**Secret Management:**
Store sensitive configuration values like backend credentials in Azure Key Vault. Reference named values securely within policies rather than hardcoding secrets.

These configurations collectively ensure your API Management infrastructure maintains confidentiality, integrity, and availability of your API ecosystem.

Access control for storage accounts

Access control for Azure storage accounts is a critical security component that determines who can access your data and what actions they can perform. Azure provides multiple layers of access control to protect storage resources.

**Azure Role-Based Access Control (RBAC)** allows you to assign permissions at various scopes including subscription, resource group, or individual storage account levels. Built-in roles like Storage Blob Data Owner, Storage Blob Data Contributor, and Storage Blob Data Reader provide granular control over blob operations. Custom roles can also be created for specific requirements.

**Shared Access Signatures (SAS)** provide delegated access to storage resources with specified permissions and time constraints. There are three types: User delegation SAS (secured with Azure AD credentials), Service SAS (secured with storage account key), and Account SAS (provides access to multiple services).

**Storage Account Keys** are master keys providing full access to the storage account. These should be protected carefully and rotated regularly. Azure Key Vault integration helps manage these keys securely.

**Azure Active Directory (Azure AD) Authentication** enables identity-based access control for blob and queue storage. This approach is recommended over shared keys as it provides better security through conditional access policies and multi-factor authentication.

**Network-Level Access Control** includes firewall rules, virtual network service endpoints, and private endpoints. You can restrict access to specific IP addresses, virtual networks, or make storage accessible only through private connections.

**Anonymous Public Access** can be configured at container level but should be disabled unless specifically required for public content scenarios.

**Advanced Threat Protection** monitors for unusual access patterns and potential security threats.

Best practices include using Azure AD authentication when possible, implementing least privilege access, enabling soft delete for data recovery, using private endpoints for sensitive data, and regularly auditing access patterns through Azure Monitor and Storage Analytics logging.

Storage account access keys management

Storage account access keys in Azure are critical credentials that provide full access to your storage account resources, including blobs, files, queues, and tables. Each storage account comes with two access keys (key1 and key2), which serve as root passwords for authentication purposes.

**Why Two Keys Exist:**
Having two keys enables seamless key rotation. You can regenerate one key while applications continue using the other, ensuring zero downtime during security maintenance.

**Key Management Best Practices:**

1. **Regular Rotation:** Rotate your access keys periodically, typically every 90 days or according to your organization's security policy. Azure Key Vault can automate this process.

2. **Use Azure Key Vault:** Store access keys in Azure Key Vault rather than hardcoding them in applications. This provides centralized management, auditing, and automatic rotation capabilities.

3. **Implement Least Privilege:** Instead of sharing account keys, use Shared Access Signatures (SAS) tokens that provide granular, time-limited access to specific resources.

4. **Prefer Azure AD Authentication:** When possible, use Azure Active Directory authentication with RBAC assignments rather than access keys. This provides better auditing and identity-based access control.

5. **Monitor Key Usage:** Enable Azure Monitor and Storage Analytics logging to track how keys are being used and detect suspicious activities.

6. **Secure Key Distribution:** Never transmit keys through insecure channels like email or store them in source code repositories.

**Regeneration Process:**
When regenerating keys, first update all applications to use the secondary key, then regenerate the primary key. After verification, you can optionally switch applications back to the new primary key.

**Azure Policy Integration:**
Implement Azure Policy to enforce key rotation requirements and ensure compliance across your organization's storage accounts.

Proper access key management is essential for maintaining the security posture of your Azure storage infrastructure and preventing unauthorized data access.

Access methods for Azure Files

Azure Files provides multiple access methods to accommodate different scenarios and security requirements. The primary access methods include SMB (Server Message Block), NFS (Network File System), and REST API protocols.

SMB Protocol Access:
SMB 3.0 and 3.1.1 are supported for Azure Files, enabling seamless integration with Windows, Linux, and macOS clients. For authentication, you can use Azure Active Directory Domain Services (Azure AD DS), on-premises Active Directory Domain Services (AD DS), or storage account keys. Identity-based authentication provides granular share-level and file-level permissions using NTFS ACLs.

NFS Protocol Access:
NFS 4.1 protocol is available for premium file shares, primarily designed for Linux workloads. NFS shares require virtual network configuration and do not support encryption in transit by default, making network security controls essential.

REST API Access:
The Azure Files REST API enables programmatic access over HTTPS on port 443. This method works well for applications requiring cloud-native integration and supports Shared Access Signatures (SAS) tokens for delegated access with time-limited permissions.

Network Access Controls:
Azure Files supports private endpoints, allowing file shares to be accessed through private IP addresses within your virtual network. Service endpoints provide another option to restrict access to specific virtual networks. Firewall rules can limit access to specific IP addresses or ranges.

Authentication Options:
Storage account keys provide full administrative access and should be protected carefully. Shared Access Signatures offer time-bound, permission-limited access tokens. Azure AD authentication (when configured with Azure AD DS or on-premises AD DS) enables identity-based access with role-based access control at the share level and Windows ACLs at the file and directory level.

For enhanced security, always enable secure transfer required setting to enforce HTTPS and SMB 3.0 encryption, and consider implementing Azure Private Link for network isolation.

Access methods for Azure Blob Storage

Azure Blob Storage offers multiple access methods to securely manage and retrieve data. The primary access methods include Storage Account Keys, Shared Access Signatures (SAS), Azure Active Directory (Azure AD) authentication, and anonymous public access. Storage Account Keys provide full administrative access to the storage account. Each account has two 512-bit keys that grant complete control over all data and operations. These keys should be protected carefully, rotated regularly, and stored securely in Azure Key Vault. Shared Access Signatures (SAS) enable granular, time-limited access to blob resources. There are three types: User Delegation SAS (most secure, uses Azure AD credentials), Service SAS (signed with account key for specific service), and Account SAS (provides access across multiple services). SAS tokens allow you to specify permissions, IP restrictions, protocols, and expiration times, following the principle of least privilege. Azure AD authentication integrates with Role-Based Access Control (RBAC), allowing you to assign built-in roles like Storage Blob Data Reader, Storage Blob Data Contributor, or Storage Blob Data Owner to users, groups, or service principals. This method provides centralized identity management, conditional access policies, and eliminates the need to manage shared keys. Anonymous public access allows unauthenticated users to read blob data when containers are configured with public access level set to blob or container. This should be disabled for sensitive data by setting the storage account property to prevent public access. Additional security measures include private endpoints for network isolation, firewalls and virtual network rules to restrict access to specific networks, and encryption in transit using HTTPS. For programmatic access, you can use Azure Storage SDKs, REST APIs, Azure CLI, PowerShell, or Azure Storage Explorer. Managed identities eliminate credential management by automatically providing Azure AD authentication for Azure services accessing blob storage.

Data protection (soft delete, backups, versioning, immutable storage)

Data protection in Azure encompasses several critical mechanisms to safeguard your information against accidental deletion, corruption, and malicious attacks.

**Soft Delete** provides a safety net by retaining deleted data for a specified retention period. When enabled on Azure Blob Storage or Azure Key Vault, deleted items move to a soft-deleted state rather than being permanently removed. This allows recovery within the retention window, typically ranging from 1 to 365 days, protecting against accidental or malicious deletions.

**Backups** create point-in-time copies of your data that can be restored when needed. Azure Backup service provides centralized backup management for virtual machines, SQL databases, file shares, and blobs. Recovery Services vaults store backup data with configurable retention policies, enabling restoration to specific recovery points. Azure offers both snapshot-based and streaming backups depending on the resource type.

**Versioning** maintains previous iterations of objects automatically. When blob versioning is enabled in Azure Storage, every modification creates a new version while preserving the previous state. This provides protection against application errors and unintended modifications, allowing you to restore any previous version of your data. Each version receives a unique version ID for identification and retrieval.

**Immutable Storage** implements Write Once Read Many (WORM) policies that prevent data modification or deletion for a specified interval. Azure offers two immutability policy types: time-based retention policies that lock data for a defined period, and legal hold policies that remain active until explicitly removed. Immutable storage is essential for regulatory compliance requirements such as SEC 17a-4, FINRA, and CFTC regulations.

These protection mechanisms work together to create a comprehensive data protection strategy. Security engineers should implement layered approaches, combining soft delete with versioning and regular backups, while applying immutable storage for compliance-critical data. Proper configuration ensures business continuity and regulatory adherence.

Bring your own key (BYOK) for storage

Bring Your Own Key (BYOK) for Azure Storage is a security feature that allows organizations to maintain control over their encryption keys while leveraging Azure's storage services. Instead of relying solely on Microsoft-managed keys, customers can generate, manage, and store their own encryption keys using Azure Key Vault.

With BYOK implementation, organizations create cryptographic keys within their own hardware security modules (HSMs) or key management systems, then import these keys into Azure Key Vault. The storage account is then configured to use these customer-managed keys for encrypting data at rest.

Key benefits of BYOK for storage include:

1. Enhanced Control: Organizations retain full authority over their encryption keys, including key rotation schedules, access policies, and lifecycle management.

2. Compliance Requirements: Many regulatory frameworks require organizations to demonstrate control over encryption keys. BYOK helps satisfy requirements for HIPAA, PCI-DSS, GDPR, and other compliance standards.

3. Key Separation: Customer-managed keys remain separate from the encrypted data, providing an additional security layer. If keys are revoked or deleted, the data becomes inaccessible.

4. Audit Capabilities: Azure Key Vault provides detailed logging of all key operations, enabling organizations to track key usage and access patterns.

Implementation involves several steps: creating an Azure Key Vault with appropriate access policies, generating or importing your encryption key, enabling soft delete and purge protection on the vault, and configuring the storage account to use the customer-managed key.

Considerations include ensuring high availability of your Key Vault since storage operations require key access, implementing proper backup procedures for keys, and understanding that key deletion renders stored data permanently unrecoverable.

BYOK represents a shared responsibility model where Azure manages the infrastructure while customers maintain cryptographic control, balancing cloud convenience with enterprise security requirements.

Double encryption at Azure Storage infrastructure level

Double encryption at Azure Storage infrastructure level provides two layers of encryption to protect your data at rest, addressing compliance requirements and providing defense-in-depth security. This feature ensures that even if one encryption layer is compromised, your data remains protected by the second layer.

The first layer uses 256-bit AES encryption at the service level, which is the standard encryption that Azure Storage applies to all data. This encryption happens automatically when data is written to Azure Storage and decryption occurs when data is accessed.

The second layer adds infrastructure encryption, which applies another 256-bit AES encryption at the hardware level before data reaches the storage infrastructure. This layer uses a different encryption algorithm and separate keys from the service-level encryption, creating true defense-in-depth protection.

To enable infrastructure encryption, you must configure it when creating a storage account. This setting cannot be changed after the storage account is created. You can enable this feature through the Azure portal, PowerShell, Azure CLI, or ARM templates.

Key management options include Microsoft-managed keys or customer-managed keys stored in Azure Key Vault. When using customer-managed keys, you maintain full control over the encryption keys, including rotation and access policies.

Infrastructure encryption is available for all Azure Storage services including Blob storage, Queue storage, Table storage, and Azure Files. It supports both standard and premium storage account types.

The performance impact of double encryption is minimal because the infrastructure-level encryption is handled by dedicated hardware. Organizations in highly regulated industries such as healthcare, finance, and government often require this additional security layer to meet strict data protection standards.

To verify that infrastructure encryption is enabled, you can check the storage account properties in the Azure portal or query the account settings using Azure CLI or PowerShell commands.

Microsoft Entra database authentication

Microsoft Entra database authentication (formerly Azure Active Directory authentication) is a mechanism that allows users to connect to Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics using identities managed in Microsoft Entra ID. This approach provides a centralized identity management solution that enhances security and simplifies administration compared to traditional SQL Server authentication.

Key benefits of Microsoft Entra database authentication include:

**Centralized Identity Management**: Instead of managing separate database credentials, administrators can leverage existing Microsoft Entra identities, including users, groups, and service principals. This reduces credential sprawl and administrative overhead.

**Enhanced Security Features**: Microsoft Entra authentication supports multi-factor authentication (MFA), conditional access policies, and Privileged Identity Management (PIM). These features add additional security layers to protect database access.

**Support for Managed Identities**: Azure resources can authenticate to databases using system-assigned or user-assigned managed identities, eliminating the need to store credentials in application code or configuration files.

**Authentication Methods**: Users can authenticate using interactive methods, password-based authentication, integrated Windows authentication, or token-based authentication for applications.

**Implementation Steps**: To configure Microsoft Entra authentication, you must designate a Microsoft Entra administrator for the Azure SQL server. This admin has full permissions and can grant database access to other Microsoft Entra principals using the CREATE USER statement with the FROM EXTERNAL PROVIDER clause.

**Contained Database Users**: Microsoft Entra users are created as contained database users, meaning they exist at the database level rather than the server level, providing better isolation and portability.

**Best Practices**: Organizations should use Microsoft Entra groups for role-based access control, implement conditional access policies, enable MFA for interactive users, and utilize managed identities for application access to eliminate credential management challenges.

This authentication method aligns with zero-trust security principles by verifying every access request through a trusted identity provider.

Database auditing

Database auditing in Azure is a critical security feature that tracks and records database events, helping organizations maintain compliance, detect suspicious activities, and investigate potential security incidents. For Azure SQL Database and Azure Synapse Analytics, auditing provides comprehensive logging of all database operations.

Azure SQL Database auditing writes audit logs to Azure Blob Storage, Log Analytics workspace, or Event Hubs. This flexibility allows security engineers to integrate audit data with existing monitoring solutions and SIEM tools for centralized analysis.

Key events captured by database auditing include:
- Successful and failed login attempts
- Query executions and stored procedure calls
- Schema changes and DDL operations
- Data access and DML operations
- Security-related events like permission changes
- Database-level events such as backups and restores

Auditing can be configured at two levels: server-level and database-level. Server-level auditing applies to all databases on the server, while database-level auditing allows granular control over specific databases. Both levels can coexist, creating comprehensive audit coverage.

Retention policies determine how long audit logs are stored. Organizations can configure retention periods based on compliance requirements, with options ranging from days to years. Azure Blob Storage supports immutable storage for audit logs, ensuring data cannot be modified or deleted.

Best practices for database auditing include:
- Enabling auditing for all production databases
- Storing audit logs in secure, separate storage accounts
- Configuring appropriate retention periods for compliance
- Regularly reviewing audit logs for anomalies
- Setting up alerts for critical security events
- Using Log Analytics for advanced querying and visualization

For Azure Cosmos DB, auditing capabilities are provided through diagnostic logging, capturing operations like data plane requests, control plane operations, and query execution metrics.

Database auditing forms an essential layer of defense-in-depth strategy, providing visibility into database activities and supporting forensic investigations when security incidents occur.

Dynamic data masking

Dynamic Data Masking (DDM) is a security feature in Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics that helps protect sensitive data by obscuring it from non-privileged users during query results. This feature operates at the presentation layer, meaning the actual data stored in the database remains unchanged, but users see masked versions based on defined policies.

DDM works by applying masking rules to specific columns in your database tables. When a user who lacks appropriate permissions queries the data, the sensitive information appears in an altered format. For example, a credit card number might display as XXXX-XXXX-XXXX-1234, showing only the last four digits.

Azure provides several built-in masking functions. The Default mask fully hides data based on the data type - strings show as XXXX, numbers display as zero, and dates appear as 01-01-1900. The Email mask reveals the first letter and the domain suffix while obscuring the rest. The Random mask applies to numeric fields, replacing values with random numbers within a specified range. The Custom String mask allows administrators to define specific patterns, exposing certain characters while hiding others.

Administrators configure DDM through the Azure portal, PowerShell, REST API, or T-SQL commands. They designate which columns require masking and select appropriate masking functions. Database administrators and users with elevated privileges can always view unmasked data, while regular users see only the masked versions.

Key benefits include simplified security implementation since no application code changes are required, centralized policy management, and compliance support for regulations like GDPR and HIPAA. DDM is particularly useful for development and testing environments where teams need realistic data structures but should not access actual sensitive information.

However, DDM should complement other security measures rather than serve as the sole protection mechanism, as privileged users can still access underlying data.

Transparent Data Encryption (TDE)

Transparent Data Encryption (TDE) is a security feature in Azure that provides real-time encryption and decryption of data at rest for Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics. This encryption occurs at the page level, meaning data is encrypted before being written to disk and decrypted when read into memory.

TDE uses a symmetric key called the Database Encryption Key (DEK), which is stored in the database boot record for availability during recovery. This DEK is protected by either a service-managed certificate (Service-Managed TDE) or a customer-managed asymmetric key stored in Azure Key Vault (Customer-Managed TDE, also known as Bring Your Own Key or BYOK).

With Service-Managed TDE, Azure handles all cryptographic key management, including key rotation and protection. This option is enabled by default for new Azure SQL databases, providing automatic encryption with minimal configuration required from administrators.

Customer-Managed TDE offers greater control and flexibility. Organizations can manage their own encryption keys in Azure Key Vault, control key rotation schedules, and revoke database access by removing key permissions. This approach is beneficial for compliance requirements that mandate customer control over encryption keys.

TDE protects against threats involving physical theft of storage media or improper disposal of hardware. Even if someone gains access to the physical storage files, they cannot read the data because the encryption keys are required for decryption.

Key benefits of TDE include: no application changes required as encryption and decryption happen transparently, compliance with various regulatory standards such as HIPAA and PCI-DSS, minimal performance impact due to optimized encryption algorithms, and integration with Azure Key Vault for enhanced key management capabilities.

For backup protection, TDE ensures that database backups are also encrypted, maintaining security throughout the data lifecycle. This makes TDE an essential component of a comprehensive data protection strategy in Azure environments.

Azure SQL Database Always Encrypted

Azure SQL Database Always Encrypted is a security feature designed to protect sensitive data stored in Azure SQL databases by ensuring that encryption keys are never revealed to the Database Engine. This means that data remains encrypted both at rest and in transit, with decryption only occurring on the client side where the application resides.

The feature operates using two types of keys: Column Master Keys (CMK) and Column Encryption Keys (CEK). The CMK is stored outside of Azure SQL Database, typically in Azure Key Vault, Windows Certificate Store, or a Hardware Security Module (HSM). The CEK is used to encrypt the actual data and is itself encrypted by the CMK before being stored in the database metadata.

Always Encrypted supports two encryption types: Deterministic and Randomized. Deterministic encryption generates the same encrypted value for any given plain text value, enabling equality comparisons, point lookups, joins, and grouping operations on encrypted columns. Randomized encryption uses a more secure method that generates different encrypted values for the same input, providing stronger protection but limiting query operations to basic retrieval.

The client application uses an Always Encrypted-enabled driver that handles encryption and decryption operations transparently. When data is inserted, the driver encrypts values before sending them to the database. When data is retrieved, the driver decrypts the values before returning them to the application.

Key benefits include protection against unauthorized database administrators and cloud operators who have access to the database but should not view sensitive data. This addresses compliance requirements for regulations like GDPR, HIPAA, and PCI DSS.

Implementation considerations include ensuring client applications have access to the CMK, understanding query limitations on encrypted columns, and planning for key rotation procedures. Azure SQL Database Always Encrypted provides a robust solution for organizations requiring strong data protection while maintaining application functionality.

More Secure compute, storage, and databases questions
829 questions (total)