none
I Can't change public access type of a blob from OFF to CONTAINER using a valid sas token.

    Întrebare

  • Hello,

    I'm facing an issue with azure blob java sdk. (it's maybe a new restriction or a regression).
    When i create an azure blob with public access OFF using a sas token. I can't upload new permissions with CONTAINER public access type using the same valid sas token. This workflow worked fine before.

    i'm getting this exception :

    Caused by: com.microsoft.azure.storage.StorageException: This request is not authorized to perform this operation.
    	at com.microsoft.azure.storage.StorageException.translateException(StorageException.java:89)
    	at com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
    	at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:175)
    	at com.microsoft.azure.storage.blob.CloudBlobContainer.uploadPermissions(CloudBlobContainer.java:1842)
    	at com.microsoft.azure.storage.blob.CloudBlobContainer.uploadPermissions(CloudBlobContainer.java:1806)

    Was this changed recently ? Or am i missing something here ?

    luni, 9 iulie 2018 09:01

Toate mesajele

  • What permissions do you have on the storage account?

    Are you using an account SAS or a service SAS?
    luni, 9 iulie 2018 15:54
    Moderator
  • i'm using a service SAS and i have checked all the allowed permissions.

    i have created the blob using the same sas with access type off and now i can't change that to container access type using java sdk and same sas that still valid of course.
    marți, 10 iulie 2018 08:58
  • You can't do container related operations (with the exception of listing blobs) using Shared Access Signature. You would need to use account key for performing operations on a container.

    Supported operations using shared access signatures include:

    . Reading and writing page or block blob content, block lists, properties, and metadata

    . Deleting, leasing, and creating a snapshot of a blob

    . Listing the blobs within a container

    marți, 10 iulie 2018 18:46
    Moderator
  • @Khabali:

    Just checking in to see if the above suggestions helped or you need further assistance on this issue.

    vineri, 13 iulie 2018 22:09
    Moderator