Support setting Drive's `service_account_file` to a URL

It would be nice to be able to specify a URL to service_account_file so that rclone will fetch it from the remote server. It is useful to run rclone jobs between multiple servers and not have to copy the SA around.

Probably needs to support basic authentication as well, but most HTTP clients should already handle that.

This would also increase security, as we can use firewall to restrict access to those URLs, and not have to keep the SA credentials in the config file.


while not knowing your exact use-case, might write a simple script.

rclone copyurl .
rclone copy $source $dest --drive-service-account-file=sa.json
1 Like

Yep, I am doing something like that, but it'd be nice if rclone supports it directly, so it's one less script to carry around :smiley:

well, i guess it all depends on the definition of a script :wink:

rclone lsd gdrivesan: --drive-service-account-credentials="`rclone copyurl --stdout`"

Sure, but I don't think I want to remember to type all that, so all that would go to a script :smiley:

Whereas, all I would need is to put service_account_file= in rclone.conf and copy that config file everywhere I need, which I already have to anyway.

Then rclone copy source: target: as normal.

My point is that it's not hard to do what I want to achieve, but having that functionality built-in is a convenience.

With the core of rclone, I believe it's not hard to implement. I can also try to submit a PR for it if approved.

sure, submit a PR and join the many hundreds of other open PR.

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