Last active
August 26, 2022 13:20
-
-
Save astaykov/17667554524de59f5f8eaca90cb4a2a5 to your computer and use it in GitHub Desktop.
Update all web apps to TLS 1.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# first disable HTTP and force HTTPS only | |
az webapp list --query "[].id" --output tsv | az webapp update --https-only true --ids @- | |
# then force min-tls version | |
az webapp list --query "[].id" --output tsv | az webapp config set --min-tls-version '1.2' --ids @- | |
# then force FTPS in general. | |
# depending on your process, you might want to enforce FTPS (FtpsOnly) insted of completely disable it (Disabled). | |
az webapp list --query "[].id" --output tsv | az webapp config set --ftps-state FtpsOnly --ids @- | |
# configure app setting. | |
# for all apps in a RG. | |
az webapp list -g rg-name --query "[].id" --output tsv | az webapp config appsettings set --settings AzureAdB2C__Domain="tenant_id" --ids @- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment