Azure / Azure/Azurite

unable to create blob: Server failed to authenticate request

Open
#629 11 comments 0 reactions 1 assignee Claimed by @Poku8 View on GitHub
blob-storage NewArch question sdk stale
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
blob
### Which version of the Azurite was used?
3.9.0
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
DockerHub

### What problem was encountered?
```
22:01:12.967 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:12 +0000] "GET /devstoreaccount1/dbvvehiclefiles?restype=container HTTP/1.1" 404 -
22:01:12.984 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:12 +0000] "PUT /devstoreaccount1/dbvvehiclefiles?restype=container HTTP/1.1" 201 -
22:01:12.998 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:12 +0000] "HEAD /devstoreaccount1/dbvvehiclefiles/vnext-202011161001129.xml HTTP/1.1" 404 -
22:01:13.034 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:13 +0000] "PUT /devstoreaccount1/dbvvehiclefiles/vnext-202011161001129.xml HTTP/1.1" 403

...

Caused by: com.azure.storage.blob.models.BlobStorageException: Status code 403, "

AuthorizationFailure
Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.
RequestId:0b02a5b3-f84b-4ca0-92c2-164bb75213e2
Time:2020-11-16T22:01:13.032Z

```

As you can see, I am able to create a container but I am not able to write to the blob in the previously created container.

Later in my tests, I am able to do some cleanups:
```
22:01:13.076 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:13 +0000] "GET /devstoreaccount1/dbvvehiclefiles?restype=container HTTP/1.1" 200 -
22:01:13.098 INFO STDOUT: 172.17.0.1 - - [16/Nov/2020:22:01:13 +0000] "DELETE /devstoreaccount1/dbvvehiclefiles?restype=container HTTP/1.1" 202 -
```

Since some operations are working, I infer that the credentials are transmitted well into the request.

### Steps to reproduce the issue?
I'm trying to use Azurite with the Java SDK in order to run some integration tests with docker and testcontainers java library.
Those tests are running just fine on the local machine but, as soon as I execute them in the CI environment (gitlab), I run into "AuthorizationFailure".

The only difference I can see is that in CI environment I have a proxy configuration.

I'm not able to get the error logs from the Azurite server as it runs in a Docker container on the CI platform and it is destroyed right after the pipeline fails. So, if you can suggest a method to bring them up to the console, I would be happy to implement it.

### Have you found a mitigation/solution?
No

Any ideas about what's going wrong?

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.