Azure-docs: SAS token

Created on 12 May 2019  Â·  3Comments  Â·  Source: MicrosoftDocs/azure-docs

It should be mentioned on the section about "Shared Access Signature" generation that the URI used to create the signature-string should be URL-Encoded.

Thank you.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

cxp doc-enhancement service-bus-messaginsvc triaged

All 3 comments

@galrito Thanks for the feedback. We are currently investigating into the issue and will update you shortly.

Hi @galrito Thanks for pointing this out and providing your feedback.

It does say, towards the end of the same section, that: "The URI must be percent-encoded." and links to UrlEncode doc. However, this statement may not have been as discover-able & legible so I've gone ahead and created a PR that improves its formatting (moved it to a new line and turned it into bold text). If you have any further suggestions, definitely do let us know.

We will now proceed to close this thread for now. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

Hi @mike-urnun-msft, thank you for your reply.

What made me confused in this issue is that the snippet for creating the SAS is:
SharedAccessSignature sig=<signature-string>&se=<expiry>&skn=<keyName>&sr=<URL-encoded-resourceURI>.

Notice it has <URL-encoded-resourceURI>.

However, the one for generating the signature-string is:
SHA-256('https://<yournamespace>.servicebus.windows.net/'+'\n'+ 1438205742).

Notice it doesn't explicit says it should be URL-encoded.

My suggestion would be to change the snippet to SHA-256('<URL-encoded-resourceURI>'+'\n'+ 1438205742). This way, I believe there would be no more ambiguity by keeping the same format as the SAS snippet.

Thank you for your help.

Was this page helpful?
0 / 5 - 0 ratings