last sync: 2020-Aug-05 13:05:29 UTC

Azure Policy

[Preview]: Kubernetes cluster containers should not share host process ID or host IPC namespace

Policy DisplayName [Preview]: Kubernetes cluster containers should not share host process ID or host IPC namespace
Policy Id 47a1ee2f-2a2a-4576-bf2a-e0e36709c2b8
Policy Category Kubernetes
Policy Description This policy blocks pod containers from sharing the host process ID namespace and host IPC namespace in a Kubernetes cluster. For instructions on using this policy, visit https://aka.ms/kubepolicydoc/.
Policy Mode Microsoft.Kubernetes.Data
Policy Type BuiltIn
Policy in Preview True
Policy Deprecated FALSE
Policy Effect Default: audit
Allowed: (audit,deny,disabled)
Roles used none
Policy Changes
Date/Time (UTC ymd) (i) Change Change detail
2020-07-08 14:28:08 add: Policy 47a1ee2f-2a2a-4576-bf2a-e0e36709c2b8
Used in Policy Initiative(s)
Initiative DisplayName Initiative Id
[Preview]: Kubernetes cluster pod security restricted standards for Linux-based workloads 42b8ef37-b724-4e24-bbc8-7a7708edfe00
[Preview]: Kubernetes cluster pod security baseline standards for Linux-based workloads a8640138-9b0a-4a28-b8cb-1666c838647d
Policy Rule
{
  "properties": {
  "displayName": "[Preview]: Kubernetes cluster containers should not share host process ID or host IPC namespace",
    "policyType": "BuiltIn",
    "mode": "Microsoft.Kubernetes.Data",
    "description": "This policy blocks pod containers from sharing the host process ID namespace and host IPC namespace in a Kubernetes cluster. For instructions on using this policy, visit https://aka.ms/kubepolicydoc/.",
    "metadata": {
      "version": "1.0.0-preview",
      "category": "Kubernetes",
      "preview": true
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
        "displayName": "[Preview]: Effect",
          "description": "'Audit' allows a non-compliant resource to be created or updated, but flags it as non-compliant. 'Deny' blocks the non-compliant resource creation or update. 'Disabled' turns off the policy."
        },
        "allowedValues": [
          "audit",
          "deny",
          "disabled"
        ],
        "defaultValue": "audit"
      },
      "excludedNamespaces": {
        "type": "Array",
        "metadata": {
        "displayName": "[Preview]: Namespace exclusions",
          "description": "List of Kubernetes namespaces to exclude from policy evaluation."
        },
        "defaultValue": [
          "kube-system",
          "gatekeeper-system",
          "azure-arc"
        ]
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "in": [
          "AKS Engine",
          "Microsoft.Kubernetes/connectedClusters",
          "Microsoft.ContainerService/managedClusters"
        ]
      },
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "constraintTemplate": "https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-references/Kubernetes/block-host-namespace/template.yaml",
          "constraint": "https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-references/Kubernetes/block-host-namespace/constraint.yaml",
          "values": {
          "excludedNamespaces": "[parameters('excludedNamespaces')]"
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/47a1ee2f-2a2a-4576-bf2a-e0e36709c2b8",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "47a1ee2f-2a2a-4576-bf2a-e0e36709c2b8"
}