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

asp.net mvc 和 azure 基于活動目錄安全組的授權

asp.net mvc and azure active directory security group based authorization(asp.net mvc 和 azure 基于活動目錄安全組的授權)
本文介紹了asp.net mvc 和 azure 基于活動目錄安全組的授權的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我正在尋找 ASP.NET MVC 應用程序的幫助.它對單租戶 Azure Active Directory 用戶進行身份驗證,并可以使用 Active Directory 安全組授權用戶.即,如果用戶是該安全組的一部分,則只允許訪問網站,否則訪問被拒絕.

Visual Studio 本身可以使用向導完成 Active Directory 身份驗證,但不確定如何通過 AAD 安全組執行授權.

附:我是 ASP.NET 安全新手

解決方案

當用戶登錄應用程序時,來自 Azure AD 的傳入令牌將包含 組聲明,一旦你適當地修改了應用程序的清單 (有關步驟,請參閱下面的示例應用程序鏈接).然后,您的應用程序代碼可以讀取這些聲明并根據它們做出授權決策.

這是一個基于組聲明進行授權的示例應用程序 -

實施授權邏輯時要考慮的其他信息

  1. 您已經特別詢問了有關組的問題,但您還應該考慮使用應用程序角色,它可以幫助您實現基于角色的授權邏輯.查看 Microsoft 文檔鏈接

    I am looking help for ASP.NET MVC application. Which authenticate single tenant azure active directory users and can authorize users using active directory security group. i.e. if user is part of that security group then only allow access to website otherwise access denied.

    Active directory authentication can be done by visual studio itself using wizard but not sure how to perform authorization through AAD security group.

    P.S. I am new to ASP.NET security

    解決方案

    When a user signs into the application, incoming token from Azure AD will contain group claims, once you modify the application's manifest appropriately (see the sample application link below for steps). Your application code can then read these claims and make authorization decisions based on them.

    Here is a sample application that does authorization based on group claims -

    Authorization in a web app using Azure AD groups & group claims

    Group claims

    ADDITIONAL INFORMATION TO CONSIDER WHEN IMPLEMENTING AUTHORIZATION LOGIC

    1. You have specifically asked about Groups, but you should also consider using Application Roles, which can help you implement a Role based authorization logic. Look at Microsoft documentation link Application Roles. Here is a link to another similar question where I have provided a little more detailed information on both Application Roles and Groups and links to sample code for both. Azure Active Directory Integration with Custom RBAC

      Once you understand the usage/purpose of application roles and groups, it's completely possible for you to decide that you want to base your authorization logic on a combination of Roles and Groups information for the signed in user instead of just one.

    2. In case when a user is part of many groups (6 or more AFAIK), Azure AD token doesn't send across the "groups" directly as part of token, instead it sends an overage indicator and then you can query the groups in a separate call. Take a look at the token related documentation here - Claims in id_tokens

    這篇關于asp.net mvc 和 azure 基于活動目錄安全組的授權的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 超時)
主站蜘蛛池模板: 久久亚洲精品国产精品紫薇 | 国产伦精品一区二区三区照片91 | yiren22综合网成人 | 欧美精品欧美精品系列 | 一级黄色夫妻生活 | 国产午夜精品一区二区三区嫩草 | 成人中文字幕在线 | 久久久久久久一区二区三区 | 成人免费看黄网站在线观看 | 一级中国毛片 | 中文字幕一区二区三区乱码在线 | 青青久在线视频 | 亚洲www啪成人一区二区麻豆 | 亚洲36d大奶网 | 一道本不卡 | av一二三区 | 日韩中文视频 | 亚洲福利一区 | 亚洲国产欧美国产综合一区 | 亚洲美女一区二区三区 | 国产亚洲高清视频 | 99精品视频网 | 男人亚洲天堂 | 成人在线视频观看 | 国产农村妇女精品一区 | 欧美一区二区成人 | 看真人视频一级毛片 | 日韩精品一区二区不卡 | av免费电影在线 | 日韩综合一区 | 玩丰满女领导对白露脸hd | 99这里只有精品视频 | 亚洲精品久久久久avwww潮水 | 亚洲一区二区视频在线播放 | 一区二区三区国产精品 | 国产在线一区二 | 色视频网站免费 | 国产精品1区2区 | 日韩在线电影 | h片在线播放| av免费成人 |