[9.2](backport #47256) [Azure] Add client secret (Oauth2) support for eventhub filebeat input#48144
Merged
kaiyan-sheng merged 3 commits into9.2from Dec 19, 2025
Merged
[9.2](backport #47256) [Azure] Add client secret (Oauth2) support for eventhub filebeat input#48144kaiyan-sheng merged 3 commits into9.2from
kaiyan-sheng merged 3 commits into9.2from
Conversation
Contributor
Author
|
Cherry-pick of 7ffcd63 has failed: 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 |
6 tasks
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Contributor
🔍 Preview links for changed docs |
kaiyan-sheng
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
This PR is to enhance Azure Event Hub input plugin for Elastic Agent with RBAC authorization (OAuth2) due to security requirements. Previously we only support shared access key (with connection string) for authentication.
The implementation added a new config parameter called
auth_typefor users to specify authentication method:When
auth_typeis set toconnection_string, or leave it blank:connection_string is required. Whenauth_typeis set toclient_secret`, oauth2 is used.Note: We do expect users to use the same auth type for both eventhub and storage account.
OAuth2 specific Configuration Parameters (
auth_type=client_secret)When using OAuth2 authentication, the following parameters are required:
eventhub_namespace: Fully qualified namespace (e.g.,namespace.servicebus.windows.net)tenant_id: Azure AD tenant IDclient_id: Azure AD application (client) IDclient_secret: Azure AD application client secretauthority_host: Azure AD authority host (optional, defaults to Azure Public Cloud)https://login.microsoftonline.comis the default.Checklist
./changelog/fragmentsusing the changelog tool.Disruptive User Impact
N/A
How to test this PR locally
Setups on Azure side
OR
Instead of getting storage account connection string, assign storage account role:
When no
connection_stringis specified and noauth_typeis specified:We get error log when starting Filebeat:
testing backwards compatibility:
Without
auth_typespecified, by default we are usingconnection_stringto keep backwards compatible. This config still works.testing with oauth2 for both eventhub and SA:
Screenshots
I can see logs getting ingested from Eventhub to elasticsearch with Filebeat:

Logs
I see this in the filebeat log when testing: