- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想要获取对 blob 的引用并为其生成 SAS URL。
如何?不暴露我的存储帐户 key ?
我尝试过什么?使用 SAS(Blob 容器或存储帐户)获取对 Blob 的引用。我的引用资料:https://learn.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1?toc=%2fazure%2fstorage%2fblobs%2ftoc.json
我看到的异常:“除非使用帐户 key 凭据,否则无法创建共享访问签名”
但我(显然)不想暴露我的帐户 key !这可能吗?如果不行的话还有其他办法吗?
最佳答案
简而言之:不,除了使用其中一个键之外,没有其他方法可以做到这一点。您需要访问 key 之一才能创建 SAS token 。以下是您无法使用现有 SAS token 执行此操作的原因:
The signature is an HMAC computed over the string-to-sign and key using the SHA256 algorithm, and then encoded using Base64 encoding.
这意味着作为 SAS token 一部分的签名是一个计算值。该计算的一部分基于(其中一个) key ,因为它用于计算不可逆哈希值。该哈希值不可逆的事实意味着您无法检索用于计算哈希值的访问 key 。因此,您无法使用 SAS token 创建另一个 SAS token :您没有可用于计算签名的访问 key 。
When you create a storage account, you get two storage access keys, which provide full control over the storage account contents. These keys are admin credentials.
关于c# - 使用 SAS 生成 blob sasurl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46466356/
我想要获取对 blob 的引用并为其生成 SAS URL。 如何?不暴露我的存储帐户 key ? 我尝试过什么?使用 SAS(Blob 容器或存储帐户)获取对 Blob 的引用。我的引用资料:http
我是一名优秀的程序员,十分优秀!