last sync: 2021-Sep-24 16:09: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
[Deprecated]: Azure Security Benchmark v1 42a694ed-f65e-42b2-aa9e-8052e9740a92 Regulatory Compliance Deprecated
[Deprecated]: Azure Security Benchmark v2 bb522ac1-bc39-4957-b194-429bcd3bcb0b Regulatory Compliance Deprecated
[Preview]: NIST SP 800-53 Rev. 5 179d1daa-458f-4e47-8086-2a68d0d6c38f Regulatory Compliance Preview
Azure Security Benchmark 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 Security Center GA
FedRAMP High d5264498-16f4-418a-b659-fa7ef418175f Regulatory Compliance GA
FedRAMP Moderate e95f5a9f-57ad-4d03-bb0b-b1d16db93693 Regulatory Compliance GA
NIST SP 800-53 Rev. 4 cf25b9c1-bd23-4eb6-bd2c-f4f3ac644a5f Regulatory Compliance GA
JSON
{
  "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')]"
    }
  }
}