Implement Azure Security Flashcards

1
Q

What are the components of the microsoft identity platform?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When you register an app in the azure portal, what are your options for integrating with Azure Active Directory?

A
  • Single Tenant - Accessible in your tenant

* Multi-Tenant - Accessible in other tenants

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an application object?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a service principal object?

A

Allows access to resources secured by Azure Active Directory tenant. They are managed security principals for both users and applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What type of service principals are there?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the key features of OAuth 2.0

A
  • 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the permission types you can have?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are consent types?

A

When you have applications in MIP that need to gain access to necessary resources or APIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What consent types are there?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does a typical OpenId Connect or OAuth 2.0 app permission request look like?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does conditional access allow you to do?

A
  • Add multifactor authentication
  • Allowing only Intune enrolled devices
  • Restricting user locations and IP ranges
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the name of the library that gives secure access to Microsoft Graph, Microsoft APIs, Web APIs, or even your own APIs?

A

Microsoft Authentication Library (MSAL)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What types of applications are security tokens required for? How can they be grouped? What are the differences between the groups?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the recommended way to instantiate an application with MSAL.NET

A

PublicClientApplicationBuilder
ConfidentialClientApplicationBuilder

Ex.

IPublicClientApplication app = PublicClientApplicationBuilder.Create(clientId).Build();

A number of .With methods are available such as:
* WithAuthority, .WithRedirectUri, .WithClientId, .WithComponent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What package is used to access the microsoft identity platform in C#

A

Microsoft.Identity.Client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a Shared Access Signature (SAS)?

A

It is a uri that grants restricted access rights to Azure Storage resources. It includes a token that contains a special set of query parmeters.

17
Q

What types of shared access signatures are there?

A
  • User delegation - Secured with Azure Active Directory credentials and also by the permissions specified for the SAS. Only for Blob Storage
  • Service SAS - Secured with the storage account key. Works for Blob storage, Queue storage, Table storage, or Azure files
  • Secured with a storage account key. Can access one or more storage services
18
Q

What are the components of an SAS token?

A

sp=r - Control the access rights (a,c,d,l,r,w)
st= DATETIME - Control when access starts
se= DATETIME - The date and time when access ends
sv=2020-10-20 - The version of the storage API to use
sr=b - The kind of storage being accessed
sig=ersadf - The cryptographic signature

19
Q

What is a stored access policy?

A

A stored access policy provides an additional level of control over service-level SAS on the server side.

20
Q

What is microsoft graph?

A

Offers a single API endpoint to all the data and intelligence in Microsoft 365

21
Q

What are the components of a REST API call to microsoft graph?

A

{HTTP method} https://graph.microsoft.com/{version}/{resource}?{query-parameters}

22
Q

What is Azure Key Vault?

A

A cloud service for securely storing and accessing secrets. Anything form passwords, certificates, or keys.

23
Q

What are managed identities?

A

Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory authentication.

24
Q

What are the types of managed identities? What are the differences?

A
  • System-assigned managed identity - Enabled directly on an Azure service instance. Azure creates an identity for the instance, credentials are provisioned, and the lifecycle is tied to the Azure service.
  • User assigned managed identity - Created as a standalone azure resource. User must manage it’s lifecycle, and it can be assigned to one or more Azure services.
25
Q

How can you enable system-assigned managed identities with bash?

A

az vm (or other) create

    • assign-identity
    • admin-username
    • admin-password
    • scope Subscription

You can assign with
az vm identity assign -g myResourceGroup - n myVm

26
Q

How can you acquire an access token with managed identities?

A
  1. Send an HTTP REST call to the service locally - retrieves the token based on the service principle and will then allow access with that token to services allowed by that managed identity.