总的来说,我对 Azure 和云服务非常陌生。我正在尝试在我的应用程序中使用 azure storage sdk ( https://github.com/Azure/azure-storage-cpp ),并尝试习惯它。我正在尝试运行测试以确保我正确构建了库。
查看自述文件,它说填写 test_configurations.json
文件,但我不知道应该填写什么或如何获取实际应该在其中的信息。我注册了免费的 Azure 帐户并创建了一个存储帐户,但我在控制台中的任何位置都没有看到 client_id、tenant_id 或客户端 key 。这是配置文件:
{
"target": "production",
"premium_target": "premium_account",
"blob_storage_target": "blob_storage_account",
"tenants": [
{
"name": "devstore",
"type": "devstore",
"connection_string": "UseDevelopmentStorage=true"
},
{
"name": "production",
"type": "cloud",
"connection_string": "DefaultEndpointsProtocol=https;"
},
{
"name": "premium_account",
"type": "cloud",
"connection_string": "DefaultEndpointsProtocol=https;"
},
{
"name": "blob_storage_account",
"type": "cloud",
"connection_string": "DefaultEndpointsProtocol=https;"
}
],
"token_information": {
"account_name": "",
"tenant_id": "",
"client_id": "",
"client_secret": "",
"resource": "https://storage.azure.com"
}
}
如何获取我需要的 ID 和 secret ?
最佳答案
您需要将应用程序注册为存储客户端,然后才能获取这些详细信息
如前所述here
The first step in using Azure AD to authorize access to storage resources is registering your client application with an Azure AD
关于azure - 我应该在 test_configurations.json 中填充哪些字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66974430/