久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

使用 MSAL 和 Angular 為什么需要兩個單獨的 AAD 應用

Using MSAL and Angular why would one need two separate AAD app registrations?(使用 MSAL 和 Angular 為什么需要兩個單獨的 AAD 應用注冊?)
本文介紹了使用 MSAL 和 Angular 為什么需要兩個單獨的 AAD 應用注冊?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups/tree/master/chapter1

我已經能夠成功地使用此示例代碼來進行 AAD 應用注冊.我很困惑為什么我們需要兩個單獨的應用程序注冊,一個用于前端,一個用于 API.我可以將其設置為使用一個應用程序嗎?如果是這樣,這種設置有什么缺點嗎?

I've been able to successfully use this example code to play with AAD app registrations. I'm confused as to why we need two separate app registrations, one for the front end, and one for the API. Could I just set this up to use one app? If so, is there a drawback to this setup?

謝謝

推薦答案

如果您愿意,可以這樣做,但一般不建議這樣做.原因有很多,但這里有一個簡單的示例:當授予應用程序權限時(通過應用程序權限或委托權限),您應該遵循最小權限原則";即只給應用程序足夠的權限,而不是更多.客戶端應用程序和 Web API 很可能需要不同的范圍/權限來完成他們需要做的工作,但使用相同的應用程序注冊意味著您將無法分離每個所需的范圍.

You can do that if you wish so, but in general it is not recommended. There are a number of reasons why, but here's a quick example: when granting permissions to an application (either via app permissions or delegated permissions), you should follow the "principle of least privilege" i.e. give just enough permissions to an application and not more. It is quite possible that a client app and a web API will require different scopes/permissions to do the work they need to do, but using the same app registration means that you won't be able to separate the scopes required for each.

類似的情況是您更關心 Web API 的保護而不是客戶端應用程序的保護.假設您為 Web API 使用證書,但對于您的客戶端應用程序只有一個客戶端密碼.同樣,在這種情況下,擁有單獨的應用注冊將允許您根據其安全需求自定義每個應用.

A similar case would be where you care more about the protection of your web API than your client app. Say, you use certificates for your web API but only a client secret would do for your client app. Again, in that case, having separate app registrations would allow you to customize each according to their security needs.

最后但同樣重要的是,假設您有多個客戶端應用程序(SPA、移動設備、桌面應用程序等)和一個 Web API,所有這些都在同一個應用程序注冊中.對于您的業務邏輯,也許您需要能夠區分請求來自哪個客戶端應用程序.盡管有多種方法可以通過單個應用注冊來實現這一點,但單獨注冊會更加輕松.

Last but not least, say you have multiple client apps (a SPA, a mobile, a desktop app etc.), and a single web API, all in the same app registration. For your business logic, perhaps you need to be able to distinguish from which client app the request comes from. Although there are ways to achieve this with a single app registration, again it is much more hassle free to have separate registrations.

這篇關于使用 MSAL 和 Angular 為什么需要兩個單獨的 AAD 應用注冊?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: www.久草.com| 黄色国产精品 | 97久久久久 | 婷婷激情综合 | 四虎永久在线视频 | 8090理论片午夜理伦片 | 国产一区二区三区在线观看视频 | 欧美性生交xxxxx | 婷婷色综合| 在线播放成人 | 久久久精品在线 | 国产精品久久久久久无人区 | 午夜免费福利视频 | 日韩精品一区在线观看 | 亚洲免费成人 | 韩日欧美| 欧美日韩亚洲国产 | 午夜激情网 | 亚洲视频中文字幕 | 四虎精品视频 | 青青草免费在线观看 | 美女91网站 | 亚洲成人av | 久久亚洲一区二区 | 日韩欧美在线观看视频 | 国产精品毛片va一区二区三区 | 成人免费动漫 | 亚洲 欧美 日韩 在线 | www.色网| 99视频免费在线观看 | 国产真实乱人偷精品 | 精品欧美一区二区三区久久久 | www.日本在线观看 | av在线播放网站 | 精品国产毛片 | 国产一区二区三区在线观看视频 | 精品国产精品三级精品av网址 | 免费一区二区 | 成人免费毛片嘿嘿连载视频 | 国产成人精品三级麻豆 | 四虎看片 |