Unable to list blob containers
See original GitHub issueWhich service(blob, file, queue, table) does this issue concern?
Blob
Which version of the Azurite was used?
3.11.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What’s the Node.js version?
8.12.0
What problem was encountered?
When listing blob containers, service is returning 400 status code. This happens when include
parameter includes deleted
option.
Steps to reproduce the issue?
Try to navigate to http://127.0.0.1:10000/devstoreaccount1?sv=2020-02-10&ss=btqf&srt=sco&se=2021-03-06T14%3A31%3A37Z&sp=rwdxftlacup&sig=E6zJD7o7Ij577Uvphzddy%2BEx%2Bwes2zp%2BrMl71K3syO8%3D&maxresults=100&include=deleted&comp=list
URL in the browser and you will see that the browser responds will 400 status code.
Have you found a mitigation/solution?
Removing include=deleted
from the URL will show the correct blob listing. Following URL should work: http://127.0.0.1:10000/devstoreaccount1?sv=2020-02-10&ss=btqf&srt=sco&se=2021-03-06T14%3A31%3A37Z&sp=rwdxftlacup&sig=E6zJD7o7Ij577Uvphzddy%2BEx%2Bwes2zp%2BrMl71K3syO8%3D&maxresults=100&comp=list
This gets logged in debug.log file (please see the 4th line from bottom).
2021-02-19T14:31:42.104Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: BlobStorageContextMiddleware: RequestMethod=GET RequestURL=http://127.0.0.1/devstoreaccount1?sv=2020-02-10&ss=btqf&srt=sco&se=2021-03-06T14%3A31%3A37Z&sp=rwdxftlacup&sig=E6zJD7o7Ij577Uvphzddy%2BEx%2Bwes2zp%2BrMl71K3syO8%3D&maxresults=100&include=deleted&comp=list RequestHeaders:{"x-ms-version":"2020-02-10","user-agent":"azsdk-js-storageblob/12.3.0 (NODE-VERSION v12.18.3; Windows_NT 10.0.19042)","x-ms-client-request-id":"80922578-4825-4c94-ac45-03c39ad272cc","cookie":"","accept":"*/*","host":"127.0.0.1:10000","connection":"keep-alive"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-02-19T14:31:42.105Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=undefined Blob=
2021-02-19T14:31:42.105Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb verbose: DispatchMiddleware: Dispatching request...
2021-02-19T14:31:42.105Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: DispatchMiddleware: Operation=Service_ListContainersSegment
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: PublicAccessAuthenticator:validate() Start validation against public access.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: PublicAccessAuthenticator:validate() Getting account properties...
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: undefined, blob:
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: PublicAccessAuthenticator:validate() Skip public access authentication. Container name is undefined.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: BlobSharedKeyAuthenticator:validate() Request doesn't include valid authentication header. Skip shared key authentication.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Start validation against account Shared Access Signature pattern.
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Getting account properties...
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: undefined, blob:
2021-02-19T14:31:42.106Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Got account properties successfully.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Retrieved signature from URL parameter sig: E6zJD7o7Ij577Uvphzddy+Ex+wes2zp+rMl71K3syO8=
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Successfully got valid account SAS values from request. {"version":"2020-02-10","expiryTime":"2021-03-06T14:31:37Z","permissions":"rwdxftlacup","services":"btqf","resourceTypes":"sco"}
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Validate signature based account key1.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() String to sign is: "devstoreaccount1\nrwdxftlacup\nbtqf\nsco\n\n2021-03-06T14:31:37Z\n\n\n2020-02-10\n"
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Calculated signature is: E6zJD7o7Ij577Uvphzddy+Ex+wes2zp+rMl71K3syO8=
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Signature based on key1 validation passed.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Validate start and expiry time.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Validate IP range.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Validate request protocol.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb debug: AccountSASAuthenticator:validate() Got permission requirements for operation Service_ListContainersSegment - {"service":"b","resourceType":"s","permission":"l"}
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: AccountSASAuthenticator:validate() Account SAS validation successfully.
2021-02-19T14:31:42.107Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb verbose: DeserializerMiddleware: Start deserializing...
2021-02-19T14:31:42.109Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb error: ErrorMiddleware: Received a MiddlewareError, fill error information to HTTP response
2021-02-19T14:31:42.110Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb error: ErrorMiddleware: ErrorName=DeserializationError ErrorMessage=deleted is not a valid value for include. The valid values are: ["metadata"]. ErrorHTTPStatusCode=400 ErrorHTTPStatusMessage=undefined ErrorHTTPHeaders=undefined ErrorHTTPBody=undefined ErrorStack="Error: deleted is not a valid value for include. The valid values are: [\"metadata\"].\n at serializeEnumType (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\@azure\\ms-rest-js\\dist\\msRest.node.js:749:15)\n at Serializer.serialize (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\@azure\\ms-rest-js\\dist\\msRest.node.js:529:27)\n at Object.deserialize (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\utils\\serializer.js:25:25)\n at Object.deserializerMiddleware [as default] (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\middleware\\deserializer.middleware.js:29:18)\n at C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\ExpressMiddlewareFactory.js:62:46\n at Layer.handle [as handle_request] (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:317:13)\n at C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:284:7\n at Function.process_params (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:335:12)\n at next (C:\\Users\\gauravmantri\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:275:10)"
2021-02-19T14:31:42.110Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb error: ErrorMiddleware: Set HTTP code: 400
2021-02-19T14:31:42.110Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb error: ErrorMiddleware: Set HTTP body: undefined
2021-02-19T14:31:42.110Z 29a1b485-a3b7-41a4-a95f-225d937bb8cb info: EndMiddleware: End response. TotalTimeInMS=6 StatusCode=400 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.11.0"}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@gmantri Thanks for the reply!
We will try to fix the
include=deleted
not allowed problem in a release in the near future.For the doc not updated. I will check with doc team for when will it be updated.
The fix is released in Azurite v3.14.3.