我正在尝试查找有关如何在函数应用绑定(bind)中设置连接字符串的信息,以便应用程序使用托管标识来访问事件中心和其他资源。我可以通过获取文档中所述的访问 token 来在其他应用程序中使用托管身份。
这在为资源绑定(bind)的连接设置采用配置变量名称的函数应用中如何工作?
这是否记录在某处?
最佳答案
我今天测试了它以连接到服务总线队列。连接字符串是:
Endpoint=sb://<service-bus-resource>.servicebus.windows.net;Authentication=Managed Identity;
我在这个博客上找到了它:
https://blog.darkloop.com/post/using-service-app-managed-identity-with-azure-functions-service-bus-bindings 。我不需要做任何特殊的事情,因为我的项目正在使用 Microsoft.Azure.ServiceBus 4.1.1
。
但是请查看这篇博文中的评论 - 有人说它不适用于消费计划。这里提到了另一个潜在的问题: https://feedback.azure.com/forums/355860-azure-functions/suggestions/37907848-support-for-azure-managed-service-identities-in-ev
Please note that the behavior captured in the post by Arturo was considered unintentional from the SDK team and removed in a later version update. We are working with them to make this formally supported, but right now the instructions in that post may no longer work.
所以我不确定是否应该使用它。
关于azure - 使用带有托管标识的 Azure Functions 事件中心绑定(bind)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54000883/