-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to read SAS tokens from a .netrc-like file #1990
Comments
The first problem is obviously security. Authentication secrets should never, ever be used on the command line. Quoting https://learn.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-login
Also from https://github.com/Azure/azure-storage-azcopy/issues/new
|
A second problem is usability. Here's a typical filesystem browsing session in a typical command line:
etc. Here's what it becomes with
To save a lot of typing, users will naturally not type everything from scratch but edit the previous command. However this is still extremely cumbersome because it typically requires editing the file location located in the middle of the long URL. Removing |
Hi @marc-hb, we reviewed the issue and we've logged in our backlog. However, we would be prioritizing this low. Please use alternate methods of login for now. |
This page looks irrelevant for SAS tokens, can you confirm? |
Yes, if you've to perform repeated commands as you've shown above, SAS is rather not suited. |
Azure supports "Shared Access Signature" (SAS) authentication to grant "limited access to containers and blobs". This is a "least privilege" feature meant to improve security. Quoting
https://learn.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature
More from https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview
Unfortunately, it seems the only way to use SAS authentication with azcopy is by passing it on the command line (
?sig=
parameter in the URL). This causes at least two serious issues listed below, the first one being... security.In similar tools, these issues has been solved a long time ago by simply storing the token (or password) in a file. Examples:
https://everything.curl.dev/usingcurl/netrc
https://github.com/mirror/wget/blob/master/src/netrc.c
https://linux.die.net/man/5/netrc
https://www.ibm.com/docs/en/aix/7.1?topic=formats-netrc-file-format-tcpip
Feature request:
azcopy
should simply be able to do the same and read SAS tokens from either .netrc or from some other, new.azcopyAuth
file. Maybe such a new file could be managed by a new, interactiveazcopy login
feature that prompts the user for the token.cc:
Which version of the AzCopy was used?
10.16.2
Which platform are you using? (ex: Windows, Mac, Linux)
Irrelevant, this is a feature request.
The text was updated successfully, but these errors were encountered: