Implement Azure Security Flashcards
What are the components of the microsoft identity platform?
- OAuth 2.0 and OpenID connect for standard authentication service
- Open source libraries (MSAL) - support for other libraries
- Application Management portal - Registration and configuration experience in the Azure portal
- Application configuration API and Powershell
When you register an app in the azure portal, what are your options for integrating with Azure Active Directory?
- Single Tenant - Accessible in your tenant
* Multi-Tenant - Accessible in other tenants
What is an application object?
The unique identifier for an application that is defined in Azure Active Directory. It is used as a template to create one or more service principal objects.
What is a service principal object?
Allows access to resources secured by Azure Active Directory tenant. They are managed security principals for both users and applications.
What type of service principals are there?
- Application - local representation of a global application in a single tenant or directory.
- Managed Identity - A way for services to access a resources within things like azure key vault.
- Legacy
Explain the key features of OAuth 2.0
- An autherization server - also called identity provider or IdP, handles the end-user’s information.
- Client - the requesting application
- Resource owner - The application user, or end-user
- Resource server - The resource server hosts or provides access.
Common endpoints:
#Authorization
https://login.microsoftonline.com/issuer/oauth2/v2.0/authorize
#Token endpoint
https://login.microsoftonline.com/issuer/oauth2/v2.0/token
Permissions are set by the “scope” parameter.
https://graph.microsoft.com/Calendars.Read
What are the permission types you can have?
Delegated permissions - used by apps that have a signed-in user present
Application permissions - Used by apps that run without a signed-in user present - such as a daemon
What are consent types?
When you have applications in MIP that need to gain access to necessary resources or APIs.
What consent types are there?
- Static user consent - Specify all the permissions it needs in the app’s configuration in the Azure portal - This can be challenging due to needing to know all of the resources ahead of time.
- Incremental and dynamic user consent - Ask for a minimum set of permissions upfront and request more over time as the customer uses additional app features.
- This can be done with teh scope parameter when requesting an access token.
- Admin consent - when app needs access to certain high-privilege permissions.
What does a typical OpenId Connect or OAuth 2.0 app permission request look like?
GET https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
&response_type=code
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
&response_mode=query
&scope=
https%3A%2F%2Fgraph.microsoft.com%2Fcalendars.read%20
https%3A%2F%2Fgraph.microsoft.com%2Fmail.send
&state=12345
What does conditional access allow you to do?
- Add multifactor authentication
- Allowing only Intune enrolled devices
- Restricting user locations and IP ranges
What is the name of the library that gives secure access to Microsoft Graph, Microsoft APIs, Web APIs, or even your own APIs?
Microsoft Authentication Library (MSAL)
What types of applications are security tokens required for? How can they be grouped? What are the differences between the groups?
Security tokens can be acquired by multiple types of applications.
Public client applications - Web facing applications. typically support only public client flows, they can’t hold configuration-time secrets, or client secrets
Confidential client applications - Apps that run on servers. Considered difficult to access, so can hold confidential clients.
What are the recommended way to instantiate an application with MSAL.NET
PublicClientApplicationBuilder
ConfidentialClientApplicationBuilder
Ex.
IPublicClientApplication app = PublicClientApplicationBuilder.Create(clientId).Build();
A number of .With methods are available such as:
* WithAuthority, .WithRedirectUri, .WithClientId, .WithComponent
What package is used to access the microsoft identity platform in C#
Microsoft.Identity.Client