c# - Azure 云存储凭据的保存位置

标签 c# asp.net azure azure-storage

我构建了一个 REST-API,它将图像上传到我的 Azure 存储容器。我的 azure 存储容器有一个访问 key ,我在 POST 方法中使用它,如下所示:

 StorageCredentials storageCredentials = new StorageCredentials("[storage]", "[key]");

现在我想将我的服务部署到 azure 云 - 但我不知道如何使用 POST 方法中的明文访问 key 来管理安全问题。

Where should I save sensitive data like this? Or are my worries wrong and this is not an issue?

信息: REST-API 是一个 ASP.NET Web API 项目

最佳答案

Azure portal => your web app => Configuration => Application Settings

这是最简单的。

您还可以使用 key 保管库,但应用程序设置是迄今为止最简单的,非常适合这种情况。

For ASP.NET and ASP.NET Core developers, setting app settings in App Service are like setting them in in Web.config or appsettings.json, but the values in App Service override the ones in Web.config or appsettings.json

您可以在这里阅读更多相关信息:https://learn.microsoft.com/bs-latn-ba/azure/app-service/configure-common

enter image description here

关于c# - Azure 云存储凭据的保存位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58781672/

相关文章:

c# - 如何使用字典的复合键?

c# - 跨子域的表单例份验证

node.js - 如何通过 Javascript (node.js) 生成 Azure SAS token

azure - Terraform 删除应用程序网关入口 Controller (AGIC) 创建的配置/资源

c# - 不懂 IEnumerable<T>

c# - 使用 LINQ 返回匹配条件的数组索引的简洁方法

java - Java 中的 AES 加密与 C# 输出相匹配

asp.net - 什么是经常损坏的 app_offline.htm hack 的建议替代方案?

javascript - 在本地或外部引用 javascript 库?

Azure:无法检索用户的个人资料照片并上传到 Azure Blob 存储