0

I am using Azure Container apps with Azure Blob Store as a state store. It is a simple Hello World (weather service) app using dotnet 6. App starts up fine, on Post I am trying to save the generated weather information to Azure Blob Store as JSON. I have configured Dapr components in Azure Container Apps for StateStore using Azure blob storage. I am using storage key (secondary key) as explained in this Microsoft documentation

Upon doing a Swagger and looking at log I get the following error.

Dapr.DaprException: State operation failed: the Dapr endpoint indicated a failure. See InnerException for details. 2022-07-17T01:10:35.716245402Z ---> Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="failed saving state in state store statestore: -> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /home/vsts/work/1/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.10.0/azblob/zc_storage_error.go:42 2022-07-17T01:10:35.716524109Z ===== RESPONSE ERROR (ServiceCode=AuthenticationFailed) ===== 2022-07-17T01:10:35.716795515Z Description=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. 2022-07-17T01:10:35.716812515Z RequestId:863bcef4-401e-0069-5f7a-99724b000000 2022-07-17T01:10:35.716820115Z Time:2022-07-17T01:10:35.7137648Z, Details: 2022-07-17T01:10:35.716825516Z AuthenticationErrorDetail: Issuer validation failed. Issuer did not match. 2022-07-17T01:10:35.716831516Z Code: AuthenticationFailed

Error is Authentication Failed. I am unsure what I am missing since I am not making any additional config in storage account such as VNET service end point etc. Account is enabled for Key access. Any help is appreciated.

Below is the code that I am using

    using var client = new DaprClientBuilder().Build();


        var forecast = new WeatherForecast()
    {
        Date = DateTime.Now.AddDays(1),
        TemperatureC = Random.Shared.Next(-20, 55),
        Summary = Summaries[Random.Shared.Next(Summaries.Length)]
    };


        await client.SaveStateAsync<WeatherForecast>(stateStoreName,key,forecast);

Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

Vijay aravind
  • 183
  • 3
  • 14

1 Answers1

0

i think i found the answer. The issue was with metadata since the key set in metadata of the component.yaml as mentioned in the Microsoft documentation is not working. I changed it to use secretref and referred in metadata directly in the portal. Not sure why the error was showing Authentication error but it is finally working.

Vijay aravind
  • 183
  • 3
  • 14