久久久久久久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 超時)
主站蜘蛛池模板: 成人av观看| 中文字幕在线免费视频 | 中文字幕1区2区3区 日韩在线视频免费观看 | 亚洲精选久久 | 欧美国产激情二区三区 | 91精品国产91久久久久久最新 | 亚洲成人国产综合 | 欧美中文字幕在线观看 | 国产一区二区在线观看视频 | 精品在线视频播放 | 国产成人午夜高潮毛片 | 久久亚洲一区 | 亚州综合一区 | 中文字幕一区在线观看视频 | 91福利在线观看视频 | 久久久久91 | 国产精品海角社区在线观看 | 日韩最新网址 | 久久亚洲国产精品 | 欧美a区| 中文字幕国产精品视频 | 国产精品毛片 | 欧美日本亚洲 | 欧美理伦片在线播放 | 免费亚洲婷婷 | 国产视频中文字幕 | 在线观看黄色电影 | 天天综合天天 | 国产亚洲欧美日韩精品一区二区三区 | 国产精品久久久久久久久动漫 | 亚洲电影专区 | 亚洲网站在线观看 | 色偷偷噜噜噜亚洲男人 | 五月激情久久 | 国产在线视频一区二区董小宛性色 | 99热在线播放 | 伊人网综合在线 | 九九精品在线 | 亚洲免费av一区 | 国产日韩精品久久 | 久久99精品久久久久久秒播九色 |