-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Copy blobs with AD auth #25478
Comments
Hi @tamirkamara Tamir, thanks for reaching out. When doing copy operations using AAD with the Python SDK, you need to generate the OAuth token yourself and provide it to the from azure.identity import DefaultAzureCredential
from azure.storage.blob import BlobServiceClient
credential = DefaultAzureCredential()
...
# Requesting a token to the Storage resource
token = "Bearer {}".format(credential.get_token("https://storage.azure.com/.default").token)
# Note: OAuth copy is only supported currently for sync copy so you need requires_sync=True
copy = destination_blob.start_copy_from_url(source_blob_url, source_authorization=token, requires_sync=True) Hopefully this helps resolve your issue but please let me know if it does not. Thanks. |
Thanks @jalauzon-msft. |
Hi @tamirkamara Tamir, unfortunately this is a service limitation. For some reason only the Copy Blob From URL operations support AAD auth while Copy Blob does not. This is sort of what the I think this may actually be a more severe limitation for you since it actually only supports blobs up to 256 MiB. If you are trying to copy a blob larger, there does not seem to be a way to do it with AAD auth currently using, standard copy operations. AzCopy uses a different mechanism for copying blobs where it uses a series of Put Block from URL calls and then a final Put Block List. Put Block from URL supports AAD auth (via the same |
[Hub Generated] Review request for Microsoft.ContainerService/aks to add version stable/2023-08-01 (Azure#25633) * Adds base for updating Microsoft.ContainerService/aks from version stable/2023-07-01 to version 2023-08-01 * Updates readme * Updates API version in new specs and examples * update (Azure#25468) * Adding Azure Service Mesh and related changes. (Azure#25482) * Adding Azure Service Mesh and related changes. * Fix a typo with api version in examples * fix a bug with egressGayeways for Istio * add resourceuid field to managed cluster properties (Azure#25478) * Adding examples for AzureServiceMesh (Azure#25535) * Adding an example for AzureServiceMesh * remove unneeded adonprofiles object * Adding ingressGateway to the ASM example. * Adding egressGateways to IstioComponents * Add egressGateways to the request payload. * Add BYO CA object to ServiceMeshProfile example * Fix resource id format for Azure keyvault * Enrich ASM examples (Azure#25597) * add asm- prefix to upgrades field on mesh ops (Azure#25601) --------- Co-authored-by: deveshdama <87668846+deveshdama@users.noreply.github.com> Co-authored-by: daru__ <ptd2108@columbia.edu> Co-authored-by: Sanya Kochhar <42152676+SanyaKochhar@users.noreply.github.com>
Hi @tamirkamara, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Describe the bug
Copying blobs between accounts doesn't work with AD Auth - returns error:
CannotVerifyCopySource
.I tried other tools like azcopy and saw that this same action works correctly there (without any download/reupload or accessing the account keys to generate SAS).
To Reproduce
Steps to reproduce the behavior:
Storage Blob Data Contributor
on both accountsCannotVerifyCopySource
errorExpected behavior
The copy operation should be submitted successfully (just as if I was using SAS)
The text was updated successfully, but these errors were encountered: