How to Secure Azure Cosmos DB for HIPAA Compliance
Contoso, a healthcare provider, is deploying a new patient portal on Azure App Service that stores electronic health records (EHR) in Azure Cosmos DB for NoSQL. The solution must comply with HIPAA and HITRUST. You need to ensure that data is encrypted at rest and in transit, and that access is restricted based on user roles. Cosmos DB must be configured with a private endpoint to prevent public internet access. You plan to use Azure Key Vault to manage encryption keys. Additionally, the application will access Cosmos DB using a system-assigned managed identity. Which of the following is the most complete and secure design?
Quick Answer
The correct choice is the design that combines a customer-managed key (CMK) in Azure Key Vault, enforced TLS 1.2, a private endpoint for network isolation, and Azure RBAC with a custom role scoped to specific containers. This configuration is the most complete and secure because it addresses all three HIPAA pillars: encryption at rest is controlled by the organization via CMK, encryption in transit is enforced by TLS 1.2, and private endpoints eliminate public internet exposure, while granular RBAC ensures role-based access to patient data. On the Microsoft Cybersecurity Architect exam, this scenario tests your ability to layer security controls for regulated workloads—common traps include assuming service-managed keys are sufficient for HIPAA or that firewall rules alone replace private endpoints. Remember the mnemonic "C-T-R-P": Customer-managed key, TLS, RBAC, Private endpoint—each layer is mandatory for HIPAA compliance.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable encryption at rest using a customer-managed key in Azure Key Vault, enforce TLS 1.2, configure a private endpoint for Cosmos DB, and grant the managed identity access via Azure RBAC with a custom role that allows read/write to specific containers.
It provides the most comprehensive security for HIPAA/HITRUST compliance. Customer-managed keys in Azure Key Vault give Contoso control over encryption keys, which is required by HIPAA. TLS 1.2 ensures encryption in transit. A private endpoint for Cosmos DB prevents public internet access, offering better isolation than service endpoints or firewall rules. Finally, granting the managed identity access via Azure RBAC with a custom role allows granular, least-privilege access to specific containers, which is more secure than using built-in roles or connection strings. Option A is wrong because service-managed keys do not provide the key control required for HIPAA, and service endpoints are less secure than private endpoints. Option B is wrong because disabling encryption at rest is a security risk and contrary to compliance requirements; also, storing a read-write key in Key Vault (to be retrieved by the app) is less secure than using managed identity with RBAC. Option C is wrong because firewall rules are less secure than private endpoints, and storing read-write keys in application settings is a security risk.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable encryption at rest using service-managed keys, enforce TLS 1.2, configure a service endpoint for Cosmos DB, and grant the managed identity access using Cosmos DB built-in roles (e.g., Cosmos DB Built-in Data Contributor).
Why it's wrong here
Service endpoints are less secure than private endpoints. Built-in roles do not provide granular access to specific containers or items.
- ✗
Disable encryption at rest to improve performance, enforce TLS 1.2, configure a private endpoint, and use the managed identity with a read-write key in Azure Key Vault.
Why it's wrong here
Disabling encryption at rest violates HIPAA compliance. Using keys even from Key Vault is unnecessary when managed identity can be used.
- ✗
Enable encryption at rest using service-managed keys, enforce TLS 1.2, configure a firewall to allow only the App Service outbound IP, and use read-write keys in application settings.
Why it's wrong here
Service-managed keys may not satisfy HIPAA requirements for key control. Firewall rules are less secure than private endpoints. Read-write keys in settings are not secure.
- ✓
Enable encryption at rest using a customer-managed key in Azure Key Vault, enforce TLS 1.2, configure a private endpoint for Cosmos DB, and grant the managed identity access via Azure RBAC with a custom role that allows read/write to specific containers.
Why this is correct
CMK provides key control, private endpoint isolates network, managed identity eliminates key management, and RBAC provides fine-grained access.
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
Go deeper
Related to this question
About these practice questions
This SC-100 question is part of Courseiva's 208-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SC-100
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Your organization uses Azure Cosmos DB with SQL API. You need to implement data encryption at rest and control access to the encryption keys. Which two actions should you take? (Choose two.)
hard- A.Implement client-side encryption using the .NET SDK.
- B.Enable Azure Disk Encryption on the VMs that access Cosmos DB.
- ✓ C.Configure a customer-managed key in Azure Key Vault for encryption.
- D.Turn off automatic encryption and use a custom encryption algorithm.
- ✓ E.Enable server-side encryption (SSE) on the Cosmos DB account.
Why C: Options C and E are correct. Option C: Configuring a customer-managed key in Azure Key Vault allows you to control the encryption keys used for Cosmos DB at rest. Option E: Server-side encryption (SSE) is enabled by default in Azure Cosmos DB, but explicitly ensuring it's on is a best practice. Option A is incorrect because client-side encryption is for encrypting data on the client side before sending to the database, not for at-rest encryption. Option B is incorrect because Azure Disk Encryption encrypts VM disks, not Cosmos DB data. Option D is incorrect because Cosmos DB always encrypts data at rest automatically; you cannot turn it off.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SC-100 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SC-100 exam.