-
Notifications
You must be signed in to change notification settings - Fork 363
Description
Which service(blob, file, queue, table) does this issue concern?
Blob.
Which version of the Azurite was used?
3.26.0.
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
DockerHub.
What's the Node.js version?
N/A.
What problem was encountered?
Setting a blob's tags via the Set Blob Tags API endpoint changes the blob's ETag.
The official documentation states that setting a blob's tags should not modify the blob's ETag:
This operation doesn't update the ETag or last modified time of the blob.
We are building a solution that relies on the fact that we can update a blob's tags without changing the blob's ETag. A real storage account adheres to this, but Azurite seems not to.
Steps to reproduce the issue?
- Run Azurite locally.
- Create a container and a blob.
- Get blob properties and inspect ETag.
- Set blob tags.
- Get blob properties and inspect ETag. The ETag is now different from the one in step three.
I've written a Go program that showcases the issue
package main
import (
"context"
"fmt"
"os"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/appendblob"
blob2 "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob"
)
func main() {
if err := run(); err != nil {
fmt.Println(err)
os.Exit(1)
}
os.Exit(0)
}
func run() error {
cred, err := azblob.NewSharedKeyCredential("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==")
if err != nil {
return err
}
client, err := azblob.NewClientWithSharedKeyCredential("http://127.0.0.1:10000/devstoreaccount1", cred, &azblob.ClientOptions{})
if err != nil {
return err
}
_, err = client.CreateContainer(context.Background(), "flamingo", &azblob.CreateContainerOptions{})
if err != nil {
return err
}
blob := client.
ServiceClient().
NewContainerClient("flamingo").
NewAppendBlobClient("flamingo.txt")
createResponse, err := blob.Create(context.Background(), &appendblob.CreateOptions{})
if err != nil {
return err
}
fmt.Println(fmt.Sprintf("Etag after creation: %s", *createResponse.ETag))
propertiesResponse, err := blob.GetProperties(context.Background(), &blob2.GetPropertiesOptions{})
if err != nil {
return err
}
fmt.Println(fmt.Sprintf("Etag before setting tags: %s", *propertiesResponse.ETag))
fmt.Println("Setting tags")
_, err = blob.SetTags(context.Background(), map[string]string{"colour": "pink"}, &blob2.SetTagsOptions{})
if err != nil {
return err
}
propertiesResponse, err = blob.GetProperties(context.Background(), &blob2.GetPropertiesOptions{})
if err != nil {
return err
}
fmt.Println(fmt.Sprintf("Etag after setting tags: %s", *propertiesResponse.ETag))
return nil
}The program outputs:
Etag after creation: "0x2382396F57036C0"
Etag before setting tags: "0x2382396F57036C0"
Setting tags
Etag after setting tags: "0x244E35F69E95700"
Debug logs
2023-12-21T13:13:10.977Z info: Azurite Blob service is starting on 0.0.0.0:10000
2023-12-21T13:13:10.977Z info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2023-12-21T13:13:10.977Z info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2023-12-21T13:13:10.990Z info: BlobGCManager:start() Starting BlobGCManager. Set status to Initializing.
2023-12-21T13:13:10.990Z info: BlobGCManager:start() Trigger mark and sweep loop. Set status to Running.
2023-12-21T13:13:10.991Z info: BlobGCManager:markSweepLoop() Start next mark and sweep.
2023-12-21T13:13:10.991Z info: BlobGCManager:markSweep() Get all extents.
2023-12-21T13:13:10.991Z info: BlobGCManager:start() BlobGCManager successfully started.
2023-12-21T13:13:10.992Z info: BlobGCManager:markSweep() Got 0 extents.
2023-12-21T13:13:10.992Z info: BlobGCManager:markSweep() Get referred extents.
2023-12-21T13:13:10.992Z info: BlobGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2023-12-21T13:13:10.992Z info: BlobGCManager:markSweepLoop() Mark and sweep finished, taken 1ms.
2023-12-21T13:13:10.992Z info: BlobGCManager:markSweepLoop() Sleep for 600000ms.
2023-12-21T13:13:10.993Z info: Azurite Blob service successfully listens on http://0.0.0.0:10000
2023-12-21T13:13:18.543Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobStorageContextMiddleware: RequestMethod=PUT RequestURL=http://127.0.0.1/devstoreaccount1/flamingo?restype=container RequestHeaders:{"host":"127.0.0.1:10000","user-agent":"azsdk-go-azblob/v1.1.0 (go1.21.0; darwin)","content-length":"0","accept":"application/xml","authorization":"SharedKey devstoreaccount1:AZSZ0jbOqVXOlPXTiSlrhjSUEMmoRHA7QutNP/5K06w=","x-ms-date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-version":"2020-10-02","accept-encoding":"gzip"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
2023-12-21T13:13:18.544Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=flamingo Blob=
2023-12-21T13:13:18.545Z d89c1764-53c9-460c-ac54-bed89c54c634 verbose: DispatchMiddleware: Dispatching request...
2023-12-21T13:13:18.549Z d89c1764-53c9-460c-ac54-bed89c54c634 info: DispatchMiddleware: Operation=Container_Create
2023-12-21T13:13:18.551Z d89c1764-53c9-460c-ac54-bed89c54c634 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-12-21T13:13:18.551Z d89c1764-53c9-460c-ac54-bed89c54c634 info: PublicAccessAuthenticator:validate() Start validation against public access.
2023-12-21T13:13:18.551Z d89c1764-53c9-460c-ac54-bed89c54c634 debug: PublicAccessAuthenticator:validate() Getting account properties...
2023-12-21T13:13:18.552Z d89c1764-53c9-460c-ac54-bed89c54c634 debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: flamingo, blob:
2023-12-21T13:13:18.559Z d89c1764-53c9-460c-ac54-bed89c54c634 debug: PublicAccessAuthenticator:validate() Skip public access authentication. Cannot get public access type for container flamingo
2023-12-21T13:13:18.559Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2023-12-21T13:13:18.582Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobSharedKeyAuthenticator:validate() [STRING TO SIGN]:"PUT\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Thu, 21 Dec 2023 13:13:18 GMT\nx-ms-version:2020-10-02\n/devstoreaccount1/devstoreaccount1/flamingo\nrestype:container"
2023-12-21T13:13:18.582Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobSharedKeyAuthenticator:validate() Calculated authentication header based on key1: SharedKey devstoreaccount1:AZSZ0jbOqVXOlPXTiSlrhjSUEMmoRHA7QutNP/5K06w=
2023-12-21T13:13:18.582Z d89c1764-53c9-460c-ac54-bed89c54c634 info: BlobSharedKeyAuthenticator:validate() Signature 1 matched.
2023-12-21T13:13:18.582Z d89c1764-53c9-460c-ac54-bed89c54c634 verbose: DeserializerMiddleware: Start deserializing...
2023-12-21T13:13:18.584Z d89c1764-53c9-460c-ac54-bed89c54c634 info: HandlerMiddleware: DeserializedParameters={"options":{"metadata":{},"containerCpkScopeInfo":{}},"restype":"container","version":"2020-10-02"}
2023-12-21T13:13:18.585Z d89c1764-53c9-460c-ac54-bed89c54c634 verbose: SerializerMiddleware: Start serializing...
2023-12-21T13:13:18.586Z d89c1764-53c9-460c-ac54-bed89c54c634 info: EndMiddleware: End response. TotalTimeInMS=43 StatusCode=201 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.26.0","etag":"\"0x1F883A7A98CF660\"","last-modified":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-request-id":"d89c1764-53c9-460c-ac54-bed89c54c634","x-ms-version":"2023-08-03"}
2023-12-21T13:13:18.589Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobStorageContextMiddleware: RequestMethod=PUT RequestURL=http://127.0.0.1/devstoreaccount1/flamingo/flamingo.txt RequestHeaders:{"host":"127.0.0.1:10000","user-agent":"azsdk-go-azblob/v1.1.0 (go1.21.0; darwin)","content-length":"0","accept":"application/xml","authorization":"SharedKey devstoreaccount1:OmZobbzFTzbZpqJZCJMqVefc+GsQQuHCrUiZ4rFtY+U=","x-ms-date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-blob-type":"AppendBlob","x-ms-version":"2020-10-02","accept-encoding":"gzip"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
2023-12-21T13:13:18.590Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=flamingo Blob=flamingo.txt
2023-12-21T13:13:18.590Z 1ae162c9-c012-4315-b673-4c36adc23bd7 verbose: DispatchMiddleware: Dispatching request...
2023-12-21T13:13:18.590Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: DispatchMiddleware: Operation=AppendBlob_Create
2023-12-21T13:13:18.591Z 1ae162c9-c012-4315-b673-4c36adc23bd7 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-12-21T13:13:18.591Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: PublicAccessAuthenticator:validate() Start validation against public access.
2023-12-21T13:13:18.591Z 1ae162c9-c012-4315-b673-4c36adc23bd7 debug: PublicAccessAuthenticator:validate() Getting account properties...
2023-12-21T13:13:18.591Z 1ae162c9-c012-4315-b673-4c36adc23bd7 debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: flamingo, blob: flamingo.txt
2023-12-21T13:13:18.592Z 1ae162c9-c012-4315-b673-4c36adc23bd7 debug: PublicAccessAuthenticator:validate() Skip public access authentication. Cannot get public access type for container flamingo
2023-12-21T13:13:18.592Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2023-12-21T13:13:18.592Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobSharedKeyAuthenticator:validate() [STRING TO SIGN]:"PUT\n\n\n\n\n\n\n\n\n\n\n\nx-ms-blob-type:AppendBlob\nx-ms-date:Thu, 21 Dec 2023 13:13:18 GMT\nx-ms-version:2020-10-02\n/devstoreaccount1/devstoreaccount1/flamingo/flamingo.txt"
2023-12-21T13:13:18.593Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobSharedKeyAuthenticator:validate() Calculated authentication header based on key1: SharedKey devstoreaccount1:OmZobbzFTzbZpqJZCJMqVefc+GsQQuHCrUiZ4rFtY+U=
2023-12-21T13:13:18.593Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: BlobSharedKeyAuthenticator:validate() Signature 1 matched.
2023-12-21T13:13:18.593Z 1ae162c9-c012-4315-b673-4c36adc23bd7 verbose: DeserializerMiddleware: Start deserializing...
2023-12-21T13:13:18.593Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: HandlerMiddleware: DeserializedParameters={"options":{"metadata":{},"blobHTTPHeaders":{},"leaseAccessConditions":{},"cpkInfo":{},"cpkScopeInfo":{},"modifiedAccessConditions":{}},"contentLength":0,"version":"2020-10-02","blobType":"AppendBlob"}
2023-12-21T13:13:18.594Z 1ae162c9-c012-4315-b673-4c36adc23bd7 verbose: SerializerMiddleware: Start serializing...
2023-12-21T13:13:18.594Z 1ae162c9-c012-4315-b673-4c36adc23bd7 info: EndMiddleware: End response. TotalTimeInMS=5 StatusCode=201 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.26.0","etag":"\"0x2382396F57036C0\"","last-modified":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-request-id":"1ae162c9-c012-4315-b673-4c36adc23bd7","x-ms-version":"2023-08-03","date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-request-server-encrypted":"true"}
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobStorageContextMiddleware: RequestMethod=HEAD RequestURL=http://127.0.0.1/devstoreaccount1/flamingo/flamingo.txt RequestHeaders:{"host":"127.0.0.1:10000","user-agent":"azsdk-go-azblob/v1.1.0 (go1.21.0; darwin)","accept":"application/xml","authorization":"SharedKey devstoreaccount1:gIkJxXyOMTXYdZFC0T66tjn8mbYtQsuQr1Zx/77npVQ=","x-ms-date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-version":"2020-10-02"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=flamingo Blob=flamingo.txt
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 verbose: DispatchMiddleware: Dispatching request...
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: DispatchMiddleware: Operation=Blob_GetProperties
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: PublicAccessAuthenticator:validate() Start validation against public access.
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 debug: PublicAccessAuthenticator:validate() Getting account properties...
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: flamingo, blob: flamingo.txt
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 debug: PublicAccessAuthenticator:validate() Skip public access authentication. Cannot get public access type for container flamingo
2023-12-21T13:13:18.596Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobSharedKeyAuthenticator:validate() [STRING TO SIGN]:"HEAD\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Thu, 21 Dec 2023 13:13:18 GMT\nx-ms-version:2020-10-02\n/devstoreaccount1/devstoreaccount1/flamingo/flamingo.txt"
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobSharedKeyAuthenticator:validate() Calculated authentication header based on key1: SharedKey devstoreaccount1:gIkJxXyOMTXYdZFC0T66tjn8mbYtQsuQr1Zx/77npVQ=
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: BlobSharedKeyAuthenticator:validate() Signature 1 matched.
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 verbose: DeserializerMiddleware: Start deserializing...
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: HandlerMiddleware: DeserializedParameters={"options":{"leaseAccessConditions":{},"cpkInfo":{},"modifiedAccessConditions":{}},"version":"2020-10-02"}
2023-12-21T13:13:18.597Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 verbose: SerializerMiddleware: Start serializing...
2023-12-21T13:13:18.598Z 01b8a9da-1ea8-4a2e-87df-18acb0863533 info: EndMiddleware: End response. TotalTimeInMS=2 StatusCode=200 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.26.0","last-modified":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-creation-time":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-blob-type":"AppendBlob","x-ms-lease-state":"available","x-ms-lease-status":"unlocked","content-length":"0","content-type":"application/octet-stream","etag":"\"0x2382396F57036C0\"","x-ms-request-id":"01b8a9da-1ea8-4a2e-87df-18acb0863533","x-ms-version":"2023-08-03","date":"Thu, 21 Dec 2023 13:13:18 GMT","accept-ranges":"bytes","x-ms-blob-committed-block-count":"0","x-ms-server-encrypted":"true"}
2023-12-21T13:13:18.599Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobStorageContextMiddleware: RequestMethod=PUT RequestURL=http://127.0.0.1/devstoreaccount1/flamingo/flamingo.txt?comp=tags RequestHeaders:{"host":"127.0.0.1:10000","user-agent":"azsdk-go-azblob/v1.1.0 (go1.21.0; darwin)","content-length":"116","accept":"application/xml","authorization":"SharedKey devstoreaccount1:8fEyaWIZCA4ZWUpWvO8Cjii8R4KPk/MZMFIITVBrIUs=","content-type":"application/xml","x-ms-date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-version":"2020-10-02","accept-encoding":"gzip"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
2023-12-21T13:13:18.599Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=flamingo Blob=flamingo.txt
2023-12-21T13:13:18.599Z b0b8671f-5fbf-4164-b954-720ddefbc1fc verbose: DispatchMiddleware: Dispatching request...
2023-12-21T13:13:18.600Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: DispatchMiddleware: Operation=Blob_SetTags
2023-12-21T13:13:18.600Z b0b8671f-5fbf-4164-b954-720ddefbc1fc verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-12-21T13:13:18.600Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: PublicAccessAuthenticator:validate() Start validation against public access.
2023-12-21T13:13:18.600Z b0b8671f-5fbf-4164-b954-720ddefbc1fc debug: PublicAccessAuthenticator:validate() Getting account properties...
2023-12-21T13:13:18.600Z b0b8671f-5fbf-4164-b954-720ddefbc1fc debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: flamingo, blob: flamingo.txt
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc debug: PublicAccessAuthenticator:validate() Skip public access authentication. Cannot get public access type for container flamingo
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobSharedKeyAuthenticator:validate() [STRING TO SIGN]:"PUT\n\n\n116\n\napplication/xml\n\n\n\n\n\n\nx-ms-date:Thu, 21 Dec 2023 13:13:18 GMT\nx-ms-version:2020-10-02\n/devstoreaccount1/devstoreaccount1/flamingo/flamingo.txt\ncomp:tags"
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobSharedKeyAuthenticator:validate() Calculated authentication header based on key1: SharedKey devstoreaccount1:8fEyaWIZCA4ZWUpWvO8Cjii8R4KPk/MZMFIITVBrIUs=
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: BlobSharedKeyAuthenticator:validate() Signature 1 matched.
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc verbose: DeserializerMiddleware: Start deserializing...
2023-12-21T13:13:18.601Z b0b8671f-5fbf-4164-b954-720ddefbc1fc debug: deserialize(): Raw request body string is (removed all empty characters) <?xmlversion="1.0"encoding="UTF-8"?><Tags><TagSet><Tag><Key>colour</Key><Value>pink</Value></Tag></TagSet></Tags>
2023-12-21T13:13:18.605Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: HandlerMiddleware: DeserializedParameters={"options":{"modifiedAccessConditions":{},"leaseAccessConditions":{},"tags":{"blobTagSet":[{"key":"colour","value":"pink"}],"TagSet":{"Tag":{"Key":"colour","Value":"pink"}}}},"comp":"tags","version":"2020-10-02","body":"ReadableStream"}
2023-12-21T13:13:18.605Z b0b8671f-5fbf-4164-b954-720ddefbc1fc verbose: SerializerMiddleware: Start serializing...
2023-12-21T13:13:18.606Z b0b8671f-5fbf-4164-b954-720ddefbc1fc info: EndMiddleware: End response. TotalTimeInMS=7 StatusCode=204 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.26.0","x-ms-request-id":"b0b8671f-5fbf-4164-b954-720ddefbc1fc","x-ms-version":"2023-08-03","date":"Thu, 21 Dec 2023 13:13:18 GMT"}
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobStorageContextMiddleware: RequestMethod=HEAD RequestURL=http://127.0.0.1/devstoreaccount1/flamingo/flamingo.txt RequestHeaders:{"host":"127.0.0.1:10000","user-agent":"azsdk-go-azblob/v1.1.0 (go1.21.0; darwin)","accept":"application/xml","authorization":"SharedKey devstoreaccount1:gIkJxXyOMTXYdZFC0T66tjn8mbYtQsuQr1Zx/77npVQ=","x-ms-date":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-version":"2020-10-02"} ClientIP=172.17.0.1 Protocol=http HTTPVersion=1.1
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobStorageContextMiddleware: Account=devstoreaccount1 Container=flamingo Blob=flamingo.txt
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 verbose: DispatchMiddleware: Dispatching request...
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: DispatchMiddleware: Operation=Blob_GetProperties
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: PublicAccessAuthenticator:validate() Start validation against public access.
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 debug: PublicAccessAuthenticator:validate() Getting account properties...
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 debug: PublicAccessAuthenticator:validate() Retrieved account name from context: devstoreaccount1, container: flamingo, blob: flamingo.txt
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 debug: PublicAccessAuthenticator:validate() Skip public access authentication. Cannot get public access type for container flamingo
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobSharedKeyAuthenticator:validate() Start validation against account shared key authentication.
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobSharedKeyAuthenticator:validate() [STRING TO SIGN]:"HEAD\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Thu, 21 Dec 2023 13:13:18 GMT\nx-ms-version:2020-10-02\n/devstoreaccount1/devstoreaccount1/flamingo/flamingo.txt"
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobSharedKeyAuthenticator:validate() Calculated authentication header based on key1: SharedKey devstoreaccount1:gIkJxXyOMTXYdZFC0T66tjn8mbYtQsuQr1Zx/77npVQ=
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: BlobSharedKeyAuthenticator:validate() Signature 1 matched.
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 verbose: DeserializerMiddleware: Start deserializing...
2023-12-21T13:13:18.607Z 94218039-01f7-4630-bd77-534715a1f3e4 info: HandlerMiddleware: DeserializedParameters={"options":{"leaseAccessConditions":{},"cpkInfo":{},"modifiedAccessConditions":{}},"version":"2020-10-02"}
2023-12-21T13:13:18.608Z 94218039-01f7-4630-bd77-534715a1f3e4 verbose: SerializerMiddleware: Start serializing...
2023-12-21T13:13:18.608Z 94218039-01f7-4630-bd77-534715a1f3e4 info: EndMiddleware: End response. TotalTimeInMS=1 StatusCode=200 StatusMessage=undefined Headers={"server":"Azurite-Blob/3.26.0","last-modified":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-creation-time":"Thu, 21 Dec 2023 13:13:18 GMT","x-ms-blob-type":"AppendBlob","x-ms-lease-state":"available","x-ms-lease-status":"unlocked","content-length":"0","content-type":"application/octet-stream","etag":"\"0x244E35F69E95700\"","x-ms-request-id":"94218039-01f7-4630-bd77-534715a1f3e4","x-ms-version":"2023-08-03","date":"Thu, 21 Dec 2023 13:13:18 GMT","accept-ranges":"bytes","x-ms-blob-committed-block-count":"0","x-ms-server-encrypted":"true","x-ms-tag-count":"1"}
For reference, I am running Azurite locally with this command:
docker run -p 10000:10000 -v /Users/lasse.hels/azurite:/workspace mcr.microsoft.com/azure-storage/azurite:3.26.0 azurite-blob --blobHost 0.0.0.0 -l /workspace -d /workspace/debug.log
Have you found a mitigation/solution?
No.
This issue is not a dealbreaker for us, as our solution does work when run against a real storage account. Azurite's behaviour is preventing us from writing automated tests for some functionality that we would like to test.
We are pleased that Azurite exists and are happy to use it in general. Thanks.