azure - 在 azure 逻辑应用程序中,SAS token 是否有效

标签 azure azure-logic-apps

在 azure 逻辑应用程序中,SAS token 是否有有效或过期时间,因为如果存在过期时间,我将在 URL 中显示该 token ,然后 URL 将会更改。

最佳答案

如果您与其他方共享 URL,您可以根据需要生成具有特定 key 和到期日期的 URL。然后,您可以无缝滚动按键,或确保启动应用程序的访问权限仅限于特定时间跨度。

您可以通过逻辑应用 REST API 指定 URL 的到期日期:

POST 
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl?api-version=2016-06-01

在正文中,包含属性 NotAfter 作为 JSON 日期字符串,该字符串返回 callback URL仅在 NotAfter 日期和时间之前有效。

enter image description here 若要向逻辑应用的触发器添加到期日期,请在 Visual Studio 的代码 View 中打开 LogicApp.json。找到触发器部分并将以下内容添加到 schema 部分:

"NotAfter": "2018-06-01T11:00:00.511Z"

根据您的需要调整日期和时间。触发器部分现在如下所示:

"triggers": {
          "manual": {
            "type": "Request",
            "kind": "Http",
            "inputs": {
              "schema": {
                "NotAfter": "2018-06-01T11:00:00.511Z",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ]
              },
              "method": "POST"
            }
          }
        },

更多详情请引用这篇文章Callback URLs with an expiration date

关于azure - 在 azure 逻辑应用程序中,SAS token 是否有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50266077/

相关文章:

azure - 事件中心 API POST : 40103: Invalid authorization token signature

visual-studio - 微软Azure订阅

azure-functions - 选择 `azure function` 与 `http request` 操作是否有性能优势?

c# - 使用 Microsoft.AspNetCore.Authentication.AzureADB2C.UI 时如何覆盖/替换错误页面处理?

azure - 插件问题 : Azure Active Directory single sign-on (SSO) integration with JIRA SAML SSO by Microsoft

c# - 我们可以继续在服务器端按需创建 Azure 共享访问签名吗?

azure - 在 Azure 逻辑应用内联代码中使用变量

azure - 使用 Azure DevOps 管道自动将 Azure 逻辑工作流迁移到空逻辑应用

Azure 逻辑应用 : How to be notified if a logic app action connection breaks or fails

json - Azure 逻辑应用 - 多部分/表单数据失败