Azure Security Flashcards
What are the components of the Microsoft identity platform?
- OAuth 2.0 and OpenID Connect standard-compliant authentication service
- Open-source libraries (Microsoft Authentication Libraries (MSAL)
- Application management portal
- Application configuration API and PowerShell
What are the 3 types of service principals?
- Managed identity
- Application
- Legacy
How do service principals relate to application objects?
The application object is the global representation of your application for use across all tenants, and the service principal is the local representation for use in a specific tenant.
The application object serves as the template from which common and default properties are derived for use in creating corresponding service principal objects.
Service principal must be created in each tenant where the app is used to enable it to establish an identity for sign-in and/or access to resources being secured by the tenant.
How does conditional access impacts your application?
Most cases doesn’t change an app’s behaviour or changes from developer.
Scenarious that require code to handle Conditional Access:
1. Apps performing the on-behalf-of flow
2. Apps accessing multiple services/resources
3. Single-page apps using MSAL.js
4. Web apps calling a resource
What does the Microsoft identity platform help you with?
build apps your users/customers can sign in using their Microsoft identities or social accounts, and provide authorized access to your own APIs or Microsoft APIs like Microsoft Graph
What’s OAuth 2.0 and OpenID Connect standard-compliant authentication service?
enable developers to authenticate several identity types including:
1. Work or school accounts, provisioned through Microsoft Entra ID
2. Personal Microsoft account, like Skype, Xbox, and Outlook.com
3. Social or local accounts, by using Azure Active Directory B2C
What’s Application management portal?
A registration and configuration experience in the Azure portal, along with the other Azure management capabilities.
What’s Application configuration API and PowerShell?
Programmatic configuration of your applications through the Microsoft Graph API and PowerShell so you can automate your DevOps tasks.
When you register ur app with Microsoft Entra ID, what are the two tenant form you can use?
- Single tenant: only accessible in your tenant (group of users wth common access)
- Multi-tenant accessible in other tenants
What do you need to access resource secured by a Microsoft Entra tenant?
security principal
for a user its called user principal.
for an application its called service principal
What does the security principal define?
the access policy and permissions for the user/app in the Microsoft Entra tenant.
What’s the Application service principal?
it’s the local representation/ application instance of a global application object in a single tenant/directory.
What’s Managed identity service principal?
This service principal is used to represent a managed identity.
What’s Legacy service principal?
this represents a legacy app (app created before app registrations were introduced or an app created through legacy experiences.
This service principal can have:
credentials, service principal names, reply URLs, and other properties that an authorized user can edit, but doesn’t have an associated app registration.
What relationship does application object have?
- A one to one relationship with the software application
- A one to many relationship with its corresponding service principal object(s).
What are the two types of permissions the Microsoft identity platform support?
- Delegated permissions
- App- only access permissions
What are Delegated persmission used for?
are used by apps that have a signed-in user present. For these apps, either the user or an administrator consents to the permissions that the app requests. The app is delegated with the permission to act as a signed-in user when it makes calls to the target resource.
What are App-only access permissions used for?
are used by apps that run without a signed-in user present, eg. apps that run as background services or daemons. Only an admin can consent to app-only access permissions.
What are the 3 types of consent?
- Static user consent
- Incremental and dynamical user consent
- Admin consent
What’s static user consent?
In static user consent scenario, you must specify all the permissions it needs in the app’s config in the Azure portal.
What’s incremental and dynamic user consent?
you can ignore the static permissions defined in the app registraion info in Azure portal, and request permissions incrementally with Microsoft identity platform endpoint.
These consents only apply to delegated permissions and not app-only access permissions.
What are the possible issues with static permissions (static user consent) for developers?
- App needs to request all the permissions it would ever need upon the user’s first sign-in -> can lead to a long list of permissions that discourages end users from approving the app’s access on initial sign-in.
- App needs to know all the resources it would ever access ahead of time. It’s difficult to create apps that could access an arbitrary number of resources.
What’s Admin consent?
This consent is required when ur app need access to certain hight-privilege permissions.
Admin consent done on behalf of an organization still requires the static permissions registered for the app.
What’s the Conditional Access?
a feature in Microsoft Entra ID.
Offers one of several ways to secure an app and protect a service.
Include
1. Multifactor authentication
2. Allowing only Intune enrolled devices access specific services
3. Restricting user locations and IP ranges
Conditional Access example
You’re building a single-tenant iOS app and apply a Conditional Access policy. The app signs in a user and doesn’t request access to an API. When the user signs in, the policy is automatically invoked and the user needs to perform multifactor authentication.
You’re building an app that uses a middle tier service to access a downstream API. An enterprise customer at the company using this app applies a policy to the downstream API. When an end user signs in, the app requests access to the middle tier and sends the token. The middle tier performs on-behalf-of flow to request access to the downstream API. At this point, a claims “challenge” is presented to the middle tier. The middle tier sends the challenge back to the app, which needs to comply with the Conditional Access policy.
What’s the benefit of using Azure Key Vault?
- Centralized application secrets
- Securely store secrets and keys
- Monitor access and use
- Simplified administration of application secrets
How do you authenticate to Azure Key Vault?
3 ways
1. Managed identities for Azure resources: when deploy app on VM in Azure, you can assign an identity to the VM that has access to Key Vault. Benefit: app/service isn’t managing the rotation of the first secret. Best practise.
- Service principal and certificate: use service principal and associated certificate that has access to Key Vault. Not recommended cause app owner/developer must rotate the certificate.
- Service principal and secret: Don’t recommend cause hard to automatically rotate the bootstrap secret that’s used to authenticate to Key Vault.
What two type of containers does the Azure Key Vault support?
- Vaults
- Managed hardware security module (HSM) pools