简体   繁体   English

Azure Active Directory、企业应用程序、应用程序角色的密钥/访问密钥?

[英]Secret Key / Access Key with Azure Active Directory, enterprise application, app roles?

We are working on WEB APIs and want to integrate Azure AD for AuthN and AuthZ.我们正在开发 WEB API,并希望为 AuthN 和 AuthZ 集成 Azure AD。 We have successfully integrated the same.我们已经成功地整合了它。 We have created enterprise applications, custom roles, assigned users for the same.我们已经创建了企业应用程序、自定义角色,并为其分配了用户。 Now we need to allow access to APIs with AWS like keys (Secret / Access keys) .现在我们需要允许使用 AWS 之类的密钥(秘密/访问密钥)访问 API Individual user can generate their own keys and store those in Azure AD so that when those keys are used, user can be authenticated .个人用户可以生成自己的密钥并将其存储在 Azure AD 中,以便在使用这些密钥时对用户进行身份验证

I didn't find any way to achieve this using Azure AD.我没有找到任何使用 Azure AD 实现这一目标的方法。 Any suggestions around same are welcome.欢迎任何关于相同的建议。 Meanwhile I have gone through custom store for keys.同时,我已经通过自定义存储键。 Please refer link : https://www.codeproject.com/Articles/1228892/Securing-ASP-NET-CORE-Web-API-using-Custom-API-Key请参考链接: https : //www.codeproject.com/Articles/1228892/Securing-ASP-NET-CORE-Web-API-using-Custom-API-Key

Thanks in advance.提前致谢。

Azure AD authentication uses tokens. Azure AD 身份验证使用令牌。 So any app wishing to call your API must authenticate with AAD and acquire a token for the API.因此,任何希望调用您的 API 的应用程序都必须通过 AAD 进行身份验证并获取 API 的令牌。

If these users are making apps within your organisation, then they can register their app in your AAD and require access to your API.如果这些用户在您的组织内制作应用程序,那么他们可以在您的 AAD 中注册他们的应用程序并要求访问您的 API。 They will create and manage their own keys.他们将创建和管理自己的密钥。

If on the other hand these users are making an app for another organisation, you'll have to make your API a multi-tenant app.另一方面,如果这些用户正在为其他组织开发应用程序,则您必须将 API 设为多租户应用程序。 And you'll need to have an on-boarding page in your API through which you will redirect their admin/user to the AAD login page, where they will consent to any permissions your API requires.并且您需要在您的 API 中有一个入门页面,您将通过该页面将他们的管理员/用户重定向到 AAD 登录页面,他们将在那里同意您的 API 所需的任何权限。 After this a service principal is created in their tenant.在此之后,将在其租户中创建服务主体。 Then they can register their client apps and require access to your API.然后他们可以注册他们的客户端应用程序并要求访问您的 API。 They will have full control which permissions they want to assign to each app, what roles to give to users etc. But of course the tokens will contain their tenant id so you can filter access on that.他们将完全控制他们想要分配给每个应用程序的权限,赋予用户什么角色等。当然,令牌将包含他们的租户 ID,因此您可以过滤访问权限。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM