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

Fixes issue #2208 #2215

Merged
merged 13 commits into from
Oct 19, 2023

Conversation

vigneashs
Copy link
Contributor

This PR adds additional validation to authentication path computation for secondary requests.

@blueww
Copy link
Member

blueww commented Oct 10, 2023

@vigneashs

Thanks for raising the fix PR!
Would you please also add:

  1. Change log: https://github.com/Azure/Azurite/blob/main/ChangeLog.md
  2. (Optional) Test case: you can refer this case for how to add test case with product style Url:
    it(`Should work with production style URL when ${productionStyleHostName} is resolvable`, async () => {

    (As I know, JS SDK only support secondary host name like "devstoreaccount1-secondary.blob.localhost", note the 2nd block need be "blob")

@blueww
Copy link
Member

blueww commented Oct 11, 2023

For the test case, I have drafted a test case in https://github.com/Azure/Azurite/pull/2216/files, for your reference.

@blueww
Copy link
Member

blueww commented Oct 12, 2023

@vinagesh

The following new case will fail, would you please help to look?

  1) table name validation tests
       Should work with production style URL when devstoreaccount1-secondary.table.localhost is resolvable:
     AssertionError [ERR_ASSERTION]: Failed
      at /home/vsts/work/1/s/tests/table/apis/table.validation.rest.test.ts:457:18
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (tests/table/apis/table.validation.rest.test.ts:441:5)

@vigneashs
Copy link
Contributor Author

@vinagesh

The following new case will fail, would you please help to look?

  1) table name validation tests
       Should work with production style URL when devstoreaccount1-secondary.table.localhost is resolvable:
     AssertionError [ERR_ASSERTION]: Failed
      at /home/vsts/work/1/s/tests/table/apis/table.validation.rest.test.ts:457:18
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (tests/table/apis/table.validation.rest.test.ts:441:5)

I will fix it. Thanks

@vigneashs
Copy link
Contributor Author

@blueww, I have fixed the error in Table unit tests.

The createStringToSignForSharedKeyLite routine had a hardcoded storage account name in authentication path which is valid only for non-production style URL. I have fixed that method to use both production style URL and non-production style URL.

@blueww
Copy link
Member

blueww commented Oct 16, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@blueww
Copy link
Member

blueww commented Oct 16, 2023

@XiaoningLiu , @EmmaZhu
This PR looks good to me.
Would you please help to review this PR and see if you have any comments?
I plan to merge it in 1-2 days.

@blueww blueww merged commit 68a3b05 into Azure:main Oct 19, 2023
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.

3 participants