本文介绍了为blob存储容器生成SAS令牌(Powershell)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在查看文档后,它看起来非常直接,我得到了这一点:

az存储容器generate-sas --name" container_name" --connection-string" storage_account_connection_string" --https-only --permissions" w" --expiry" 2019-6-20T00:00Z"
$


此行导致我获得SAS令牌,但当我查看门户时我无法确认确实创建了一个。



当我尝试使用azcopy确实通过使用时确认这一点:
$
azcopy copy" file_path" " https://storage_account_name.blob.core.windows.net/container_name?SAS"



我确实得到:

身份验证失败,它不正确,或过期,或没有正确的权限。



AuthenticationErrorDetail:se是必需的。不能为空

   代码:AuthenticationFailed



RESPONSE状态:403服务器无法验证请求。确保授权标题的值正确形成,包括签名。



我想我错过了基本的东西,但我无法弄清楚是什么。

解决方案




After looking at the docs it seemed very stright forward, and I got to the point I have this line:
az storage container generate-sas --name "container_name" --connection-string "storage_account_connection_string" --https-only --permissions "w" --expiry "2019-6-20T00:00Z"

This line result in me getting a SAS token, but when i look in the portal I can not confirm one was indeed created.

When I try to use azcopy to indeed confirm this by using:
azcopy copy "file_path" "https://storage_account_name.blob.core.windows.net/container_name?SAS"

I indeed get:
Authentication failed, it is either not correct, or expired, or does not have the correct permission.

AuthenticationErrorDetail: se is mandatory. Cannot be empty
   Code: AuthenticationFailed

RESPONSE Status: 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

I guess I'm missing somthing basic but I can not figure out what.

解决方案




这篇关于为blob存储容器生成SAS令牌(Powershell)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 00:58