-
Notifications
You must be signed in to change notification settings - Fork 86
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
AzureStorageExplorer "Preserve Blob Tags" feature fails to detect permission issue, resulting in failed copy/paste across storage accounts #7482
Comments
@lmsurpre The "Detect" option has limitations when the credential doesn't clearly tell us if it has the necessary permission to paste tags (e.g. OAuth tokens, SAS token with access policy). We don't want to silently drop the tags due to permission issues because it may result in unexpected results for some users. In your case where we cannot tell the permissions, we should have shown a dialog asking you whether you want to attempt preserving tags or not. Please let us know if you didn't see the dialog. Right now the "Detect" option is mostly benefiting people using SAS tokens because it may suppress the dialog after parsing the SAS permissions. The error reporting is definitely something we should improve upon. |
I see that dialog in the case of The dialog in the Oauth case is the only reason I managed to figure out what the heck was going on (because it failed in a similar way to the SAS case with it checked but succeeded if I unchecked it). |
What's the permission of your SAS tokens in the case of UnexpectedQuit (used SAS, discovery not completed)? |
Sorry, but i'm not sure how to check that...i'm just using the Azure Storage Explorer "copy / paste" buttons and its creating the SAS token under the covers. Here is the azcopy commands it generated:
|
Oh, I guess that |
I see what's going on now. User delegation SAS delegates the authorization to the AAD service when the SAS token is used, which might be the issue here. Unfortunately in that case, there is no way for us to gauge whether we can preserve tags or not. We should try to make AzCopy improve error reporting in this scenario to better indicate what's going on. By the way, the next time you see the "Unexpected Quit" type of error, you may be able to find out more details in the AzCopy log. We offer a "Go to AzCopy logs" action on the activity, which opens AzCopy log directory. If you open it immediately after the failed job, the most recent log file will be for that job. |
I should try to see if we can make Storage Explorer detect user delegation SAS as credentials with unknown permissions. |
Starting from 1.33.0 Storage Explorer will treat user delegation SAS as credential with unknown permissions and prompt to let user pick whether to preserve tags on demand. |
Preflight Checklist
Storage Explorer Version
1.30.0 and above (reproduced in 1.32.0)
Regression From
1.29.2
Architecture
all (reproduced in x64 and amd64)
Storage Explorer Build Number
20231101.3
Platform
All
OS Version
No response
Bug Description
Copy/paste of blob from one storage account to another results in
UnexpectedQuit
.Two variants (depending on the properties of the target storage account:
The error is similar to #7014 but I think the real issue is that the
Detect
value for the "Preserve Blob Tags" setting is not working as designed.Steps to Reproduce
Given a user that has Storage Blob Data Contributor role (and not Data Owner) on 2 different storage accounts within a single subscription,
and the default AzureStorageExplorer "Preserve Blob Tags" value of "Detect":
Additionally, in my case, shared keys (aka access keys) are disabled in the source storage account (storage account A above).
Actual Experience
The Activites view shows that the azcopy command has failed with the cryptic "UnexpectedQuit" message.
Expected Experience
Given that description, I expect the copy/paste to work and for it to:
A. preserve tags if the user has permissions to the get/set tags API
B. not preserve tags if the user does not have this permission
Additionally, if this is expected to fail, then a clear error message that indicates which permission I'm missing would be nice.
Additional Context
No response
The text was updated successfully, but these errors were encountered: