-
Notifications
You must be signed in to change notification settings - Fork 2k
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] SAS token SAS_EXPIRY_TIME encoding results in an invalid signature #22042
Comments
@gapra-msft could you take a look into this? |
Hi @fcofdez, Thank you for reporting this issue. We will take a look at what could be causing the problem and get back to you if we have any questions. |
@fcofdez, can I get some better information about how exactly you're encountering this? You're specifically pointing to a PR that just aligned connection string SAS ingestion with what every other SAS ingestion mechanism already did.
|
@jaschrep-msft we provide the SAS token using a connection string, but as far as I can see in the code that shouldn't make any difference.
I think the problem comes when the SAS query parameters are manipulated, as it seems like the signature is computed using the |
I've been checking the docs https://docs.microsoft.com/en-gb/rest/api/storageservices/formatting-datetime-values and it seems like |
As a final note, the token was generated with the CLI
|
Any news on this? |
I'm wondering if there's been some progress on this? |
Hey, @fcofdez. Apologies for the delay. It looks like we slipped on this quite a bit, so thank you for following up. I think you are correct that the PR in question will break a sas that doesn't have seconds. The code will eventually hit a line that tries to parse and then encode the sas query parameters and in so doing formats the date values it finds as We will work on getting a fix out for this |
Hi again, |
@fcofdez Thank you for checking in. Unfortunately, we haven't had an opportunity to get to many fixes like this lately. This is near the top of our list of bugs to address once work for supporting new service versions calms a bit. |
Describe the bug
After introducing #20520 SAS query params are sanitized but it seems like the
SAS_EXPIRY_TIME
gets modified and it invalidates the provided signature.Exception or Stack Trace
To Reproduce
Provide a SAS token with
SAS_EXPIRY_TIME
without seconds, i.e.se=2021-07-20T13%3A21Z&sp=rwdl&sv=2018-11-09&sr=c&sig=<redacted>
that converts the http request query params intose=2021-07-20T13%3A21%3A00Z&sp=rwdl&sv=2018-11-09&sr=c&sig=<redacted>
making the signature invalid. This can be reproduced with curl easily.Expected behavior
Generate a valid http request
Setup (please complete the following information):
12.11.1
Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: