我们考虑了一种解决方案,在该解决方案中,我们寻求使用在另一个 Azure 订阅(由另一家公司拥有)中运行的逻辑应用/功能应用从一个 Azure 订阅(由一家公司拥有)中的文件共享读取和写入文件。当前有关使用逻辑应用(使用连接器)连接到文件共享 ( https://learn.microsoft.com/en-us/connectors/azurefile/ ) 的指南提到了存储帐户 key 的使用。
我们寻求以下问题的答案:
- 在不同的 Azure 订阅中运行的逻辑应用能否使用文件共享连接器连接到另一个订阅中的文件共享?
- 如果上述 1 的答案为"is",则使用存储帐户 key (属于另一个 Azure 订阅中的存储帐户)是逻辑应用对文件共享进行身份验证的唯一方法,还是可以改用 SAS token ?尽管运行逻辑应用的其他公司只是我们的客户,但我们对在公司外部共享存储帐户 key (托管文件共享)持谨慎态度。
- 是否可以使用 SAS token ,通过逻辑应用连接器或函数应用或任何其他脚本/编程方式(在不同的 Azure 订阅中运行)连接到我们的 Azure 订阅中的文件共享(甚至 BLOB) ,有人可以引导我们找到任何可用的文档/代码片段/专家的指导吗?
非常感谢通过快速响应提供的任何帮助。
最佳答案
Can a logic app running in a different azure subscription use the file share connector to connect to a file share in another subscription?
当然可以。
If yes to 1 above, is using storage account keys (belonging to a storage account in another azure subscription), the only way for the logic app to authenticate to the file share or can a SAS token be used instead? We are wary of sharing storage account keys outside of our company (hosting the file share), though the other company running the logic app is our customer only.
存储帐户 key 并不是唯一的方法。也可以使用 SAS token 。
既然你提到了powershell标签,我就给出powershell引用(其他语言类似。)。
Create a context by using an SAS token
If SAS token can be used, either via a logic app connector or a function app or any other script/programmatic way (running in a different azure subscription) to connect to a file share (or even BLOB) in our azure subscription, can someone lead us to any available documentation/code snippets/guidance by some expert?
检查以下链接:
关于azure - 如何使用azure逻辑应用程序、函数aps从azure存储(文件共享或BLOB)中读取、写入、删除文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67012740/