[
https://issues.apache.org/jira/browse/CAMEL-27749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27749:
--------------------------------
Fix Version/s: 4.18.7
4.22.4
> camel-azure-eventgrid, camel-azure-servicebus, camel-azure-eventhubs: a
> DefaultAzureCredential set as tokenCredential is not used
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27749
> URL: https://issues.apache.org/jira/browse/CAMEL-27749
> Project: Camel
> Issue Type: Bug
> Components: camel-azure, camel-azure-eventhubs,
> camel-azure-servicebus
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0, 4.22.4, 4.18.7
>
>
> When the {{tokenCredential}} option is a {{DefaultAzureCredential}}, the
> components set {{credentialType}} to {{AZURE_IDENTITY}}
> ({{EventGridComponent.createEndpoint()}}, {{ServiceBusComponent}},
> {{EventHubsComponent}}). For {{AZURE_IDENTITY}}, the clients are then built
> with a new {{new DefaultAzureCredentialBuilder().build()}}
> ({{EventGridProducer.createEventGridPublisherClient()}},
> {{ServiceBusClientFactory}}, {{EventHubsClientFactory}}). So a credential
> that the user built with {{.managedIdentityClientId(...)}},
> {{.tenantId(...)}} or other settings is not used.
> In camel-azure-eventgrid this also happens with an explicit
> {{credentialType=TOKEN_CREDENTIAL}}, as the component replaces it with
> {{AZURE_IDENTITY}} for a {{DefaultAzureCredential}}.
> Fix: with {{AZURE_IDENTITY}}, use the {{tokenCredential}} instance when it is
> set, and build a new DefaultAzureCredential only when it is not. In
> eventgrid, keep an explicit {{TOKEN_CREDENTIAL}} or {{AZURE_IDENTITY}}.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)