Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Securing SAS Token from Azure Logic Apps
https://prod-23.centralus.logic.azure.com:443/workflows/0c9def69700c4b2995e2e587123306f7/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ORQeXlFZxBeF7xmF9pO73sgYl_-w0v6V9uugi8bhHeA
<policies>
<inbound>
...
<rewrite-uri id="apim-generated-policy" template="?api-version=2016-06-01&amp;sp=/triggers/manual/run" />
...
</inbound>
...
</policies>
<policies>
<inbound>
...
<rewrite-uri id="apim-generated-policy" template="?api-version=2016-06-01&amp;sp=/triggers/manual/run&amp;{{lamanual5a27d3ff5eec5fd4fc847565}}" />
...
</inbound>
...
</policies>
<policies>
<inbound>
...
<set-variable name="sasToken" value="@(context.Request.Headers["X-Sas-Token"].First())" />
<rewrite-uri id="apim-generated-policy" template="?api-version=2016-06-01&amp;sp=/triggers/manual/run" />
<set-query-parameter name="sv" exists-action="override">
<value>@(((string)context.Variables["sasToken"]).Substring(3))</value>
</set-query-parameter>
...
</inbound>
...
</policies>
<policies>
<inbound>
...
<set-variable name="sasToken" value="@(context.Request.Headers["X-Sas-Token"].First())" />
<rewrite-uri id="apim-generated-policy" template="?api-version=2016-06-01&amp;sp=/triggers/manual/run" />
...
</inbound>
...
</policies>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment