Skip to content

[azure-eventhub] Add support for managed identity#48655

Merged
zmoog merged 7 commits intomainfrom
zmoog/feat/azure-eventhub-managed-identity
Feb 13, 2026
Merged

[azure-eventhub] Add support for managed identity#48655
zmoog merged 7 commits intomainfrom
zmoog/feat/azure-eventhub-managed-identity

Conversation

@zmoog
Copy link
Contributor

@zmoog zmoog commented Feb 3, 2026

Proposed commit message

Add support for managed identity authentication to the azure-eventhub input.

The input support both system and user-assigned identities.

System-assigned managed identity:

If you want to use system-assigned identity, set auth_type: managed_identity and the usual event hub and storage account related settings. Not need to specify authentication settings other than auth_type.

filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"

User-assigned managed identity:

If you wan to use a user-assigned identity, you need to set managed_identity_client_id.

filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"

Managed identity allows users to deploy the Elastic Agent with including credentials.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

How to test this PR locally

You can follow the detailed step-by-step guide at zmoog/public-notes#118

Related issues

@zmoog zmoog self-assigned this Feb 3, 2026
@zmoog zmoog added Team:obs-ds-hosted-services Label for the Observability Hosted Services team input:azure-eventhub labels Feb 3, 2026
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
@mergify
Copy link
Contributor

mergify bot commented Feb 3, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @zmoog? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
@zmoog zmoog added the backport-active-all Automated backport with mergify to all the active branches label Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🔍 Preview links for changed docs

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@theletterf theletterf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some suggestions!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Vale Linting Results

Summary: 1 suggestion found

💡 Suggestions (1)
File Line Rule Message
docs/reference/filebeat/filebeat-input-azure-eventhub.md 77 Elastic.WordChoice Consider using 'refer to (if it's a document), view (if it's a UI element)' instead of 'See', unless the term is in the UI.

The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

zmoog and others added 2 commits February 13, 2026 10:03
Co-authored-by: Fabrizio Ferri-Benedetti <algernon@fastmail.com>
@zmoog zmoog merged commit 4f42aad into main Feb 13, 2026
18 checks passed
@zmoog zmoog deleted the zmoog/feat/azure-eventhub-managed-identity branch February 13, 2026 11:05
@github-actions
Copy link
Contributor

@Mergifyio backport 8.19 9.2 9.3

@mergify
Copy link
Contributor

mergify bot commented Feb 13, 2026

backport 8.19 9.2 9.3

✅ Backports have been created

Details

Cherry-pick of 4f42aad has failed:

On branch mergify/bp/8.19/pr-48655
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 4f42aad31.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1770154527-azure-eventhub-managed-identity.yaml
	modified:   x-pack/filebeat/input/azureeventhub/auth.go
	modified:   x-pack/filebeat/input/azureeventhub/config.go
	modified:   x-pack/filebeat/input/azureeventhub/config_test.go
	new file:   x-pack/filebeat/input/azureeventhub/managed_identity.go
	new file:   x-pack/filebeat/input/azureeventhub/managed_identity_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   docs/reference/filebeat/filebeat-input-azure-eventhub.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)

# Conflicts:
#	docs/reference/filebeat/filebeat-input-azure-eventhub.md
mergify bot pushed a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)
mergify bot pushed a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)
zmoog added a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
zmoog added a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
zmoog added a commit that referenced this pull request Feb 13, 2026
Add support for [managed identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) authentication to the `azure-eventhub` input.

The input support both system and user-assigned identities.

**System-assigned managed identity:**

If you want to use system-assigned identity, set `auth_type: managed_identity` and the usual event hub and storage account related settings. Not need to specify authentication settings other than `auth_type`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

**User-assigned managed identity:**

If you wan to use a user-assigned identity, you need to set `managed_identity_client_id`.

```yaml
filebeat.inputs:
- type: azure-eventhub
  auth_type: "managed_identity"
  managed_identity_client_id: "your-user-assigned-identity-client-id"
  eventhub: "insights-operational-logs"
  eventhub_namespace: "your-namespace.servicebus.windows.net"
  consumer_group: "$Default"
  storage_account: "your-storage-account"
```

Managed identity allows users to deploy the Elastic Agent with including credentials.

(cherry picked from commit 4f42aad)

# Conflicts:
#	docs/reference/filebeat/filebeat-input-azure-eventhub.md

Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches input:azure-eventhub Team:obs-ds-hosted-services Label for the Observability Hosted Services team

3 participants