简体   繁体   English

将托管标识与 Azure 服务总线一起使用

[英]Using a managed identity with Azure Service Bus

I want to use a managed identity to connect to Azure Service Bus.我想使用托管标识连接到 Azure 服务总线。 In the docs they mention the DefaultAzureCredentialBuilder.在文档中,他们提到了 DefaultAzureCredentialBuilder。 I don't really get how this would use my managed identity to authenticate to the Service Bus.我真的不明白这将如何使用我的托管身份对服务总线进行身份验证。

Does anyone know this?有人知道吗?

DefaultAzureCredential is a chained credential; DefaultAzureCredential是一个链式凭证; internally it considers multiple authorization sources, including managed identities.在内部,它考虑了多个授权源,包括托管身份。 More information can be found in the Azure.Identity overview .可以在Azure.Identity 概述中找到更多信息。

Service Bus can use any of the Azure.Identity credentials for authorization.服务总线可以使用任何Azure.Identity 凭据进行授权。 DefaultAzureCredentialBuilder is demonstrated only because it allows for success in a variety of scenarios.演示DefaultAzureCredentialBuilder只是因为它允许在各种场景中取得成功。

If you'd prefer to restrict authorization to only a managed identity, you can do so by using ManagedIdentityCredentialBuilder rather than the default credential.如果您希望将授权仅限于托管标识,则可以使用ManagedIdentityCredentialBuilder而不是默认凭据来实现。 An example of creating the can be found here .可以在此处找到创建的示例。 It can then be passed to Service Bus in the same manner as the default credential.然后可以将其以与默认凭据相同的方式传递给服务总线。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MassTransit:无法使用托管标识访问 Azure 服务总线 - MassTransit: Cannot access Azure Service Bus using managed Identity Azure Azure 服务总线的托管身份 java sdk - Azure managed identity for Azure service bus with java sdk 无法使用托管身份将消息从 Azure API 发布到 Azure 服务总线队列 - Unable to post message to Azure Service Bus Queue from Azure API using Managed Identity Azure Visual Studio 中的服务总线托管标识返回 401 - 令牌颁发者无效 - Azure Service Bus managed identity in Visual Studio returning 401 - Token issuer is invalid 使用托管标识从 Azure 应用服务调用图 - Call Graph from Azure App Service using Managed Identity 使用托管标识从 Azure 应用服务访问 CosmosDB 数据(失败) - Access CosmosDB Data from Azure App Service by using managed identity (Failed) 使用Azure服务总线发送消息到Salesforce - Using Azure service bus to send message to Salesforce 使用托管标识从 Azure Runbook 运行 Get-AzADApplication - Run Get-AzADApplication from an Azure Runbook using a Managed Identity Azure - 使用托管标识向 KeyVault 和其他资源验证 AKS - Azure - Using a Managed Identity to authenticate AKS to KeyVault and other resources 在 Azure 上使用 Terraform 部署具有托管标识的 VM 失败 - Deploying a VM with managed identity using Terraform on Azure fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM