Azure Security Fundamentals Part - 1: Identity, Roles and Network Security
π Azure Security Fundamentals
Security is the cornerstone of any cloud deployment, and in Azure, identity is at the core of everything. Whether it's human users or automated services, the way access is granted, managed, and audited directly impacts your organization's security posture.
π§ Why Identity Security Matters in Azure
Azure uses Azure Active Directory (Azure AD) as its identity provider. Every resource, user, or service principal must authenticate through Azure AD before accessing services.
Key principles:
- Every user must be authenticated.
- You must enforce strong authentication mechanisms to prevent impersonation.
- Misconfigured identity systems are a major attack vector.
π Conditional Access & Multi Factor Authentication (MFA)
What is Conditional Access?
Conditional Access lets you define policies that determine whether users can access applications or data based on conditions like:
- Device compliance
- User location
- Risk level
- Session context
What is MFA?
Multi Factor Authentication requires users to provide two or more authentication factors, such as:
- Password + text message
- Password + biometric
- One-time password + security key
These are critical in protecting against phishing and password spray attacks.
π‘ Note: Conditional Access and full MFA support require Azure AD Premium P1 or P2 licenses.
π° Azure AD Licensing: What You Get
| Feature | Free | Premium P1 | Premium P2 |
|---|---|---|---|
| MFA (Security Defaults) | β | β | β |
| Conditional Access | β | β | β |
| SLA | β | 99.99% | 99.99% |
| Reports | Basic | Full | Full |
| Access Reviews | β | β | β |
| Just in Time Access | β | β | β |
Learn more on Microsoftβs official docs.
π€ Understanding Azure AD vs Azure Roles
Azure uses two different role models, and confusing them can cause serious issues.
Azure AD Roles
These define what users can do in Azure AD itself, not in the Azure resources.
| Task | Role |
|---|---|
| Create App Registration | Application Developer |
| Add user/group | User Administrator |
| Change payment method | Billing Administrator |
| Full control over tenant | Global Administrator |
β οΈ Warning: The Global Administrator has unrestricted access. Assign sparingly!
Read the full list of Azure AD built in roles.
Azure Roles (RBAC)
Azure RBAC (Role Based Access Control) defines what users can do with Azure resources.
| Role | Capabilities |
|---|---|
| Owner | Full control, including managing access |
| Contributor | Full control, except managing access |
| Reader | Read only access |
You can also use custom roles or 70+ built in roles like:
- Virtual Machine Contributor
- CDN Endpoint Reader
- Azure Relay Owner
β Learn more about Azure RBAC roles.
β Best Practices for Azure Security
-
Use Least Privilege
Only grant the minimal necessary access. Avoid blanket Contributor or Owner roles. -
Audit Role Assignments
Use Access Reviews (P2) and audit logs to validate and clean up unused roles. -
Protect Global Admin Accounts
Enable MFA, and restrict to a small number of trusted users. -
Apply Conditional Access Policies
Block access from risky locations, enforce compliant devices, and require MFA where needed. -
Enable Defender for Identity
Azure Defender can detect suspicious sign ins, lateral movement, and privilege escalation attempts. -
Use Privileged Identity Management (PIM)
Grant elevated access just in time to reduce attack surface.
π Azure Network Security: Architecture, NSGs, and Private Link
Securing the network layer in Azure is just as important as managing identities and access. While Azure offers flexibility and scalability, it also requires intentional design and controls to prevent breaches.
This guide explores:
- Hub and Spoke network architecture
- Network Security Groups (NSGs)
- Azure Private Link
π§ Hub and Spoke Architecture
A foundational design for secure cloud networks.
β What is it?
In this model:
- Hub VNet acts as the central gateway (with firewalls, WAFs, etc.)
- Spoke VNets are isolated per app, environment, or workload
- All traffic funnels through the hub, which is tightly controlled
π Why Use It?
- Minimizes open ingress points
- Centralizes security policies and logging
- Enables secure VNet peering between services
- Scales easily across environments (Dev, Test, Prod)
π§± Network Security Groups (NSGs)
NSGs are lightweight packet filters attached to subnets or NICs (network interfaces) to control traffic flow.
π‘οΈ What They Do
- Control inbound/outbound traffic at subnet or NIC level
- Define security rules based on:
- Source IP
- Destination IP
- Source/Destination Ports
- Protocol (TCP/UDP)
βοΈ Rule Priority
- Rules are numbered
- lower numbers = higher priority
- Rules can Allow or Deny
- Defaults include broad deny rules, which you override as needed
π§ Example
Allow TCP 22 from 10.0.0.0/24 to 10.1.0.4 priority 100
Deny All priority 65500
β οΈ Important: Newly created VMs may come with open RDP/SSH secure these IMMEDIATELY.
π Azure Private Link
Managed services (like SQL, Storage, etc.) often expose public endpoints by default. Private Link changes that.
π« Problem
By default
- Azure SQL / Storage is accessible over the public internet (even if firewall restricted)
β Solution: Private Link
Private Link enables
- Extension of a managed service into your VNet
- Use of a private IP address (called a Private Endpoint)
- Internal only traffic (never leaves Azure backbone)
- Full elimination of public exposure
π οΈ How it Works
- Create a Private Endpoint
- Configure the target resource to allow private access
- Azure sets up a private DNS zone (or configure manually)
- VM uses private IP for communication
π¦ Supported Services
Private Link is supported by a wide range of services, including
- Databases: SQL, PostgreSQL, MySQL, CosmosDB
- Storage: Blob, Files, ACR
- Apps: App Service, Functions, Web Apps
- Messaging: Event Hub, Service Bus, Relay
- Security: Key Vault, Azure Monitor, Automation
β Learn more about Private Link.
π Comparison: With vs. Without Private Link
β Without Private Link
- VM βΆ Azure SQL (via public IP)
- β Public exposure, even if IPs are firewalled
β With Private link
- VM βΆ Azure SQL (via Private Endpoint)
- β Traffic stays within the VNet
- β Can extend securely to on-prem via VPN
β Network Security Best Practices
- Use Hub and Spoke architecture for scalable, secure network design.
- Apply NSGs to subnets and VM NICs to tightly control traffic.
- Audit NSG rules regularly especially default SSH/RDP rules.
- Use Private Link to eliminate public exposure of sensitive services.
- Block all by default and allow explicitly the principle of least privilege.
- Combine with Azure Firewall or 3rd party NGFWs for advanced inspection and control.