-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Azure.Data.Tables sas token does not allow access to table entity #17998
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wmengmsft, @MehaKaushik, @shurd |
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
@ssiltanen I can reproduce this, but I'm not sure why this works for the Microsoft.Azure.Cosmos.Table client. In my testing, the above example works if you either set the StartsOn value a couple seconds in the past, or sleep a couple seconds in the script before attempting to use the token. This seems to indicate that the service is being a bit conservative with enforcing the start time, but that we have a valid Sas token. In your repro with Microsoft.Azure.Cosmos.Table, does the |
The format of the working sas made with Microsoft.Azure.Cosmos.Table: After reading your reply, I tried both removing the start time and setting it back in time 1 minute but I was unable to make either work. Here the setups. let sasStartInPast =
let builder = adminTableClient.GetSasBuilder(TableSasPermissions.Read, DateTimeOffset.UtcNow.AddMonths 1)
builder.StartsOn <- DateTimeOffset.UtcNow.AddMinutes(-1.)
builder.PartitionKeyStart <- partitionKey
builder.PartitionKeyEnd <- partitionKey
builder.Protocol <- TableSasProtocol.Https
let cred = TableSharedKeyCredential(accountName, accountKey)
builder.Sign(cred)
let sasWithoutStart =
let builder = adminTableClient.GetSasBuilder(TableSasPermissions.Read, DateTimeOffset.UtcNow.AddMonths 1)
builder.PartitionKeyStart <- partitionKey
builder.PartitionKeyEnd <- partitionKey
builder.Protocol <- TableSasProtocol.Https
let cred = TableSharedKeyCredential(accountName, accountKey)
builder.Sign(cred) Both sas tokens results the same exception as above in the original post
|
@ssiltanen Thank you - I see the problem now. We were generating the wrong query string argument names for the |
@christothes Wasn't that issue fixed already here #17535 |
That issue was that the values were transposed - but it turns out they were also totally the wrong strings :) |
Describe the bug
Sas tokens created with Azure.Data.Tables do not work when used to access table entities. However using sas token created with Microsoft.Azure.Cosmos.Table works when used with this library and example code. Therefore it seems that the issue lies within the sas created with this library.
Expected behavior
Actual behavior (include Exception or Stack Trace)
To Reproduce
F# interactive script to reproduce.
Environment:
The text was updated successfully, but these errors were encountered: