Rclone and Azure Blob Storage SAS

May i know, if there is a way to use rclone and Azure Blob Storage with SAS token at Resource level (blob). Just not account level SAS URL or container level SAS URL.

Isn't that just a URL to the blob with a key in it to allow download?

I would have thought you could access that with the http backend or the copyurl command

Thanks for your time. I need to download/upload a file to a shared container by SAS Resource URL, where by i have access only to corresponding file not to the container.

I tried http backend to download a file using SAS resource url with no traverse and it fails. Same url works with copyurl, postman. I can use copyurl command for download. Looking options for upload.

example command:

rclone copy --no-traverse --http-url https://adbc.windows.net/test/debug1.log?sp=rl&st=2019-10-29T15:19:37Z&se=2019-10-30T15:19:37Z&sv=2019-02-02&sr=b&sig=Iud8r44TvquCc%2Bfne%2FuEXdo2N8G1x8wPV9gFai8PnnI%3D :http: /Users/pkwiz/Downloads -vv --dump bodies

2019/10/29 12:10:05 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2019/10/29 12:10:05 DEBUG : HTTP REQUEST (req 0xc000171e00)

2019/10/29 12:10:05 DEBUG : GET /test/debug1.log?sp=rl&st=2019-10-29T15:52:19Z&se=2019-10-30T15:52:19Z&sv=2019-02-02&sr=b&sig=2I9JWZp57GA%2BCvnobh5y2X41iaRh3lRmHUvyxJEVJf0%3D/ HTTP/1.1

Host: abdc.blob.core.windows.net

User-Agent: rclone/v1.49.5-DEV

Accept-Encoding: gzip

2019/10/29 12:10:05 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2019/10/29 12:10:05 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

2019/10/29 12:10:05 DEBUG : HTTP RESPONSE (req 0xc000171e00)

2019/10/29 12:10:05 DEBUG : HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

Content-Length: 408

Content-Type: application/xml

Date: Tue, 29 Oct 2019 16:09:56 GMT

Server: Microsoft-HTTPAPI/2.0

X-Ms-Error-Code: AuthenticationFailed

X-Ms-Request-Id: 0eb05d49-c01e-00f6-2373-8efc63000000

<?xml version="1.0" encoding="utf-8"?>AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

RequestId:0eb05d49-c01e-00f6-2373-8efc63000000

Time:2019-10-29T16:09:56.0277175ZSignature fields not well formed.

I'm not sure that you can get the http backend to copy a single file for you without a directory listing of the parent. I think you'll need rclone copyurl here.

1 Like

Thanks. Any suggestion for upload?

How do you do the upload? A POST to the URL? rclone doesn't have a mechanism for doing this at the moment.

yes. post to the url

I think rclone would need another command rclone posturl or something like that.

However there are a lot of variations in exactly how files get uploaded eg PUT/POST / with form encoding / Content-Length required etc.

You could use curl for this I think?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.