AZ‐500 Microsoft Azure Security Technologies Study Guide_19 - itnett/FTD02H-N GitHub Wiki

🎧 The Untamed and Sufficiently Thorough AZ-500 Audiobook: Book 2 🎧


Welcome back to Book 2 of the Untamed and Sufficiently Thorough AZ-500 Audiobook! If you’ve already made it through Book 1, congratulations! You’ve covered a ton of ground, and now we’re ready to continue the journey.

In Book 2, we’ll start with a short summary of where we left off in Book 1 and then dive into new concepts, advanced topics, and some real-world scenarios that will make you even more confident when facing the AZ-500 exam. Ready? Let’s pick up right where we left off!


🎧 Summary of Book 1: Building the Foundation

In Book 1, we set the foundation by covering:

  1. Azure Active Directory (Azure AD): We explored identity management, roles, and RBAC (Role-Based Access Control), which allows you to define who has access to what in your Azure environment.
  2. Conditional Access and MFA: We dove deep into Conditional Access Policies and Multi-Factor Authentication (MFA), learning how to enforce extra security layers based on user location, device compliance, and risk.
  3. Azure Key Vault: We learned how to secure secrets, keys, and certificates using Key Vault. We also covered Soft Delete, Purge Protection, and Managed Identities.
  4. Network Security: We discussed how to protect your network using Network Security Groups (NSGs) and Azure Firewall to control traffic flow and block unwanted access.
  5. Security Monitoring: Finally, we explored Azure Security Center for monitoring your security posture and Azure Sentinel for advanced threat detection and response automation.

As we move forward in Book 2, we’ll build on this foundation by covering more advanced topics, including automation, DevOps security, and governance. We’ll also connect these concepts to how they are applied in real-world scenarios and tested on the exam. Let’s get started!


🎧 Chapter 6: Automating Security with Azure Automation and DevOps Integration

In Book 1, we touched on the idea of automation—automating routine tasks to improve security and reduce manual effort. Now, let’s expand on that idea with Azure Automation and DevOps security integration.

🤖 Azure Automation: Automating Repetitive Tasks

Azure Automation allows you to automate tasks like patching, compliance checks, and VM configuration. Think about it: if you had to manually update security patches for hundreds of VMs, it would take forever, right? With Azure Automation, you can create runbooks that handle these tasks for you.

  • A runbook is like a script that automates a series of actions. You can create runbooks in PowerShell or Python and schedule them to run at certain times or trigger them based on specific events.

Example: Automatically Patching VMs

Let’s say you want to automate the patching of all your VMs to ensure they are always up to date with the latest security fixes. You can create a runbook in Azure Automation that:

  1. Checks for available patches.
  2. Installs the patches.
  3. Reboots the VMs, if necessary.

Now, remember how we talked about Just-in-Time (JIT) VM Access in Book 1? You could even automate the process of enabling JIT access before patching, and then locking down the VM once the patch is applied. Automation is all about taking manual, repetitive tasks and letting Azure handle them for you.


🔧 Integrating Security into Azure DevOps Pipelines

Now, let’s talk about DevOps security integration. DevOps is all about CI/CD pipelines (Continuous Integration/Continuous Deployment), which means code is constantly being developed, tested, and deployed. But here’s the kicker: Security needs to be baked into every stage of the pipeline.

Remember how earlier we learned about RBAC, Key Vault, and NSGs? Well, in a DevOps environment, we need to make sure that:

  1. Developers can’t deploy insecure code or configurations.
  2. All sensitive secrets (like API keys) are stored securely in Key Vault.
  3. The applications being deployed are scanned for vulnerabilities before going live.

Practical Application: Integrating Security Scans in the CI/CD Pipeline

Let’s say you have a pipeline that automatically deploys a web application to Azure App Service. Here’s how you can integrate security into this pipeline:

  1. Security Scanning: Use tools like SonarCloud or WhiteSource to scan your code for vulnerabilities before it’s deployed. This ensures that no insecure code gets pushed into production.
  2. Secret Management: Use Azure Key Vault to store API keys, connection strings, and other sensitive data that your app needs. Managed Identities can be used to access these secrets securely, without hardcoding credentials into your app.
  3. Infrastructure as Code: Use tools like Terraform or ARM templates to define your infrastructure in code. This ensures that your network security (e.g., NSGs, firewalls) is automatically configured during deployment.

Pulling the thread: Think back to Conditional Access and Key Vault—both of these security controls are just as important in a DevOps pipeline as they are in general administration. When you automate deployment processes, you need to make sure every step follows best security practices.


🤔 Exam Focus: Automating Security and DevOps Pipelines

You might see questions like:

  • “You need to automate the patching of VMs and ensure that patches are applied in a secure manner. What should you use?”

The answer would be to use Azure Automation with runbooks to handle patching, combined with JIT access to limit exposure during the process.

Or:

  • “How do you ensure that sensitive information like API keys are securely used in a DevOps pipeline?”

The answer is to store those keys in Azure Key Vault and access them securely using Managed Identities.


🎧 Chapter 7: Governance with Azure Policy and Blueprints

As we move forward, we’re now entering the domain of governance. This is a big one. Governance isn’t just about securing individual resources—it’s about ensuring that your entire environment is operating according to the policies, regulations, and standards you’ve set.

📜 Azure Policy: Enforcing Compliance Across Resources

Azure Policy is your tool for ensuring that all resources in Azure are compliant with organizational standards. If you think back to our earlier discussions about RBAC and Conditional Access, those controlled who can do what and how. Azure Policy, on the other hand, controls what can or cannot be deployed in the first place.

For example, let’s say you want to ensure that no public-facing VMs are created in your environment. You would use Azure Policy to deny the creation of VMs that don’t meet your criteria. Or, you could set a policy that audits resources to ensure they have encryption enabled.

Real-World Example: Denying Non-Compliant Resources

Imagine you work in a highly regulated industry, and you need to make sure that all VMs are encrypted. You can create a policy definition that audits all VMs in your subscription and flags any that don’t have encryption enabled.

But that’s not all. You can also create a “Deny” policy that prevents users from creating unencrypted VMs in the first place. Now, when someone tries to create a non-compliant resource, they’ll get an error message.


🏗️ Azure Blueprints: Scaling Governance Across Subscriptions

Think of Azure Blueprints as a way to bundle multiple governance components—like policies, role assignments, and ARM templates—and deploy them across multiple subscriptions.

Let’s say you have multiple teams working in different Azure subscriptions, and you want to ensure that they all follow the same governance model. You could create a blueprint that includes:

  • Policies (e.g., VMs must be encrypted, public IPs are not allowed).
  • Role Assignments (e.g., who can manage resources in those subscriptions).
  • Resource Configurations (e.g., setting up NSGs or storage accounts).

Once your blueprint is set, you can assign it to different subscriptions, ensuring that all teams are compliant with your governance standards.


🔄 Revisiting Policies and Governance from Book 1

Do you remember when we talked about RBAC and how it controls what actions users can perform? Well, Azure Policy takes it a step further by controlling what resources can be created and ensuring those resources are compliant. RBAC and Azure Policy are like two sides of the same coin: