You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure returns 'AuthenticationFailed (403)' if calling copy_blob after create_blob_snapshot. If creating a new azure_client to call copy_blob, Azure returns success.
Error logs:
/var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/http_request.rb:150:in call': AuthenticationFailed (403): Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. (Azure::Core::Http::HTTPError) RequestId:54be9934-0001-0031-6c78-ef3e72000000 Time:2015-09-15T05:34:33.3173312Z from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/signer_filter.rb:28:incall'
from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/signer_filter.rb:28:in call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/http_request.rb:97:inblock in with_filter'
from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/service.rb:36:in call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/filtered_service.rb:34:incall'
from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/signed_service.rb:41:in call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/blob/blob_service.rb:1380:incall'
from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/blob/blob_service.rb:1209:in `copy_blob'
Azure returns 'AuthenticationFailed (403)' if calling copy_blob after create_blob_snapshot. If creating a new azure_client to call copy_blob, Azure returns success.
Code:
azure_client = Azure.client(storage_account_name: 'STORAGE-ACCOUNT', storage_access_key: 'STORAGE-KEY')
azure_client.storage_blob_host = 'https://STORAGE-ACCOUNT.blob.core.windows.net'
bs = azure_client.blobs
snapshot_time = bs.create_blob_snapshot(container_name, blob_name, {:metadata => metadata})
copy_id, copy_status = bs.copy_blob(container_name, snapshot_blob_name, container_name, blob_name, {:source_snapshot => snapshot_time})
Error logs:
/var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/http_request.rb:150:in
call': AuthenticationFailed (403): Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. (Azure::Core::Http::HTTPError) RequestId:54be9934-0001-0031-6c78-ef3e72000000 Time:2015-09-15T05:34:33.3173312Z from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/signer_filter.rb:28:incall'from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/signer_filter.rb:28:in
call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/http/http_request.rb:97:inblock in with_filter'from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/service.rb:36:in
call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/filtered_service.rb:34:incall'from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/core/signed_service.rb:41:in
call' from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/blob/blob_service.rb:1380:incall'from /var/lib/gems/1.9.1/gems/azure-0.7.0/lib/azure/blob/blob_service.rb:1209:in `copy_blob'