rules/findings/Azure/Databases/CosmosDB/CIS3.0/azure-cosmosdb-private-endpoints-disabled.json

{
  "args": [
     
  ],
  "provider": "Azure",
  "serviceType": "CosmosDB",
  "serviceName": "Databases",
  "displayName": "Ensure That Private Endpoints Are Used Where Possible",
  "description": "Private endpoints limit network traffic to approved sources.",
  "rationale": "For sensitive data, private endpoints allow granular control of which services can communicate with Cosmos DB and ensure that this network traffic is private. You set this up on a case by case basis for each service you wish to be connected.",
  "impact": "Only whitelisted services will have access to communicate with the Cosmos DB.",
  "remediation": {
    "text": "
            ###### Remediate from Azure Portal
            1. Open the portal menu.
            2. Select the Azure Cosmos DB blade.
            3. Select the Azure Cosmos DB account.
            4. Select Networking.
            5. Select Private access.
            6. Click + Private Endpoint.
            7. Provide a Name.
            8. Click Next.
            9. From the Resource type drop down, select Microsoft.AzureCosmosDB/databaseAccounts.
            10. From the Resource drop down, select the Cosmos DB account.
            11. Click Next.
            12. Provide appropriate Virtual Network details.
            13. Click Next.
            14. Provide appropriate DNS details.
            15. Click Next.
            16. Optionally provide Tags.
            17. Click Next : Review + create.
            18. Click Create.
    ",
    "code": {
      "powerShell": null,
      "iac": null,
      "terraform": null,
      "other": null
    }
  },
  "recommendation": null,
  "references": [
    "https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints",
    "https://docs.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-cosmosdb-portal",
    "https://docs.microsoft.com/en-us/cli/azure/cosmosdb/private-endpoint-connection?view=azure-cli-latest",
    "https://docs.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest#az-network-private-endpoint-create",
    "https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls"
  ],
  "compliance": [
    {
      "name": "CIS Microsoft Azure Foundations",
      "version": "3.0.0",
      "reference": "5.4.2",
      "profile": "Level 2"
    }
  ],
  "level": "medium",
  "tags": [
     
  ],
  "rule": {
    "path": "az_cosmosdb",
    "subPath": null,
    "selectCondition": {
       
    },
    "query": [
    ],
    "shouldExist": null,
    "returnObject": null,
    "removeIfNotExists": null
  },
  "output": {
    "html": {
      "data": {
        "expandObject": null
      },
      "table": "Normal",
      "decorate": [
         
      ],
      "emphasis": [
         
      ],
      "actions": {
        "objectData": {
          "expandObject": null,
          "limit": null
        },
        "showGoToButton": "True",
        "showModalButton": "True",
        "directLink": null
      }
    },
    "text": {
      "data": {
        "properties": {
           
        },
        "expandObject": null
      },
      "status": {
        "keyName": [
           
        ],
        "message": "",
        "defaultMessage": null
      },
      "properties": {
        "resourceName": null,
        "resourceId": null,
        "resourceType": null
      },
      "onlyStatus": false
    }
  },
  "idSuffix": "cosmosdb_private_endpoints_disabled",
  "notes": [
     
  ],
  "categories": [
     
  ]
}