Ccodemod

codemod/arm-client-cert-auth-endpoints

Require client certificate authentication on Azure App Service ARM resources by setting properties.clientCertEnabled to true and properties.clientCertMode to Required.

azurearmapp-servicesecurity
Public
0 executions

Run locally

npx codemod @codemod/arm-client-cert-auth-endpoints

@codemod/arm-client-cert-auth-endpoints

Require client certificate authentication on Azure App Service ARM resources by rewriting Microsoft.Web/sites and Microsoft.Web/sites/slots resource definitions in ARM template JSON files.

What It Changes

For each matching App Service resource, the codemod ensures:

  • properties.clientCertEnabled is true
  • properties.clientCertMode is "Required"

If the resource has no properties object, the codemod creates one.

Scope

  • Targets JSON ARM templates with a top-level resources array
  • Rewrites Microsoft.Web/sites
  • Rewrites Microsoft.Web/sites/slots
  • Leaves unrelated Azure resource types unchanged
  • Leaves already compliant App Service resources unchanged

Usage

bash

Development

bash

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.