Skip to content

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

Open
BillBooks wants to merge 1 commit into
Azure:mainfrom
BillBooks:main
Open

Bugfix: 1385: Authentication fails if both date and x-ms-date headers are present#2316
BillBooks wants to merge 1 commit into
Azure:mainfrom
BillBooks:main

Conversation

@BillBooks

Copy link
Copy Markdown

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

@blueww Wei Wei (blueww) left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

2 participants