azure 功能身份验证

标签 azure authentication oauth oauth-2.0 azure-functions

我正在编写一个 http 触发器 azure 函数,它验证 Json 并将其存储在数据库中。多个客户端(其他服务器)调用此函数。 Azure 函数应用程序提供不同的授权级别(函数、管理员),这些级别会发出一个可供所有客户端使用的密码,并保护函数应用程序的安全。我想知道我们是否可以为不同的客户端颁发不同的密码或实现 Oauth 或类似的授权协议(protocol)以提高安全性。

最佳答案

这里提供一个认证方式供您引用,您可以尝试配置Authentication / Authorization在函数应用的平台功能中。

您可以按照以下步骤操作。

  1. 首先,转到 Httptrigger 的集成,设置 Authorization levelAnonymous .

enter image description here

2.访问Authentication / Authorization ,在这个场景中,例如我将其配置为 Log in with Azure Active Directory并保存配置,引用截图。

enter image description here

3.然后转到门户中的Azure Active Directory,您可以找到您的应用注册。

enter image description here

4.配置 homepage在带有 Httptrigger URL list 中(您可以通过 Httptrigger 中的 </> Get function URL 获取它),保存 list 。

enter image description here

5.尝试使用类似 https://yourfunction.azurewebsites.net/api/yourhttptrigger?xxxxx 的 url 登录 HttpTrigger在浏览器中,它会重定向到AAD登录页面,使用AAD帐户登录,然后可以看到您的HttpTrigger。

enter image description here

enter image description here

更多详情请引用此article .

关于 azure 功能身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51413576/

相关文章:

azure - NimbusAPI 响应超时,尽管它说已收到

security - ASP Classic用户登录系统密码安全注意事项?

security - Oauth 中时间戳的用途是什么

Azure 未使用正确的证书

azure - 如何获取 currentSlot 并使用 Azure devops 上的新插槽更改 helm 升级命令?

javascript - Laravel 和 Vue.js 身份验证

r - 如何使用 RCurl 与 reddit 进行身份验证

javascript - Yahoo Fantasy API 间歇性消费者 key 未知

azure - Windows Azure 上的初始 "No OpenID Endpoint Found"

authentication - 有没有一种在 Actix 路由级别实现身份验证/授权检查的好方法?