Azure Function App Chaining 授权
Azure Function App Chaining Authorisation
我有许多作为业务流程的一部分链接起来的 Azure Function Apps,我想在每个 Function App 上实施适当的授权。
我知道我可以将 Function App Authorisation Level 设置为 Function 并通过 code 查询字符串或 x-functions-key[ 提供密钥=23=] header
我想知道是否可以使用每个功能应用程序的托管标识为后续调用提供授权?不确定是否可以通过 User Assigned Identities
完成
这是可能的。如果您只想从用户分配的身份中获取令牌以传递给其他函数,那么 .
如果你想一直传递用户身份,那就有点棘手了。对于 link 沉重的回答,我们深表歉意,这是一个很大的话题,需要执行许多步骤。希望这能为您提供所有关键字(代表流,服务器到服务器身份验证和同意到应用程序)找到一些好的博客文章来引导你完成。
你需要把问题分解成碎片。
- Use Active Directory authentication for the first call。您要么需要将配置添加到部署脚本中,要么需要使用 Azure 门户中的 wizard/tools 手动配置 Azure Active Directory 设置。
- 实现需要设置的“On behalf of" Authentication flow to run the downstream functions using the context of the user that was authenticated in the first call. This requires you to set up service to service authentication. A sticky point if often the "Grant Consent”
图片来自文档
同意
我有许多作为业务流程的一部分链接起来的 Azure Function Apps,我想在每个 Function App 上实施适当的授权。
我知道我可以将 Function App Authorisation Level 设置为 Function 并通过 code 查询字符串或 x-functions-key[ 提供密钥=23=] header
我想知道是否可以使用每个功能应用程序的托管标识为后续调用提供授权?不确定是否可以通过 User Assigned Identities
完成这是可能的。如果您只想从用户分配的身份中获取令牌以传递给其他函数,那么
如果你想一直传递用户身份,那就有点棘手了。对于 link 沉重的回答,我们深表歉意,这是一个很大的话题,需要执行许多步骤。希望这能为您提供所有关键字(代表流,服务器到服务器身份验证和同意到应用程序)找到一些好的博客文章来引导你完成。
你需要把问题分解成碎片。
- Use Active Directory authentication for the first call。您要么需要将配置添加到部署脚本中,要么需要使用 Azure 门户中的 wizard/tools 手动配置 Azure Active Directory 设置。
- 实现需要设置的“On behalf of" Authentication flow to run the downstream functions using the context of the user that was authenticated in the first call. This requires you to set up service to service authentication. A sticky point if often the "Grant Consent”
图片来自文档
同意