Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Azure Administration

You're reading from   Learn Azure Administration Solve your cloud administration issues relating to networking, storage, and identity management speedily and efficiently

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838551452
Length 452 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Kamil Mrzygłód Kamil Mrzygłód
Author Profile Icon Kamil Mrzygłód
Kamil Mrzygłód
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: Understanding the Basics
2. Getting Started with Azure Subscriptions FREE CHAPTER 3. Managing Azure Resources 4. Configuring and Managing Virtual Networks 5. Section 2: Identity and Access Management
6. Identity Management 7. Access Management 8. Managing Virtual Machines 9. Section 3: Advanced Topics
10. Advanced Networking 11. Implementing Storage and Backup 12. High Availability and Disaster Recovery Scenarios 13. Automating Administration in Azure 14. Other Books You May Enjoy

Examples of Azure policies

To give you a better understanding of the topic, we can take a look at various examples of policies you may use. There are many different kinds of available policies—let's try to describe the most interesting ones:

  • Audit CORS resource access restrictions for a function app: When using Azure Functions, you may want to force developers to assign proper Cross-Origin Resource Sharing (CORS) configuration to function apps, so they are not accessible from all domains. A very simple and helpful policy that addresses a common security issue when hosting web applications.
  • Audit resource location matches resource group location: To avoid confusion, you can ensure that resource groups and their resources are always provisioned in the same location.
  • Audit unrestricted network access to storage accounts: If your storage accounts should not be available from the internet, you can enforce their owners to configure network rules so they are only accessible from configured networks.
  • Not allowed resource types: Sometimes, your organization just cannot deploy some of the resources (for example, you need to audit the whole code base, so you cannot use Azure Functions). This policy is something you want when forbidding the use of a particular resource is essential.

When you assign any of the policies, it will immediately start to watch for your resources and check whether they are compliant with that policy.

Some of the policies require you to set some parameters before they can be added. Carefully check the Parameters section to configure them exactly as you want.

Of course, the error displayed previously (see Figure 1.13) is in fact returned by an API powering Azure resources. That means that it will be returned also for other operations (such as using the command line or PowerShell).

The policy I described previously was executed during the creation of a resource, but of course, it also works for the resources created previously. Subscription policies are really powerful tools for an Azure administrator, allowing for setting strong fundamentals for further management activities such as automation and building an organization-wide mindset of what is allowed and what is not. The more resources your subscription has, the more difficult it is to manage and keep everything up to the defined rules. This is especially true for all companies for which compliance is crucial to work effectively—if you have thousands of VMs, app services, and storage accounts, you just cannot rely only on telling everyone that this one particular feature isn't allowed. For those scenarios, use properly set up policies, which can cover many different scenarios, especially if you create a custom one.

Check out the next section to learn more about ensuring proper policies are assigned to Azure resources using Azure Blueprints.

You have been reading a chapter from
Learn Azure Administration
Published in: Sep 2020
Publisher: Packt
ISBN-13: 9781838551452
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image