last sync: 2020-Dec-02 15:37:49 UTC

Azure Policy definition

Authorized IP ranges should be defined on Kubernetes Services

Name Authorized IP ranges should be defined on Kubernetes Services
Azure Portal
Id 0e246bcf-5f6f-4f87-bc6f-775d4712c7ea
Version 2.0.1
details on versioning
Category Security Center
Microsoft docs
Description Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster.
Mode All
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2020-08-19 13:49:29 change Previous DisplayName: [Preview]: Authorized IP ranges should be defined on Kubernetes Services
Used in Initiatives
Initiative DisplayName Initiative Id Initiative Category State
[Preview]: Azure Security Benchmark 42a694ed-f65e-42b2-aa9e-8052e9740a92 Regulatory Compliance Preview
Enable Monitoring in Azure Security Center 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 Security Center GA
Json
{
  "properties": {
    "displayName": "Authorized IP ranges should be defined on Kubernetes Services",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "Restrict access to the Kubernetes Service Management API by granting API access only to IP addresses in specific ranges. It is recommended to limit access to authorized IP ranges to ensure that only applications from allowed networks can access the cluster.",
    "metadata": {
      "version": "2.0.1",
      "category": "Security Center"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.ContainerService/managedClusters"
          },
          {
            "field": "Microsoft.ContainerService/managedClusters/apiServerAccessProfile.authorizedIPRanges",
            "exists": "false"
          },
          {
            "anyOf": [
              {
                "field": "Microsoft.ContainerService/managedClusters/apiServerAccessProfile.enablePrivateCluster",
                "exists": "false"
              },
              {
                "field": "Microsoft.ContainerService/managedClusters/apiServerAccessProfile.enablePrivateCluster",
                "equals": "false"
              }
            ]
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/0e246bcf-5f6f-4f87-bc6f-775d4712c7ea",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "0e246bcf-5f6f-4f87-bc6f-775d4712c7ea"
}