Skip to content

Support Azure managed identity authentication for the Event Hubs sink #2647

Open
debezium/debezium-server
#318

Description

@jomaxso

Problem

The Azure Event Hubs sink creates its EventHubProducerClient through EventHubClientBuilder.connectionString(...), so the supported configuration path requires an Event Hubs SAS connection string.

This prevents a Debezium Server workload running in Azure Container Apps, AKS, a VM, or another Azure-hosted environment from using its managed identity to authenticate to Event Hubs. Operators must instead provision, distribute, and rotate a SAS secret.

Request

Please add first-class Azure Entra ID authentication for the Event Hubs sink, implemented with the Azure Identity SDK and DefaultAzureCredential.

A possible configuration shape:

debezium.sink.eventhubs.auth.mode=default-azure-credential
debezium.sink.eventhubs.fully-qualified-namespace=<namespace>.servicebus.windows.net
debezium.sink.eventhubs.hubname=<event-hub-name>

The existing connection-string configuration should remain supported and be the default for backward compatibility. A user-assigned managed identity could rely on the standard AZURE_CLIENT_ID environment variable consumed by Azure Identity.

The Entra-authenticated path would build the producer with EventHubClientBuilder.credential(namespace, hubName, credential). Operators would grant the workload identity the Azure Event Hubs Data Sender role at namespace or individual-hub scope.

Why

This enables secretless, least-privilege deployments using normal Azure RBAC. It eliminates the operational burden and exposure of Event Hubs SAS connection strings.

Existing extension point

EventHubsChangeConsumer accepts a CDI @CustomConsumerBuilder producer. A custom JAR/image can therefore implement this today, but every adopter must package and maintain Java code merely to create an Azure Identity-backed producer. Native configuration would make this a supported deployment model.

Relevant source

Activity

  1. Naros commented on Sep 17, 2026

    @Naros
    Member

    Hi @jomaxso this is a very reasonable improvement. Would you be open to supplying a PR?

  2. moved this from To triage to Backlog in Debezium Issue Trackeron Sep 17, 2026
  3. abhi-roop commented on Sep 21, 2026

    @abhi-roop

    Hi @Naros, I'd be happy to work on this.

    I'm thinking of adding a debezium.sink.eventhubs.auth.mode property, with connection-string as the default so the existing setup continues to work. I'd then add a default-azure-credential option using Azure Identity's DefaultAzureCredential.

    For the Entra ID flow, I'll use EventHubClientBuilder.credential(namespace, hubName, credential) and add validation for the namespace and hub name. I'll also add tests and update the Event Hubs documentation with the new configuration and authentication setup.

    Does that approach sound good for the PR, or is there anything you'd like me to change before I start?

  4. jomaxso commented on Sep 21, 2026

    @jomaxso
    Author

    @Naros I don't have the time right now to work on this so I would appreciate it when @abhi-roop can work on this. :)

  5. added a commit that references this issue on Sep 22, 2026
  6. abhi-roop commented on Sep 22, 2026

    @abhi-roop
  7. added 5 commits that reference this issue on Sep 22, 2026
  8. added 2 commits that reference this issue on Sep 23, 2026
  9. added 2 commits that reference this issue on Sep 26, 2026
  10. added a commit that references this issue on Sep 27, 2026
  11. moved this from Backlog to In progress in Debezium Issue Trackeron Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions