Skip to content
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

Bugfix: 1385: Authentication fails if both date and x-ms-date headers are present #2316

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BillBooks
Copy link

For queues and blobs, when forming the shared key token, the Date header should be treated as the empty string when the x-ms-date header is present.

For tables, the value of the x-ms-date header should be used as the value of the Date header if the x-ms-date header is present.

This behavior is documented at
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key

specified

For queues and blobs, when forming the shared key token, the Date header
should be treated as the empty string when the x-ms-date header is
present.

For tables, the value of the x-ms-date header shoudl be used as the
value of the Date header if teh x-ms-date header is present.

This behavior is documented at
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change generally looks good to me.
It's better to also add test cases for blob/Queue servicce.

@BillBooks BillBooks changed the title headers are presemBugfix: 1385: Authentication fails if both date and x-ms-date origin/p-willa/PR/add-missing-config Bugfix: 1385: Authentication fails if both date and x-ms-date origin/p-willa/PR/add-missing-config Dec 10, 2023
@BillBooks BillBooks changed the title Bugfix: 1385: Authentication fails if both date and x-ms-date origin/p-willa/PR/add-missing-config Bugfix: 1385: Authentication fails if both date and x-ms-date headers are present Dec 10, 2023
@BillBooks
Copy link
Author

I'll look at adding some tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants