Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Queue/Service_SetProperties: Should not be able to set default Service Version for non Blob Client

Open blueww opened this issue 6 years ago • 2 comments

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the Azurite was used?

3.3.0-preview

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

VS code

What's the Node.js version?

v10.15.3

What problem was encountered?

set default Service Version for Queue Service should fail ,but now success on Azurite

Steps to reproduce the issue?

see below test

Have you found a mitigation/solution?

no

Test case:

Test Name:        CloudQueueTestAnalyticsDefaultServiceVersionThrows
Test FullName: Microsoft.Azure.Storage.Queue.QueueAnalyticsUnitTests.CloudQueueTestAnalyticsDefaultServiceVersionThrows
Test Source:       C:\code\azure-storage-net\Test\ClassLibraryCommon\Queue\QueueAnalyticsUnitTests.cs : line 300
Test Outcome:  Failed
Test Duration:   0:00:00.0102221

Result StackTrace:          at Microsoft.Azure.Storage.Queue.QueueAnalyticsUnitTests.CloudQueueTestAnalyticsDefaultServiceVersionThrows() in C:\code\azure-storage-net\Test\ClassLibraryCommon\Queue\QueueAnalyticsUnitTests.cs:line 318
Result Message:              Assert.Fail failed.

Debug Log:

2019-12-17T04:00:48.934Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueStorageContextMiddleware: RequestMethod=PUT RequestURL=http://127.0.0.1/devstoreaccount1?restype=service&comp=properties RequestHeaders:{"x-ms-client-request-id":"987d7785-df27-4f74-ae7c-c0406dc9d7e8","user-agent":"Azure-Storage/11.1.1 (.NET Core; Win32NT 6.2.9200.0)","x-ms-version":"2019-02-02","x-ms-date":"Tue, 17 Dec 2019 04:00:48 GMT","authorization":"SharedKey devstoreaccount1:Zh5YTINc2DyJ0eQSMNjaVjL9XGEuzl74z3lGpeLX5nc=","content-length":"587","host":"127.0.0.1:10001"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2019-12-17T04:00:48.934Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueStorageContextMiddleware: Account=devstoreaccount1 Queue=undefined Message=undefined MessageId=undefined
2019-12-17T04:00:48.934Z c2086c2e-690b-451f-9ade-b50959c20d71 verbose: DispatchMiddleware: Dispatching request...
2019-12-17T04:00:48.934Z c2086c2e-690b-451f-9ade-b50959c20d71 info: DispatchMiddleware: Operation=Service_SetProperties
2019-12-17T04:00:48.935Z c2086c2e-690b-451f-9ade-b50959c20d71 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2019-12-17T04:00:48.935Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2019-12-17T04:00:48.935Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueSharedKeyAuthenticator:validate() [STRING TO SIGN]:"PUT\n\n\n587\n\n\n\n\n\n\n\n\nx-ms-client-request-id:987d7785-df27-4f74-ae7c-c0406dc9d7e8\nx-ms-date:Tue, 17 Dec 2019 04:00:48 GMT\nx-ms-version:2019-02-02\n/devstoreaccount1/devstoreaccount1\ncomp:properties\nrestype:service"
2019-12-17T04:00:48.936Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueSharedKeyAuthenticator:validate() Calculated authentication header based on key1: devstoreaccount1:Zh5YTINc2DyJ0eQSMNjaVjL9XGEuzl74z3lGpeLX5nc=
2019-12-17T04:00:48.936Z c2086c2e-690b-451f-9ade-b50959c20d71 info: QueueSharedKeyAuthenticator:validate() Signature 1 matched.
2019-12-17T04:00:48.937Z c2086c2e-690b-451f-9ade-b50959c20d71 verbose: DeserializerMiddleware: Start deserializing...
2019-12-17T04:00:48.938Z c2086c2e-690b-451f-9ade-b50959c20d71 debug: deserialize(): Raw request body string is �<?xml version="1.0" encoding="utf-8"?><StorageServiceProperties><Logging><Version>1.0</Version><Delete>false</Delete><Read>false</Read><Write>false</Write><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></Logging><HourMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></HourMetrics><MinuteMetrics><Version>1.0</Version><Enabled>false</Enabled><RetentionPolicy><Enabled>false</Enabled></RetentionPolicy></MinuteMetrics><Cors /><DefaultServiceVersion>2009-09-19</DefaultServiceVersion></StorageServiceProperties>
2019-12-17T04:00:48.939Z c2086c2e-690b-451f-9ade-b50959c20d71 info: HandlerMiddleware: DeserializedParameters={"options":{"requestId":"987d7785-df27-4f74-ae7c-c0406dc9d7e8"},"restype":"service","comp":"properties","version":"2019-02-02","storageServiceProperties":{"logging":{"version":"1.0","deleteProperty":false,"read":false,"write":false,"retentionPolicy":{"enabled":false}},"hourMetrics":{"version":"1.0","enabled":false,"retentionPolicy":{"enabled":false}},"minuteMetrics":{"version":"1.0","enabled":false,"retentionPolicy":{"enabled":false}},"cors":[],"DefaultServiceVersion":"2009-09-19"},"body":"ReadableStream"}
2019-12-17T04:00:48.940Z c2086c2e-690b-451f-9ade-b50959c20d71 verbose: SerializerMiddleware: Start serializing...
2019-12-17T04:00:48.940Z c2086c2e-690b-451f-9ade-b50959c20d71 info: EndMiddleware: End response. TotalTimeInMS=6 StatusCode=202 StatusMessage=undefined Headers={"server":"Azurite-Queue/3.3.0-preview","x-ms-client-request-id":"987d7785-df27-4f74-ae7c-c0406dc9d7e8","x-ms-request-id":"c2086c2e-690b-451f-9ade-b50959c20d71","x-ms-version":"2019-02-02"}

blueww avatar Dec 17 '19 07:12 blueww

Undocumented negative case. It's by design Azurite ignores unrecgnoized DefaultServiceVersion in request body.

XiaoningLiu avatar Dec 25 '19 04:12 XiaoningLiu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 12:04 stale[bot]