Bylaw

Gallery › Guest Configuration › Azure built-in policies

[Deprecated]: Audit Windows VMs that do not contain the specified certificates in Trusted Root

Converted Initiative Version 1.0.0-deprecated Deprecated

This initiative deploys the policy requirements and audits Windows VMs that do not contain the specified certificates in the Trusted Root Certification Authorities certificate store (Cert:\LocalMachine\Root). For more information on Guest Configuration policies, please visit https://aka.ms/gcpol

ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.

Azure Policy JSONWindowsCertificateInTrustedRoot.json · 44 lines
{
  "properties": {
    "displayName": "[Deprecated]: Audit Windows VMs that do not contain the specified certificates in Trusted Root",
    "policyType": "BuiltIn",
    "description": "This initiative deploys the policy requirements and audits Windows VMs that do not contain the specified certificates in the Trusted Root Certification Authorities certificate store (Cert:\\LocalMachine\\Root). For more information on Guest Configuration policies, please visit https://aka.ms/gcpol",
    "metadata": {
      "version": "1.0.0-deprecated",
      "category": "Guest Configuration",
      "deprecated": true
    },
    "version": "1.0.0",
    "parameters": {
      "CertificateThumbprints": {
        "type": "string",
        "metadata": {
          "displayName": "Certificate thumbprints",
          "description": "A semicolon-separated list of certificate thumbprints that should exist under the Trusted Root certificate store (Cert:\\LocalMachine\\Root). e.g. THUMBPRINT1;THUMBPRINT2;THUMBPRINT3"
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/106ccbe4-a791-4f33-a44a-06796944b8d5",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Deploy_WindowsCertificateInTrustedRoot",
        "parameters": {
          "CertificateThumbprints": {
            "value": "[parameters('CertificateThumbprints')]"
          }
        }
      },
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f3b9ad83-000d-4dc1-bff0-6d54533dd03f",
        "definitionVersion": "1.*.*",
        "policyDefinitionReferenceId": "Audit_WindowsCertificateInTrustedRoot"
      }
    ],
    "versions": [
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/cdfcc6ff-945e-4bc6-857e-056cbc511e0c",
  "name": "cdfcc6ff-945e-4bc6-857e-056cbc511e0c"
}
Bylawcdfcc6ff-945e-4bc6-857e-056cbc511e0c.bylaw.ps1 · 34 lines
# Converted from WindowsCertificateInTrustedRoot.json by ConvertTo-Bylaw.
Initiative 'cdfcc6ff-945e-4bc6-857e-056cbc511e0c' {

    Properties @{
        DisplayName   = '[Deprecated]: Audit Windows VMs that do not contain the specified certificates in Trusted Root'
        Description   = 'This initiative deploys the policy requirements and audits Windows VMs that do not contain the specified certificates in the Trusted Root Certification Authorities certificate store (Cert:\LocalMachine\Root). For more information on Guest Configuration policies, please visit https://aka.ms/gcpol'
        Version       = '1.0.0-deprecated'
        Category      = 'Guest Configuration'
        Deprecated    = $true
        PolicyVersion = '1.0.0'
    }

    Parameter CertificateThumbprints @{
        Type        = 'string'
        DisplayName = 'Certificate thumbprints'
        Description = 'A semicolon-separated list of certificate thumbprints that should exist under the Trusted Root certificate store (Cert:\LocalMachine\Root). e.g. THUMBPRINT1;THUMBPRINT2;THUMBPRINT3'
        JsonName    = 'CertificateThumbprints'
    }

    PolicyDefinition @{
        Id          = '106ccbe4-a791-4f33-a44a-06796944b8d5'
        ReferenceId = 'Deploy_WindowsCertificateInTrustedRoot'
        Version     = '1.*.*'
        Parameters  = @{
            CertificateThumbprints = (Param CertificateThumbprints)
        }
    }

    PolicyDefinition @{
        Id          = 'f3b9ad83-000d-4dc1-bff0-6d54533dd03f'
        ReferenceId = 'Audit_WindowsCertificateInTrustedRoot'
        Version     = '1.*.*'
    }
}

Members (2)

Source: built-in-policies/policySetDefinitions/Guest Configuration/WindowsCertificateInTrustedRoot.json in Azure/azure-policy, under the MIT licence.