question

UdayKiranReddyureddy-2664 avatar image
0 Votes"
UdayKiranReddyureddy-2664 asked UdayKiranReddyureddy-2664 commented

How to provide access to a Storage container in azure pipeline

I have created a storage account and set in private but kept accessible to all networks.
I am able to upload files there from azure portal with my account and created a container also there and uploaded a tar.gz file.

tar file

But when I am trying to access this in a azure pipeline task with my account.I am getting this error when selecting the container, even after authorization of storage account and selecting the relevant storage account.

Failed to query service connection API: 'https://martserverdependencies.blob.core.windows.net/?comp=list'. Status Code: 'Forbidden', Response from server: '<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:6a53a4b6-201e-006f-4357-c6af56000000 Time:2021-10-21T08:43:27.6754851Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request 'xrVvrgIUTVQjAEGCEcGonVrfpq9JzVRHRo9toNwVbOs=' is not the same as any computed signature. Server used following string to sign: 'GET x-ms-date:Thu, 21 Oct 2021 08:43:27 GMT x-ms-version:2017-04-17 /martserverdependencies/ comp:list'.</AuthenticationErrorDetail></Error>'

142406-image.png

Provided a read access policy also in that container section.
142405-image.png


azure-storage-accounts
image.png (87.5 KiB)
image.png (145.6 KiB)
image.png (76.1 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@UdayKiranReddyureddy-2664 Are using the SAS token to list the blobs?
142528-image.png

Is that the API that they are using? if yes, the container name is missing and restype=container is missing in API( I feel there is no detail of container)

Are you generating the SAS using stored access policy? so it's either Get Blob or List Blobs, since comp=list is mentioned, it is List Blobs

List Blobs REST API: https://docs.microsoft.com/en-us/rest/api/storageservices/list-blobs


0 Votes 0 ·
image.png (83.6 KiB)

Azure pipeline, inbuilt service by azure. While creating a task in it, java install is the task, we have option to authorize storage account and can able to select the storage account and then in the drop down of container, getting this error.

0 Votes 0 ·

0 Answers