Skip to content
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

Encounter 403 error if source is a snapshot #2547

Closed
ChoiSD opened this issue Jan 22, 2024 · 2 comments
Closed

Encounter 403 error if source is a snapshot #2547

ChoiSD opened this issue Jan 22, 2024 · 2 comments
Assignees

Comments

@ChoiSD
Copy link

ChoiSD commented Jan 22, 2024

Which version of the AzCopy was used?

 .\azcopy.exe --version
azcopy version 10.22.2

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

Copy blob from a snapshot to a disk in blob container

.\azcopy cp "https://md-xxxxx.xxx.blob.storage.azure.net/xxxx/abcd?snapshot=2024-01-05T01%3A00%3A00.0000000Z&sv=2018-11-09&sr=bs&si=xxxx&sig=xxxx" "https://targetsa.blob.core.windows.net/cont/dest.vhd?sp=racwl&st=2024-01-22T01:38:06Z&se=2024-01-22T09:38:06Z&spr=https&sv=2022-11-02&sr=c&sig=xxxx"

What problem was encountered?

INFO: Scanning...

failed to perform copy command due to error: unexpected response for managed disk authorization check: HEAD https://md-xxxxx.xxx.blob.storage.azure.net/xxxx/abcd
--------------------------------------------------------------------------------
RESPONSE 403: 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ERROR CODE: AuthenticationFailed
--------------------------------------------------------------------------------
Response contained no body
--------------------------------------------------------------------------------

How can we reproduce the problem in the simplest way?

Export a snapshot and copy into any blob location

Have you found a mitigation/solution?

Use AzCopy v10.15.0 instead

Additional information

The 403 error is returned in credentialUtil.go:193 and storage server responds with 403 error because snapshot paramter is missing in URL request.
The snapshot parameter in source URL is split into ExtraQuery SplitResourceString and is not delivered to blobClient.

@ChoiSD
Copy link
Author

ChoiSD commented Jan 22, 2024

It looks like this issue is already being addressed in PR#2542.

@ChoiSD
Copy link
Author

ChoiSD commented Feb 6, 2024

This issue is resolved in v10.23.0.

> .\azcopy.exe --version
azcopy version 10.23.0

> .\azcopy.exe cp "https://md-xxxx.z8.blob.storage.azure.net/xxxx/abcd?sv=2018-03-28&sr=b&si=80f99841-c48d-48b6-82b5-24a68d88be5d&sig=xxxx" "https://xxxx.blob.core.windows.net/xxxx/xxxx.vhd?sp=racw&st=2024-02-06T01:07:14Z&se=2024-02-06T09:07:14Z&spr=https&sv=2022-11-02&sr=c&sig=xxxx"

...
Number of File Transfers: 1
Number of Folder Property Transfers: 0
Number of Symlink Transfers: 0
Total Number of Transfers: 1
Number of File Transfers Completed: 1
Number of Folder Transfers Completed: 0
Number of File Transfers Failed: 0
Number of Folder Transfers Failed: 0
Number of File Transfers Skipped: 0
Number of Folder Transfers Skipped: 0
TotalBytesTransferred: 32212255232
Final Job Status: Completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants