Skip to Content
微软认证Azure开发工程师(AZ-204)考试指南
book

微软认证Azure开发工程师(AZ-204)考试指南

by Adora Nwodo
August 2025
Beginner to intermediate
360 pages
5h
Chinese
O'Reilly Media, Inc.
Content preview from 微软认证Azure开发工程师(AZ-204)考试指南

第 7 章 实施 Azure 安全性

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

安全 是构建和维护应用程序的一个非常重要的部分。确保系统安全是每个人的职责--企业、工程师甚至客户。在企业构建创新产品的同时,坏人也在不断创新黑客攻击的方法。安全就是要领先一步,保护你的数据、应用程序和系统免受这些威胁。

在本章中,我们将探讨 Azure 安全性的不同方面。我们将从身份和访问管理开始,其中包括 Microsoft Entra ID(前身为 Azure AD)和 RBAC 等工具,以确保只有正确的人才能访问您的资源。我们还将深入研究数据保护,包括加密方法和使用 Azure Key Vault 管理密钥和机密的安全方法。

接下来,我们将了解网络安全,你将学会如何使用防火墙、网络安全组和安全连接来保护数据在网络中的传输。在前面的章节中,我们已经介绍了其中的一些概念,在这里我们将对它们进行深入介绍。威胁防护将帮助您了解如何使用 Microsoft Defender for Cloud 实时检测和应对威胁。

我们还将讨论合规性和治理,确保您的系统符合法规要求和最佳实践。最后,我们将介绍安全最佳实践,您将看到保持系统安全的提示和建议。本章结束时,您将全面了解如何保护 Azure 环境的安全,以应对当今不断变化的威胁。

身份和访问管理

Azure 中的身份 和访问管理(IAM)就是要确保正确的人有正确的权限访问正确的资源。这是一个帮助控制谁能在 Azure 环境中做什么的框架,对于保护敏感数据和保持合规性非常重要。IAM 包括 Microsoft Entra ID 和 RBAC 等工具,用于管理身份和控制权限。它还包括多因素身份验证(MFA)和条件访问等功能,以进一步增强安全性。

基于角色的访问控制

通过 RBAC, ,你将为用户、组或服务委托人等身份分配特定角色,以管理对 Azure 中资源的访问。这是一种确保每个身份只拥有执行其工作所需的权限的方法,有助于最大限度地降低安全风险。RBAC 遵循 "最小特权 "原则,即根据用户需要执行的特定任务授予权限,而不是一揽子授予访问权限。在 Azure 中,角色定义了一组权限,这些角色被分配给定义范围内的身份,如订阅、资源组或单个资源。

Azure RBAC 提供了几种涵盖常见场景的内置角色:

所有者
对所有资源的完全访问权限,包括将访问权限委托给他人的能力
贡献者
可以 创建和管理资源,但不能授予他人访问权
读者
可以 查看资源,但不能进行更改
用户访问管理员
可以 管理对 Azure 资源的访问
基于角色的访问控制管理员
可以管理所有范围内的角色分配

除了这些通用角色外,还有跨 Azure 资源不同部分(如计算、存储、网络、数据库、容器等)的内置角色。此外,当内置角色无法满足特定要求时,Azure 还允许创建自定义角色。自定义角色可进行定制,只包含组织内特定任务或角色所需的权限。

范围决定了权限的适用范围,可以在管理组、订阅、资源组或资源级别进行设置。在订阅等更大范围内分配角色,意味着权限将向下继承到所有包含的资源。这种分级方法有助于在大型 Azure 环境中组织和管理访问。

使用 Azure CLI 创建自定义角色

创建 自定义角色可让你定义一组针对特定需求的权限。下面介绍如何使用 Azure CLI 创建自定义角色:

# Define the properties of the custom role
customRole='{ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
A Five-Step Guide to Improving Your Employer Brand

A Five-Step Guide to Improving Your Employer Brand

Kimberly A. Whitler, Richard Mosley
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9798341666177