【发布时间】:2021-08-18 03:27:28
【问题描述】:
我想在我的 AKS pod 中使用用户管理的身份来通过 Azure Computer Vision OCR API 进行身份验证。
托管标识已创建,我可以在 azure 门户中看到托管标识
{
"id": "/subscriptions/.../userAssignedIdentities/my-msi",
"name": "my-msi",
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
"location": "westeurope",
"tags": {},
"properties": {
"tenantId": "<tenant id>",
"principalId": "<principle id>",
"clientId": "<client id>"
}
}
并且托管标识对具有端点的认知服务资源具有“认知服务参与者”角色https://<my-custom-sub-domain>.cognitiveservices.azure.com/
现在,在我在 AKS pod 中运行的 python 应用程序中(已经有正确的aadpodbinding 标签)我想发送一个 POST 请求到
https://<my-custom-sub-domain>.cognitiveservices.azure.com/vision/v3.2/read/analyze
带有要应用 OCR 的 PDF 图像。
不幸的是,Cognitive Services documentation 上没有太多关于如何做到这一点的描述
我正在寻找类似于this one for authentication against key vault using managed identity的python示例
【问题讨论】:
标签: azure azure-managed-identity