Enable HTTPS setting on Azure App service using Azure policy

Published Apr 18 2022 07:43 AM 1,770 Views

Use Case:

By default, clients can connect to Azure App Service endpoints by using both HTTP or HTTPS. However it is always recommended to redirect HTTP to HTTPs because HTTPS uses the SSL/TLS protocol to provide a secure connection, which is both encrypted and authenticated.

In this post , we will learn how to enable HTTPS Only setting on the Azure App service using Azure Policy.

 

Background:

Azure App Service is a fully managed platform as a service (PaaS) offering for developers. It is a HTTP-based service for hosting web applications, REST APIs, and mobile back ends. App Service not only adds the power of Microsoft Azure to your application, such as security, load balancing, autoscaling, and automated management , you can also take advantage of its DevOps capabilities, such as continuous deployment from Azure DevOps, GitHub, Docker Hub, and other sources, package management, staging environments, custom domain, and TLS/SSL certificates.

 

Azure Policy is a service in Azure which helps to enforce organizational standards and to assess compliance. Policy evaluates resources in Azure by comparing the properties of those resources to business rules which are defined in the Policy. These business rules, described in JSON format, are known as policy definitions.
To learn more about policy and how to create a policy you can refer this document.


To ensure proper governance and considering the organization has a requirement to enforce HTTPS on both new and existing App services within your environment we are going to achieve this using Azure Policy.

Prerequisites:

  1. An Azure Subscription. If you don't have an Azure subscription, create an Azure free account before you begin.
  2. You need to have required permissions to create and manage Azure policy definitions in your subscription. You can refer to Resource Policy Contributor or Security Admin role.
  3. Since this policy is using DeployIfNotExists effect, policy assignments will require a managed identity to do remediation.

Create a custom policy to Enable HTTPS on App Service:

  1. In the Azure portal, select All services > search for Policy > go to Definitions > click + Policy definition.

    TirumaleshSriram_0-1650021906741.png
  2. Select Definition location by clicking on the ellipsis [...] and choose your management group or subscription.
  3. Fill Name field with your policy definition name like 'Enable HTTPS on App Service' and add the Description.
  4. Select appropriate Category for your policy, you can create a new one or use existing one like 'App Service'.
    TirumaleshSriram_1-1650022674969.png
  5. Here is the JSON Policy definition which you need to add in the Policy Rule section and then click on Save.

    DISCLAIMER: Below sample policy definition is not supported under any Microsoft standard support program or service. This is intended to be used in non-production environment only. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, owners of this GitHub repro, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.


    	{
    	  "mode": "All",
    	  "policyRule": {
    	    "if": {
    	       "allOf": [
    	          {
    	            "field": "type",
    	            "equals": "Microsoft.Web/sites"
    	          },
    	          {
    	            "field": "kind",
    	            "like": "app*"
    	          }
    	        ]
    	    },
    	    "then": {
    	      "effect": "[parameters('effect')]",
    	      "details": {
    	        "type": "Microsoft.Web/sites",
    	        "name": "[field('name')]",
    	        "existenceCondition": {
    	          "field": "Microsoft.Web/sites/httpsOnly",
    	          "equals": "true"
    	        },
    	        "roleDefinitionIds": [
    	          "/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
    	        ],
    	        "deployment": {
    	          "properties": {
    	            "mode": "incremental",
    	            "parameters": {
    	              "webAppName": {
    	                "value": "[field('name')]"
    	              },
    	              "location": {
    	                "value": "[field('location')]"
    	              },
    	              "kind": {
    	                "value": "[field('kind')]"
    	              }
    	            },
    	            "template": {
    	              "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    	              "contentVersion": "1.0.0.0",
    	              "parameters": {
    	                "webAppName": {
    	                  "type": "string"
    	                },
    	                "location": {
    	                  "type": "string"
    	                },
    	                "kind": {
    	                  "type": "string"
    	                }
    	              },
    	              "resources": [
    	                {
    	                  "type": "Microsoft.Web/sites",
    	                  "apiVersion": "2021-02-01",
    	                  "name": "[parameters('webAppName')]",
    	                  "location": "[parameters('location')]",
    	                  "kind": "[parameters('kind')]",
    	                  "properties": {
    	                    "httpsOnly": "true"
    	                  }
    	                }
    	              ]
    	            }
    	          }
    	        }
    	      }
    	    }
    	  },
    	  "parameters": {
    	    "effect": {
    	      "type": "String",
    	      "metadata": {
    	        "displayName": "Effect",
    	        "description": "Enable or disable the execution of the policy"
    	      },
    	      "allowedValues": [
    	        "DeployIfNotExists",
    	        "AuditIfNotExists",
    	        "Disabled"
    	      ],
    	      "defaultValue": "DeployIfNotExists"
    	    }
    	  }
    	}
    ​
  6. Ensure that the roleDefinitionIds contains enough permissions to enable HTTPS settings on the resource, you can select Contributor role.
  7. If the ExistenceCondition evaluates to true, the policy doesn't trigger the deployment and if the condition evaluates to false the HTTPS deployment happens. Refer to this document to learn more about DeployIfNotExists and ExistenceCondition.

Assign the custom policy:

  1. Open the Azure portal ,select All services > search for Policy > go to Assignments> select Assign policy.

    TirumaleshSriram_2-1650023249364.png

     

  2. On the Assign Policy page, set the Scope by selecting the ellipsis and then selecting either a management group or subscription. Optionally, select a resource group. A scope determines what resources or grouping of resources the policy assignment gets enforced on. Then use the Select button at the bottom of the Scope page.
  3. Resources can be excluded based on the Scope. Exclusions start at one level lower than the level of the Scope. Exclusions are optional, so leave it blank for now.
  4. Select the Policy definition ellipsis to open the list of available definitions. Search for the custom policy 'Enable HTTPS on App Service' that you have created in the previous step and then click on Select.
  5. The Assignment name is automatically populated with the policy name you selected, but you can change it. For this example, leave Enable HTTPS on App Service. You can also add an optional Description. The description provides details about this policy assignment. Assigned by will automatically fill based on who is logged in. This field is optional, so custom values can be entered.
  6. Leave policy enforcement Enabled. For more information, see Policy assignment - enforcement mode.
  7. Select Next at the bottom of the page or the Parameters tab at the top of the page to move to the next segment of the assignment wizard.
  8. If the policy definition selected on the Basics tab included parameters, they are configured on this tab. Since our definition has parameters (DeployIfNotExists , AuditIfNotExists , Disabled) , by default DeployIfNotExists is selected.

    TirumaleshSriram_0-1650024180978.png

     

     

  9. In the Remediation tab, you can see that "Create a Managed Identity" is selected by default as the policy effect is DeployIfNotExists. Policies with the deployIfNotExists and modify effect types need the ability to deploy or modify the resources To do this, choose between an existing user assigned managed identity or creating a system assigned managed identity. This identity will also be given the Contributor permissions. For more information , refer managed identities.

    TirumaleshSriram_1-1650024326362.png

    To evaluate the existing resources, you can select "Create a remediation task" as shown below.

     

    TirumaleshSriram_2-1650024413690.png

     

  10. In the next page, set your desired message in Non-compliance message field. This custom message is displayed when a resource is denied or for non-compliant resources during regular evaluation. Then click Review + Create.

    TirumaleshSriram_3-1650024668291.png

     

  11. Review the selected options, then select Create at the bottom of the page.

Verify if the policy evaluation triggered:

It takes around 30 minutes for the policy assignment to be applied to the defined scope and then the evaluation cycle begins for resources within that scope against the newly assigned policy and depending on the effects used by the policy or initiative, resources are marked as compliant, non-compliant, or exempt.
Also for every 24 hours, there is a standard compliance evaluation cycle which will trigger and assignments are automatically reevaluated. Also you can trigger an On demand evaluation scan.

 

You're now ready to identify non-compliant resources to understand the compliance state of your environment.

 

Identify non-compliant resources:

Select Compliance in the left side of the page. Then locate the 'Enable HTTPS on App Service' policy assignment you created. If there are any existing App Service resources that don't have HTTPS enabled, they appear under Non-compliant resources.

TirumaleshSriram_4-1650024897941.png

Remember that when a condition is evaluated against your existing App Service resources and HTTPS is not enabled, then those resources are marked as non-compliant but no action is taken on these existing resources. For this reason, we have created a remediation task during the policy assignment.

On the left side, click on Remediation and locate with your Policy definition name and you can see that the existing non-compliant resources got remediated successfully.

TirumaleshSriram_5-1650025019053.png

And after the remediation run, all the App Services in your environment will get marked as compliant.

 

TirumaleshSriram_6-1650025115191.png

 

Now that you can verify the HTTPS setting is enabled on your App Service now.
Go to your App Service > TLS/SSL settings > HTTPS Only

TirumaleshSriram_7-1650025173610.png

 

Note : This Policy is used to enable HTTPS setting for App Service resources only. But you can use the same policy rule for function app by modifying the below field.

 

{
"field": "kind",
"like": "functionapp*"
}

 

This way, we can use Azure Policy to Enable HTTPS setting on Azure App Services.
To learn more about Azure Policy, refer to the following documentation Azure Policy

%3CLINGO-SUB%20id%3D%22lingo-sub-3286603%22%20slang%3D%22en-US%22%3EEnable%20HTTPS%20setting%20on%20Azure%20App%20service%20using%20Azure%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3286603%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CU%3EUse%20Case%3A%3C%2FU%3E%3C%2FSTRONG%3E%3CU%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EBy%20default%2C%20clients%20can%20connect%20to%20Azure%20App%20Service%20endpoints%20by%20using%20both%20HTTP%20or%20HTTPS.%20However%20it%20is%20always%20recommended%20to%20redirect%20HTTP%20to%20HTTPs%20because%20HTTPS%20uses%20the%20SSL%2FTLS%20protocol%20to%20provide%20a%20secure%20connection%2C%20which%20is%20both%20encrypted%20and%20authenticated.%3C%2FP%3E%0A%3CP%3EIn%20this%20post%20%2C%20we%20will%20learn%20how%20to%20enable%20HTTPS%20Only%20setting%20on%20the%20Azure%20App%20service%20using%20Azure%20Policy.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EBackground%3A%3C%2FU%3E%3C%2FSTRONG%3E%3CU%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20App%20Service%3C%2FA%3E%26nbsp%3Bis%20a%20fully%20managed%20platform%20as%20a%20service%20(PaaS)%20offering%20for%20developers.%20It%20is%20a%20HTTP-based%20service%20for%20hosting%20web%20applications%2C%20REST%20APIs%2C%20and%20mobile%20back%20ends.%20App%20Service%20not%20only%20adds%20the%20power%20of%20Microsoft%20Azure%20to%20your%20application%2C%20such%20as%20security%2C%20load%20balancing%2C%20autoscaling%2C%20and%20automated%20management%20%2C%20you%20can%20also%20take%20advantage%20of%20its%20DevOps%20capabilities%2C%20such%20as%20continuous%20deployment%20from%20Azure%20DevOps%2C%20GitHub%2C%20Docker%20Hub%2C%20and%20other%20sources%2C%20package%20management%2C%20staging%20environments%2C%20custom%20domain%2C%20and%20TLS%2FSSL%20certificates.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Foverview%23%3A~%3Atext%3DWhat%2520is%2520Azure%2520Policy%253F%25201%2520Overview.%2520Azure%2520Policy%2CAzure%2520Policy%2520objects.%2520...%25205%2520Next%2520steps.%2520%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Policy%3C%2FA%3E%20is%20a%20service%20in%20Azure%20which%20helps%20to%20enforce%20organizational%20standards%20and%20to%20assess%20compliance.%20Policy%20evaluates%20resources%20in%20Azure%20by%20comparing%20the%20properties%20of%20those%20resources%20to%20business%20rules%20which%20are%20defined%20in%20the%20Policy.%20These%20business%20rules%2C%20described%20in%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fdefinition-structure%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EJSON%20format%3C%2FA%3E%2C%20are%20known%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Foverview%23policy-definition%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Epolicy%20definitions%3C%2FA%3E.%3CBR%20%2F%3ETo%20learn%20more%20about%20policy%20and%20how%20to%20create%20a%20policy%20you%20can%20refer%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Ftutorials%2Fcreate-and-manage%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%3C%2FA%3E%20document.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ETo%20ensure%20proper%20governance%20and%20considering%20the%20organization%20has%20a%20requirement%20to%20enforce%20HTTPS%20on%20both%20new%20and%20existing%20App%20services%20within%20your%20environment%20we%20are%20going%20to%20achieve%20this%20using%20Azure%20Policy.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EPrerequisites%3A%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAn%20Azure%20Subscription.%20If%20you%20don't%20have%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fguides%2Fdeveloper%2Fazure-developer-guide%23understanding-accounts-subscriptions-and-billing%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20subscription%3C%2FA%3E%2C%20create%20an%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Ffree%2F%3Fref%3Dmicrosoft.com%26amp%3Butm_source%3Dmicrosoft.com%26amp%3Butm_medium%3Ddocs%26amp%3Butm_campaign%3Dvisualstudio%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20free%20account%3C%2FA%3E%20before%20you%20begin.%3C%2FLI%3E%0A%3CLI%3EYou%20need%20to%20have%20required%20permissions%20to%20create%20and%20manage%20Azure%20policy%20definitions%20in%20your%20subscription.%20You%20can%20refer%20to%20Resource%20Policy%20Contributor%20or%20Security%20Admin%20role.%3C%2FLI%3E%0A%3CLI%3ESince%20this%20policy%20is%20using%20DeployIfNotExists%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Feffects%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eeffect%3C%2FA%3E%2C%20policy%20assignments%20will%20require%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fhow-to%2Fremediate-resources%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Emanaged%20identity%3C%2FA%3E%26nbsp%3Bto%20do%20remediation.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3ECreate%20a%20custom%20policy%20to%20Enable%20HTTPS%20on%20App%20Service%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EIn%20the%20%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAzure%20portal%3C%2FA%3E%2C%20select%20%3CSTRONG%3EAll%20services%3C%2FSTRONG%3E%20%26gt%3B%20search%20for%20%3CSTRONG%3EPolicy%3C%2FSTRONG%3E%20%26gt%3B%20go%20to%20%3CSTRONG%3EDefinitions%3C%2FSTRONG%3E%20%26gt%3B%20click%20%3CSTRONG%3E%3CSTRONG%3E%2B%20Policy%20definition.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_0-1650021906741.png%22%20style%3D%22width%3A%20730px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364493i42A878E08A494E5B%2Fimage-dimensions%2F730x478%3Fv%3Dv2%22%20width%3D%22730%22%20height%3D%22478%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_0-1650021906741.png%22%20alt%3D%22TirumaleshSriram_0-1650021906741.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3ESelect%20%3CSTRONG%3EDefinition%20location%3C%2FSTRONG%3E%20by%20clicking%20on%20the%20ellipsis%20%5B...%5D%20and%20choose%20your%20management%20group%20or%20subscription.%3C%2FLI%3E%0A%3CLI%3EFill%20%3CSTRONG%3EName%3C%2FSTRONG%3E%20field%20with%20your%20policy%20definition%20name%20like%20'Enable%20HTTPS%20on%20App%20Service'%20and%20add%20the%20%3CSTRONG%3EDescription%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3ESelect%20appropriate%20%3CSTRONG%3ECategory%3C%2FSTRONG%3E%20for%20your%20policy%2C%20you%20can%20create%20a%20new%20one%20or%20use%20existing%20one%20like%20'App%20Service'.%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_1-1650022674969.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364494i0B80F6393F64B07C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_1-1650022674969.png%22%20alt%3D%22TirumaleshSriram_1-1650022674969.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EHere%20is%20the%20%3CSTRONG%3EJSON%20Policy%20definition%3C%2FSTRONG%3E%20which%20you%20need%20to%20add%20in%20the%20Policy%20Rule%20section%20and%20then%20click%20on%20%3CSTRONG%3ESave%3C%2FSTRONG%3E.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3EDISCLAIMER%3C%2FSTRONG%3E%3A%20Below%20sample%20policy%20definition%20is%20not%20supported%20under%20any%20Microsoft%20standard%20support%20program%20or%20service.%20This%20is%20intended%20to%20be%20used%20in%20non-production%20environment%26nbsp%3Bonly.%20The%20sample%20scripts%20are%20provided%20AS%20IS%20without%20warranty%20of%20any%20kind.%20Microsoft%20further%20disclaims%20all%20implied%20warranties%20including%2C%20without%20limitation%2C%20any%20implied%20warranties%20of%20merchantability%20or%20of%20fitness%20for%20a%20particular%20purpose.%20The%20entire%20risk%20arising%20out%20of%20the%20use%20or%20performance%20of%20the%20sample%20scripts%20and%20documentation%20remains%20with%20you.%20In%20no%20event%20shall%20Microsoft%2C%20its%20authors%2C%20owners%20of%20this%20GitHub%26nbsp%3Brepro%2C%20or%20anyone%20else%20involved%20in%20the%20creation%2C%20production%2C%20or%20delivery%20of%20the%20scripts%20be%20liable%20for%20any%20damages%20whatsoever%20(including%20without%20limitation%2C%20damages%20for%20loss%20of%20business%20profits%2C%20business%20interruption%2C%20loss%20of%20business%20information%2C%20or%20other%20pecuniary%20loss)%20arising%20out%20of%20the%20use%20of%20or%20inability%20to%20use%20the%20sample%20scripts%20or%20documentation%2C%20even%20if%20Microsoft%20has%20been%20advised%20of%20the%20possibility%20of%20such%20damages.%3C%2FEM%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%20%7B%0A%20%20%20%22mode%22%3A%20%22All%22%2C%0A%20%20%20%22policyRule%22%3A%20%7B%0A%20%20%20%20%20%22if%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22allOf%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22field%22%3A%20%22type%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22equals%22%3A%20%22Microsoft.Web%2Fsites%22%0A%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22field%22%3A%20%22kind%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22like%22%3A%20%22app*%22%0A%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%22then%22%3A%20%7B%0A%20%20%20%20%20%20%20%22effect%22%3A%20%22%5Bparameters('effect')%5D%22%2C%0A%20%20%20%20%20%20%20%22details%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22Microsoft.Web%2Fsites%22%2C%0A%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22%5Bfield('name')%5D%22%2C%0A%20%20%20%20%20%20%20%20%20%22existenceCondition%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%22field%22%3A%20%22Microsoft.Web%2Fsites%2FhttpsOnly%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%22equals%22%3A%20%22true%22%0A%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%22roleDefinitionIds%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%22%2Fproviders%2FMicrosoft.Authorization%2FroleDefinitions%2Fb24988ac-6180-42a0-ab88-20f7382dd24c%22%0A%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%22deployment%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%22properties%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22mode%22%3A%20%22incremental%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22webAppName%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22%5Bfield('name')%5D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22location%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22%5Bfield('location')%5D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kind%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22%5Bfield('kind')%5D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22template%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fschema.management.azure.com%2Fschemas%2F2019-04-01%2FdeploymentTemplate.json%23%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22contentVersion%22%3A%20%221.0.0.0%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22webAppName%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22location%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kind%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22resources%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22Microsoft.Web%2Fsites%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22apiVersion%22%3A%20%222021-02-01%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22%5Bparameters('webAppName')%5D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22location%22%3A%20%22%5Bparameters('location')%5D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22kind%22%3A%20%22%5Bparameters('kind')%5D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22properties%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22httpsOnly%22%3A%20%22true%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%7D%0A%20%20%20%7D%2C%0A%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%22effect%22%3A%20%7B%0A%20%20%20%20%20%20%20%22type%22%3A%20%22String%22%2C%0A%20%20%20%20%20%20%20%22metadata%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%22displayName%22%3A%20%22Effect%22%2C%0A%20%20%20%20%20%20%20%20%20%22description%22%3A%20%22Enable%20or%20disable%20the%20execution%20of%20the%20policy%22%0A%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%22allowedValues%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%22DeployIfNotExists%22%2C%0A%20%20%20%20%20%20%20%20%20%22AuditIfNotExists%22%2C%0A%20%20%20%20%20%20%20%20%20%22Disabled%22%0A%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%22defaultValue%22%3A%20%22DeployIfNotExists%22%0A%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%7D%0A%E2%80%8B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3EEnsure%20that%20the%20%3CSTRONG%3EroleDefinitionIds%3C%2FSTRONG%3E%20contains%20enough%20permissions%20to%20enable%20HTTPS%20settings%20on%20the%20resource%2C%20you%20can%20select%20%3CSTRONG%3EContributor%3C%2FSTRONG%3E%20role.%3C%2FLI%3E%0A%3CLI%3EIf%20the%20%3CSTRONG%3EExistenceCondition%3C%2FSTRONG%3E%20evaluates%20to%20true%2C%20the%20policy%20doesn't%20trigger%20the%20deployment%20and%20if%20the%20condition%20evaluates%20to%20false%20the%20HTTPS%20deployment%20happens.%20Refer%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Feffects%23deployifnotexists-properties%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%3C%2FA%3E%20document%20to%20learn%20more%20about%20DeployIfNotExists%20and%20ExistenceCondition.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EAssign%20the%20custom%20policy%3A%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EOpen%20the%20%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAzure%20portal%3C%2FA%3E%26nbsp%3B%2Cselect%20%3CSTRONG%3EAll%20services%3C%2FSTRONG%3E%20%26gt%3B%20search%20for%20%3CSTRONG%3EPolicy%3C%2FSTRONG%3E%20%26gt%3B%20go%20to%20%3CSTRONG%3EAssignments%3C%2FSTRONG%3E%26gt%3B%20select%20%3CSTRONG%3EAssign%20policy%3C%2FSTRONG%3E.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_2-1650023249364.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364495iC011678BC4B2977E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_2-1650023249364.png%22%20alt%3D%22TirumaleshSriram_2-1650023249364.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EOn%20the%20Assign%20Policy%20page%2C%20set%20the%20%3CSTRONG%3EScope%3C%2FSTRONG%3E%20by%20selecting%20the%20ellipsis%20and%20then%20selecting%20either%20a%20management%20group%20or%20subscription.%20Optionally%2C%20select%20a%20resource%20group.%20A%20scope%20determines%20what%20resources%20or%20grouping%20of%20resources%20the%20policy%20assignment%20gets%20enforced%20on.%20Then%20use%20the%20%3CSTRONG%3ESelect%3C%2FSTRONG%3E%20button%20at%20the%20bottom%20of%20the%20Scope%20page.%3C%2FLI%3E%0A%3CLI%3EResources%20can%20be%20excluded%20based%20on%20the%20Scope.%20%3CSTRONG%3EExclusions%3C%2FSTRONG%3E%20start%20at%20one%20level%20lower%20than%20the%20level%20of%20the%20Scope.%20Exclusions%20are%20optional%2C%20so%20leave%20it%20blank%20for%20now.%3C%2FLI%3E%0A%3CLI%3ESelect%20the%20%3CSTRONG%3EPolicy%20definition%3C%2FSTRONG%3E%20ellipsis%20to%20open%20the%20list%20of%20available%20definitions.%20Search%20for%20the%20custom%20policy%20'%3CSTRONG%3EEnable%20HTTPS%20on%20App%20Service'%3C%2FSTRONG%3E%20that%20you%20have%20created%20in%20the%20previous%20step%20and%20then%20click%20on%20%3CSTRONG%3ESelect%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EThe%20%3CSTRONG%3EAssignment%20name%3C%2FSTRONG%3E%20is%20automatically%20populated%20with%20the%20policy%20name%20you%20selected%2C%20but%20you%20can%20change%20it.%20For%20this%20example%2C%20leave%20%3CSTRONG%3EEnable%20HTTPS%20on%20App%20Service%3C%2FSTRONG%3E.%20You%20can%20also%20add%20an%20optional%20Description.%20The%20description%20provides%20details%20about%20this%20policy%20assignment.%20%3CSTRONG%3EAssigned%20by%3C%2FSTRONG%3E%20will%20automatically%20fill%20based%20on%20who%20is%20logged%20in.%20This%20field%20is%20optional%2C%20so%20custom%20values%20can%20be%20entered.%3C%2FLI%3E%0A%3CLI%3ELeave%20policy%20enforcement%20Enabled.%20For%20more%20information%2C%20see%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fassignment-structure%23enforcement-mode%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EPolicy%20assignment%20-%20enforcement%20mode%3C%2FA%3E.%3C%2FLI%3E%0A%3CLI%3ESelect%20%3CSTRONG%3ENext%3C%2FSTRONG%3E%20at%20the%20bottom%20of%20the%20page%20or%20the%20%3CSTRONG%3EParameters%3C%2FSTRONG%3E%20tab%20at%20the%20top%20of%20the%20page%20to%20move%20to%20the%20next%20segment%20of%20the%20assignment%20wizard.%3C%2FLI%3E%0A%3CLI%3E%3CP%3EIf%20the%20policy%20definition%20selected%20on%20the%20%3CSTRONG%3EBasics%3C%2FSTRONG%3E%20tab%20included%20parameters%2C%20they%20are%20configured%20on%20this%20tab.%20Since%20our%20definition%20has%20parameters%20(DeployIfNotExists%20%2C%20AuditIfNotExists%20%2C%20Disabled)%20%2C%20by%20default%20%3CSTRONG%3EDeployIfNotExists%3C%2FSTRONG%3E%20is%20selected.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_0-1650024180978.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364496iB25499D1CEE2DE08%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_0-1650024180978.png%22%20alt%3D%22TirumaleshSriram_0-1650024180978.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EIn%20the%20Remediation%20tab%2C%20you%20can%20see%20that%20%22%3CSTRONG%3ECreate%20a%20Managed%20Identity%3C%2FSTRONG%3E%22%20is%20selected%20by%20default%20as%20the%20policy%20effect%20is%20DeployIfNotExists.%20Policies%20with%20the%20%3CEM%3EdeployIfNotExists%3C%2FEM%3E%20and%20%3CEM%3Emodify%3C%2FEM%3E%20effect%20types%20need%20the%20ability%20to%20deploy%20or%20modify%20the%20resources%20To%20do%20this%2C%20choose%20between%20an%20existing%20user%20assigned%20managed%20identity%20or%20creating%20a%20system%20assigned%20managed%20identity.%20This%20identity%20will%20also%20be%20given%20the%20%3CSTRONG%3EContributor%3C%2FSTRONG%3E%20permissions.%20For%20more%20information%20%2C%20refer%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fhow-to%2Fremediate-resources%23how-remediation-security-works%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Emanaged%20identities.%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_1-1650024326362.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364497iB45CA5477ECB51A3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_1-1650024326362.png%22%20alt%3D%22TirumaleshSriram_1-1650024326362.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3ETo%20evaluate%20the%20existing%20resources%2C%20you%20can%20select%20%22%3CSTRONG%3ECreate%20a%20remediation%20task%3C%2FSTRONG%3E%22%20as%20shown%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_2-1650024413690.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364498iC08125AEC88BC924%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_2-1650024413690.png%22%20alt%3D%22TirumaleshSriram_2-1650024413690.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EIn%20the%20next%20page%2C%20set%20your%20desired%20message%20in%20%3CSTRONG%3ENon-compliance%20message%3C%2FSTRONG%3E%20field.%20This%20custom%20message%20is%20displayed%20when%20a%20resource%20is%20denied%20or%20for%20non-compliant%20resources%20during%20regular%20evaluation.%20Then%20click%20%3CSTRONG%3E%3CSTRONG%3EReview%20%2B%20Create.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_3-1650024668291.png%22%20style%3D%22width%3A%20729px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364499i46DCEAA414424957%2Fimage-dimensions%2F729x519%3Fv%3Dv2%22%20width%3D%22729%22%20height%3D%22519%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_3-1650024668291.png%22%20alt%3D%22TirumaleshSriram_3-1650024668291.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EReview%20the%20selected%20options%2C%20then%20select%20%3CSTRONG%3ECreate%3C%2FSTRONG%3E%20at%20the%20bottom%20of%20the%20page.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EVerify%20if%20the%20policy%20evaluation%20triggered%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FU%3E%3CU%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EIt%20takes%20around%2030%20minutes%20for%20the%20policy%20assignment%20to%20be%20applied%20to%20the%20defined%20scope%20and%20then%20the%20evaluation%20cycle%20begins%20for%20resources%20within%20that%20scope%20against%20the%20newly%20assigned%20policy%20and%20depending%20on%20the%20effects%20used%20by%20the%20policy%20or%20initiative%2C%20resources%20are%20marked%20as%20compliant%2C%20non-compliant%2C%20or%20exempt.%20%3CBR%20%2F%3EAlso%20for%20every%2024%20hours%2C%20there%20is%20a%20standard%20compliance%20evaluation%20cycle%20which%20will%20trigger%20and%20assignments%20are%20automatically%20reevaluated.%20Also%20you%20can%20trigger%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fpolicy%2Fstate%3Fview%3Dazure-cli-latest%23az-policy-state-trigger-scan%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EOn%20demand%20evaluation%20scan.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou're%20now%20ready%20to%20identify%20non-compliant%20resources%20to%20understand%20the%20compliance%20state%20of%20your%20environment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EIdentify%20non-compliant%20resources%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FU%3E%3CU%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3ESelect%20%3CSTRONG%3ECompliance%3C%2FSTRONG%3E%20in%20the%20left%20side%20of%20the%20page.%20Then%20locate%20the%20'%3CSTRONG%3EEnable%20HTTPS%20on%20App%20Service'%3C%2FSTRONG%3E%20policy%20assignment%20you%20created.%20If%20there%20are%20any%20existing%20App%20Service%20resources%20that%20don't%20have%20HTTPS%20enabled%2C%20they%20appear%20under%20%3CSTRONG%3ENon-compliant%3C%2FSTRONG%3E%20resources.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_4-1650024897941.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364500i2BD838CF58CCDE27%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_4-1650024897941.png%22%20alt%3D%22TirumaleshSriram_4-1650024897941.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERemember%20that%20when%20a%20condition%20is%20evaluated%20against%20your%20existing%20App%20Service%20resources%20and%20HTTPS%20is%20not%20enabled%2C%20then%20those%20resources%20are%20marked%20as%20non-compliant%20but%20no%20action%20is%20taken%20on%20these%20existing%20resources.%20For%20this%20reason%2C%20we%20have%20created%20a%20remediation%20task%20during%20the%20policy%20assignment.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EOn%20the%20left%20side%2C%20click%20on%20Remediation%20and%20locate%20with%20your%20Policy%20definition%20name%20and%20you%20can%20see%20that%20the%20existing%20non-compliant%20resources%20got%20remediated%20successfully.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_5-1650025019053.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364501i5695CE3F1E5AE6A8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_5-1650025019053.png%22%20alt%3D%22TirumaleshSriram_5-1650025019053.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAnd%20after%20the%20remediation%20run%2C%20all%20the%20App%20Services%20in%20your%20environment%20will%20get%20marked%20as%20%3CSTRONG%3Ecompliant%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_6-1650025115191.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364502i0609707E6F660210%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_6-1650025115191.png%22%20alt%3D%22TirumaleshSriram_6-1650025115191.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20can%20verify%20the%20HTTPS%20setting%20is%20enabled%20on%20your%20App%20Service%20now.%3CBR%20%2F%3EGo%20to%20your%20%3CSTRONG%3EApp%20Service%20%26gt%3B%20TLS%2FSSL%20settings%20%26gt%3B%20HTTPS%20Only%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TirumaleshSriram_7-1650025173610.png%22%20style%3D%22width%3A%20743px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364503i1D12A2C1784A6CE8%2Fimage-dimensions%2F743x353%3Fv%3Dv2%22%20width%3D%22743%22%20height%3D%22353%22%20role%3D%22button%22%20title%3D%22TirumaleshSriram_7-1650025173610.png%22%20alt%3D%22TirumaleshSriram_7-1650025173610.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3C%2FU%3E%20%3A%20This%20Policy%20is%20used%20to%20enable%20HTTPS%20setting%20for%20App%20Service%20resources%20only.%20But%20you%20can%20use%20the%20same%20policy%20rule%20for%20%3CSTRONG%3Efunction%20app%3C%2FSTRONG%3E%20by%20modifying%20the%20below%20field.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%22field%22%3A%20%22kind%22%2C%0A%22like%22%3A%20%22functionapp*%22%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20way%2C%20we%20can%20use%20Azure%20Policy%20to%20Enable%20HTTPS%20setting%20on%20Azure%20App%20Services.%3CBR%20%2F%3ETo%20learn%20more%20about%20Azure%20Policy%2C%20refer%20to%20the%20following%20documentation%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Foverview%3FWT.mc_id%3Dcharbelnemnom.com-blog-cnemnom%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Policy%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3286603%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Policy%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 18 2022 03:08 AM
Updated by: