Azure Storage: Is there way to retrieve permission info from an SAS Url? -
Azure Storage: Is there way to retrieve permission info from an SAS Url? -
in func, sas token input. , need decide if delete permission granted token.
i tried parse way:
var permission = containersasurl.split('&').where(param => param.startswith("sp=")).toarray(); if (!permission[0].contains('d')) { throw new storageexception(string.format("unable delete files {0}, check storage permissions.", containersasurl)); }
but failed url has permission info embedded in access policies. like:
https://xxx.blob.core.windows.net/test?sr=c&sv=2014-02-14&si=downloadtoolpolicy&sig=nmczy2dn9uktwiap2qixqlsnzteyod%2faffgawdlfv7g%3d
any other route can work on?
unfortunately no, @ to the lowest degree checking if delete
permission included in sas. @ first thought seek deleting non-existent blob , grab exception , if sas token not have permission 403
error got 404
error in both scenarios i.e. when blob exists , not exist , sas token not have delete permission.
azure windows-azure-storage
Comments
Post a Comment