Introduction
Using Service Principals
Authentication with a client secret which is similar to a password for a user.
Authentication with a certificate (recommended by Microsoft) : Considered more secure than a client secret, an app can also authenticate with a certificate.
Authorization with RBAC works similar to user accounts, leveraging RBAC (role-based access control).
Using Managed Identities
It’s similar to service principals. We want the platform to manage for us the process of authentication (Microsoft is taking care of that client secret / certificate type of data). So, we can move the app into a resource group in Azure and the platform AUTH will tkae care of that. Andm, we don’t have to keep this info in code.
Features of Managed Identities
Azure AD Identities for Azure Resources : Platform manages integrated identities in Azure AD identities for Azure resources.
Credential Security : Avoid the need for having to store credentials for your app/script within code.
Support for several Azure Resouces : Many services support it (Azure Function, Azure App Service, etc.)
Key Components
An Azure Resource must be assigned a system or user-managed identity
The managed identity established a service principal within Azure
Token endpoint : Azure Ad provides a token endpoint as a place to retrieve an access pass for a resource
The access token can be used to authenticate with Azure AD
For system assigned, that means it directly tied to a resource. If we delete the resource, we delete ID.
API Security & OAuth 2.0
Microsoft ARM API
Microsoft Graph API
It’s a gateway to volumes of information stored across Microsoft 365 services. This inlcudes data from Microsoft 365, Windows 10, Enterprise Mobility + Security.
Proctecting Resource Permissions
In accordance with OAuth 2.0 Standard, access to resource can be controlled granularly through the use of resource permissions or scope.
OAuth 2.0 Authentication Flow
Delegated permissions and consent
Azure Key Vault
When securing apps, we often have to store secret info that an app needs to access programmatically via a REST endpoint.