MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

Create a user delegation SAS: pre-2020-02-10 StringToSign incorrect fields #3445

Open buckelij opened 3 years ago

buckelij commented 3 years ago

Describe the bug

I've identified two problems with the Create a user delegation SAS document:

The example is:

Use the following format for the string-to-sign:

StringToSign = sp + "\n" +  
st + "\n" +  
se + "\n" +  
canonicalizedResource + "\n" +  
skoid + "\n" +
sktid + "\n" +
skt + "\n" +
ske  + "\n" +
sks + "\n" +
skv + "\n" +
saoid + "\n" +
suoid + "\n" +
scid + "\n" +
sip + "\n" +  
spr + "\n" +  
sv + "\n" +  
sr + "\n" +
rscc + "\n" +
rscd + "\n" +  
rsce + "\n" +  
rscl + "\n" +  
rsct

The format that actually works for 2019-12-12 is:

StringToSign = sp + "\n" +  
 st + "\n" +  
 se + "\n" +  
 canonicalizedResource + "\n" +  
 skoid + "\n" +
 sktid + "\n" +
 skt + "\n" +
 ske  + "\n" +
 sks + "\n" +
 skv + "\n" +
 sip + "\n" +  
 spr + "\n" +  
 sv + "\n" +  
 sr + "\n" +
 "\n" +
 rscc + "\n" +
 rscd + "\n" +  
 rsce + "\n" +  
 rscl + "\n" +  
 rsct

In other words, omit saoid + "\n" + suoid + "\n" + scid + "\n", which are not relevant to 2019-12-12, and add a blank line after sr. That blank line lines up with the signedSnapshotTime field for the 2020-02-10 or higher version, but there's no reference to that field for earlier versions.

To Reproduce

Generate a user delegation SAS with version 2019-12-12 and find that the required StringToSign format is not as documented.

Expected behavior The documentation should describe the correct StringToSign format and should indicate 2020-04-08 is the most recent production api version.

Additional context I can share code demonstrating the problem in a non-public forum.

welcome[bot] commented 3 years ago

Thank you for creating the issue! One of our team members will get back to you shortly with additional information. If this is a product issue, please close this and contact the particular product's support instead (see https://support.microsoft.com/allproducts for the list of support websites).

rootsmusic commented 3 years ago

@buckelij Azure REST API specs are at https://github.com/Azure/azure-rest-api-specs