小编Eva*_*han的帖子

使用 AKS 中的用户管理标识、Python SDK 时出现 AzureBlobStorage AuthorizationPermissionMismatch 错误

我正在 AKS 中运行 Python 应用程序(作为作业,但并不重要),使用 Azure Python SDK 访问 blob 存储。我使用用户管理身份进行身份验证,ManagedIdentityCredentialclient_idkwarg 一起使用(请参阅https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.drivenidentitycredential?view=azure-python)。它能够成功查询 IMDS 端点并获取令牌,但我仍然遇到错误。有人知道我可能缺少什么设置吗?

关于用户管理身份的整体文档很少,特别是与 AKS 和 blob 存储相关的文档,以及此错误。

成功获取 IMDS 令牌:

2021-01-26 05:26:05,944 - azure.core.pipeline.policies.http_logging_policy - INFO - Request URL: 'http://REDACTED/metadata/identity/oauth2/token?api-version=REDACTED&resource=REDACTED&client_id=REDACTED'
2021-01-26 05:26:05,945 - azure.core.pipeline.policies.http_logging_policy - INFO - Request method: 'GET'
2021-01-26 05:26:05,945 - azure.core.pipeline.policies.http_logging_policy - INFO - Request headers:
2021-01-26 05:26:05,945 - azure.core.pipeline.policies.http_logging_policy - INFO -     'Metadata': 'REDACTED'
2021-01-26 05:26:05,945 - azure.core.pipeline.policies.http_logging_policy - INFO -     'User-Agent': 'azsdk-python-identity/1.5.0 Python/3.7.7 (Linux-4.15.0-1103-azure-x86_64-with-debian-9.12)'
2021-01-26 05:26:05,945 - …
Run Code Online (Sandbox Code Playgroud)

azure-active-directory azure-cli azure-blob-storage azure-managed-identity azure-aks

1
推荐指数
1
解决办法
8635
查看次数