简体   繁体   English

What is a difference "Protect API in Azure API Mgmt by OAuth 2.0 auth with AAD" vs secure API built with NET Core by the MS identity platform

[英]What is a difference "Protect API in Azure API Mgmt by OAuth 2.0 auth with AAD" vs secure API built with NET Core by the MS identity platform

I am reading microsoft documentation and using their apps / api to secure api using Azure AD.我正在阅读微软文档并使用他们的应用程序/api 使用 Azure AD 来保护 api。 But I got confused by two different approaches and as articles describe setting up the client app and Api.但是我对两种不同的方法感到困惑,并且文章描述了设置客户端应用程序和 Api。

  1. This article describe " Protect a web API backend in Azure API Management using OAuth 2.0 authorization with Azure Active Directory" This article describe " Protect a web API backend in Azure API Management using OAuth 2.0 authorization with Azure Active Directory"
    link: https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-protect-backend-with-aad链接: https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-protect-backend-with-aad

  2. I am following another tutorial and using built application for web app and api, this describe "How to secure a Web API built with ASP.NET Core using the Microsoft identity platform. This sample demonstrates a ASP.NET Core Web App calling a ASP.NET Core Web API that is secured using Azure AD". I am following another tutorial and using built application for web app and api, this describe "How to secure a Web API built with ASP.NET Core using the Microsoft identity platform. This sample demonstrates a ASP.NET Core Web App calling a ASP.NET Core Web API that is使用 Azure AD 保护”。

It further describe "1. The client ASP.NET Core Web App uses the Microsoft Authentication Library (MSAL) to sign-in and obtain a JWT [Access Tokens]. 2. The [Access Tokens] is used as a bearer token to authorize the user to call the ASP.NET Core Web API protected by Azure AD . It further describe "1. The client ASP.NET Core Web App uses the Microsoft Authentication Library (MSAL) to sign-in and obtain a JWT [Access Tokens]. 2. The [Access Tokens] is used as a bearer token to authorize the user调用 ASP.NET 内核 Web API 受Z3A580F142203677F3333 ADBC30898F6 保护

So I am confused are they two different things if so when to use 2nd option or first 1. Both deals with the Azure AD and claims to protect an api.所以我很困惑,如果使用第二个选项或第一个选项,它们是两个不同的东西。两者都处理 Azure AD 并声称保护 api。

The first article you're referring to uses Azure API management, where authentication is taken away from your API and completely configured in API management.您指的第一篇文章使用 Azure API 管理,其中身份验证从您的 API 中取出并完全在 API 管理中配置 This means you're adding an extra Azure resource type to your eco-system, most probably also adding costs.这意味着您正在向您的生态系统添加额外的 Azure 资源类型,很可能还会增加成本。

In this article, you'll learn how to configure your Azure API Management instance to protect an API, by using the OAuth 2.0 protocol with Azure Active Directory (Azure AD). In this article, you'll learn how to configure your Azure API Management instance to protect an API, by using the OAuth 2.0 protocol with Azure Active Directory (Azure AD).

Next tot this, API Management adds a lot of other functionality as well.接下来, API Management还添加了许多其他功能。

In the second article you learn how to implement authentication using Microsoft Identity Platform.在第二篇文章中,您将了解如何使用 Microsoft 身份平台实施身份验证。 This way you will not be adding Azure resource types, but you'll have to code the authentication yourself.这样您就不会添加 Azure 资源类型,但您必须自己编写身份验证代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用OAuth2.0和AAD进行Azure API管理? - Azure API Management with OAuth2.0 and AAD? 通过将 OAuth 2.0 与 Azure Active Directory 和 API 管理结合使用来保护 API - Protect an API by using OAuth 2.0 with Azure Active Directory and API Management 什么是最好的auth ASP.NET MVC REST API? OAuth 2.0还是OAuth 1.0? - What is best for auth ASP.NET MVC REST API? OAuth 2.0 or OAuth 1.0? 使用什么 OAuth2.0 流程来保护我的 Rest API? - What OAuth2.0 flow to use to secure my Rest API? 如何配置ASP.Net Core 2.0 API以使用Azure AD作为身份提供程序 - How to configure an ASP.Net Core 2.0 API to use Azure AD as Identity Provider azure oauth 2.0 how to protect web api from external organization web api? - azure oauth 2.0 how to protect web api from external organization web api? APIM 是否将相同的不记名令牌转发到后端 API? | OAuth 2.0 和 Azure AAD - Does APIM forward same bearer token to backend API? | OAuth 2.0 and Azure AAD 使用OAuth和API管理保护Azure逻辑 - Protect Azure logic using oauth and api management 我需要在单个 oAuth 2.0 令牌提供程序中配置客户端凭据和授权授予类型。 这是在 Azure 和 .NET 核心 API - I need to configure both Client Credential and Authorization grant type in single oAuth 2.0 token provider. this is in Azure and .NET core API Azure API管理oAuth 2.0安全性 - Azure API Management oAuth 2.0 Security
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM