Explore authentication and authorization in App Service Flashcards

1
Q

Why use the built-in authentication?

A

Azure App Service allows you to integrate various auth capabilities into your web app or API without implementing them yourself.

It’s built directly into the platform and doesn’t require any particular language, SDK, security expertise, or code.

You can integrate with multiple login providers. For example, Microsoft Entra ID, Facebook, Google, Twitter.

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

Identity providers

A

Microsoft identity platform
Facebook
Google
Twitter
Any OpenID Connect provider
GitHub

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

How identity providers works?

A

Authenticates users and clients with the specified identity provider(s)

Validates, stores, and refreshes OAuth tokens issued by the configured identity provider(s)

Manages the authenticated session

Injects identity information into HTTP request headers

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

How can be Identity provider configured?

A

Can be configured using Azure Resource Manager settings or using a configuration file.

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

Authentication flow: Without provider SDK

A

The application delegates federated sign-in to App Service. This is typically the case with browser apps, which can present the provider’s login page to the user. The server code manages the sign-in process, so it’s also called server-directed flow or server flow.

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

Authentication flow: With provider SDK

A

The application signs users in to the provider manually and then submits the authentication token to App Service for validation. This is typically the case with browser-less apps, which can’t present the provider’s sign-in page to the user. The application code manages the sign-in process, so it’s also called client-directed flow or client flow. This applies to REST APIs, Azure Functions, JavaScript browser clients, and native mobile apps that sign users in using the provider’s SDK.

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

Authentication flow: Without provider SDK

A

Sign user in Redirects client to /.auth/login/<provider>.</provider>

Post-authentication Provider redirects client to /.auth/login/<provider>/callback.</provider>

Establish authenticated session App Service adds authenticated cookie to response.

Serve authenticated content Client includes authentication cookie in subsequent requests (automatically handled by browser).

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

Authentication flow: With provider SDK

A

Sign user in Client code signs user in directly with provider’s SDK and receives an authentication token. For information, see the provider’s documentation.

Post-authentication Client code posts token from provider to /.auth/login/<provider> for validation.</provider>

Establish authenticated session App Service returns its own authentication token to client code.

Serve authenticated content Client code presents authentication token in X-ZUMO-AUTH header (automatically handled by Mobile Apps client SDKs).

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

Authorization behavior

A

Allow unauthenticated requests

Require authentication: This option rejects any unauthenticated traffic to your application. This rejection can be a redirect action to one of the configured identity providers. In these cases, a browser client is redirected to /.auth/login/<provider> for the provider you choose. If the anonymous request comes from a native mobile app, the returned response is an HTTP 401 Unauthorized. You can also configure the rejection to be an HTTP 401 Unauthorized or HTTP 403 Forbidden for all requests.</provider>

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

Token store

A

App Service provides a built-in token store, which is a repository of tokens that are associated with the users of your web apps, APIs, or native mobile apps. When you enable authentication with any provider, this token store is immediately available to your app.

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

Logging and tracing

A

If you enable application logging, authentication and authorization traces are collected directly in your log files. If you see an authentication error that you didn’t expect, you can conveniently find all the details by looking in your existing application logs.

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