Bylaw

Gallery › Key Vault › Azure built-in policies

Certificates should be issued by the specified non-integrated certificate authority

Doesn't convert yet Policy Audit Deny Disabled Mode Microsoft.KeyVault.Data Version 2.1.1

Manage your organizational compliance requirements by specifying one custom or internal certificate authorities that can issue certificates in your key vault.

ConvertTo-Bylaw can't convert this policy yet:

Azure Policy JSONCertificates_Issuers_CustomCAs.json · 61 lines
{
  "properties": {
    "displayName": "Certificates should be issued by the specified non-integrated certificate authority",
    "policyType": "BuiltIn",
    "mode": "Microsoft.KeyVault.Data",
    "description": "Manage your organizational compliance requirements by specifying one custom or internal certificate authorities that can issue certificates in your key vault.",
    "metadata": {
      "version": "2.1.1",
      "category": "Key Vault"
    },
    "version": "2.1.1",
    "parameters": {
      "caCommonName": {
        "type": "string",
        "metadata": {
          "displayName": "The common name of the certificate authority",
          "description": "The common name (CN) of the Certificate Authority (CA) provider. For example, for an issuer CN = Contoso, OU = .., DC = .., you can specify Contoso"
        }
      },
      "effect": {
        "type": "string",
        "metadata": {
          "displayName": "Effect",
          "description": "'Audit' allows a non-compliant resource to be created, but flags it as non-compliant. 'Deny' blocks the resource creation. 'Disable' turns off the policy."
        },
        "allowedValues": [
          "audit",
          "Audit",
          "deny",
          "Deny",
          "disabled",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.KeyVault.Data/vaults/certificates"
          },
          {
            "field": "Microsoft.KeyVault.Data/vaults/certificates/issuer.commonName",
            "notContains": "[parameters('caCommonName')]"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "2.1.1",
      "2.1.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/a22f4a40-01d3-4c7d-8071-da157eeff341",
  "name": "a22f4a40-01d3-4c7d-8071-da157eeff341"
}

Source: built-in-policies/policyDefinitions/Key Vault/Certificates_Issuers_CustomCAs.json in Azure/azure-policy, under the MIT licence.