Skip to content

[azure_application_insights] add client secret#17899

Merged
jakubgalecki0 merged 14 commits intoelastic:mainfrom
jakubgalecki0:app_insights_client_secret
Mar 30, 2026
Merged

[azure_application_insights] add client secret#17899
jakubgalecki0 merged 14 commits intoelastic:mainfrom
jakubgalecki0:app_insights_client_secret

Conversation

@jakubgalecki0
Copy link
Copy Markdown
Contributor

@jakubgalecki0 jakubgalecki0 commented Mar 19, 2026

Proposed commit message

This pull request adds support for client secret authentication elastic/beats#48880

  • Tested new auth method
  • Tested backward compatibility with api_key auth

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

image image

API KEY

image image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

✅ Vale Linting Results

No issues found on modified lines!


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.

@andrewkroh andrewkroh added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:azure_application_insights Azure Application Insights Metrics Overview labels Mar 19, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this constraint should be refined to the versions of Beats which include the api key change onwards elastic/beats#48880.

@jakubgalecki0 jakubgalecki0 marked this pull request as ready for review March 25, 2026 13:57
@jakubgalecki0 jakubgalecki0 requested a review from a team as a code owner March 25, 2026 13:57
@andrewkroh andrewkroh added the Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] label Mar 25, 2026
conditions:
kibana:
version: "^8.13.0 || ^9.0.0"
version: "^8.19.14 || ^9.2.8"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As we have back-ported to 8.19.0 and 9.2.0. Should we use them instead?
CC: @tommyers-elastic

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should use these constraints:

conditions:
  kibana:
    version: "~8.19.14 || ~9.2.8 || ^9.3.3"

for major.minor.patch:

  • the ~ modifier allows newer patch releases
  • the ^ modifier also allows new minor releases


`Api Key`:: (_[]string_) The API key which will be generated. See [Azure Monitor Log Analytics API Overview](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) for more information.
`Authentication Type`:: (_string_) Optional. The authentication method to use. Accepted values: `api_key` or `client_secret`. Defaults to `api_key` if not set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add a note in the README highlighting that users currently authenticating via API Key should migrate to Client Secret?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

++


`Api Key`:: (_[]string_) The API key which will be generated. See [Azure Monitor Log Analytics API Overview](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) for more information.
`Authentication Type`:: (_string_) Optional. The authentication method to use. Accepted values: `api_key` or `client_secret`. Defaults to `api_key` if not set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

++

conditions:
kibana:
version: "^8.13.0 || ^9.0.0"
version: "^8.19.0 || ^9.2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be actually:

  • = 8.19.31

  • = 9.2.8

  • = 9.3.3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Except if we add a comment on the authentication method that selecting Authentication Type is allowed only on 8.19.31, 9.2.8, 9.3.3 onwards

conditions:
kibana:
version: "^8.13.0 || ^9.0.0"
version: "^8.19.0 || ^9.2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably need something like this:

conditions:
  kibana:
    version: "~8.19.14 || ~9.2.8 || ^9.3.3"

conditions:
kibana:
version: "^8.13.0 || ^9.0.0"
version: "^8.19.0 || ^9.2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Except if we add a comment on the authentication method that selecting Authentication Type is allowed only on 8.19.31, 9.2.8, 9.3.3 onwards

- name: auth_type
type: select
title: Authentication Type
description: The authentication type to use. Either "api_key" or "client_secret".
Copy link
Copy Markdown
Contributor

@lucabelluccini lucabelluccini Mar 26, 2026

Choose a reason for hiding this comment

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

Can we put a warning that this setting can be used only on 8.19.14, 9.2.8, 9.3.3 onwards?

kibana.version is only a "proxy" of the recommended version and checks only Kibana.
Maybe it is better to be explicit here.

Copy link
Copy Markdown
Contributor

@lucabelluccini lucabelluccini Mar 26, 2026

Choose a reason for hiding this comment

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

Suggested change
description: The authentication type to use. Either "api_key" or "client_secret".
description: Only for Elastic Agent 8.19.14, 9.2.8, 9.3.3 or more recent: the authentication type to use. Either "api_key" or "client_secret".

This is a suggestion, not the actual "text" to display.

@jakubgalecki0 jakubgalecki0 force-pushed the app_insights_client_secret branch from 886b196 to df6a643 Compare March 27, 2026 09:48
Copy link
Copy Markdown
Contributor

@muthu-mps muthu-mps 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
Copy Markdown
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM overall.

I suggest replacing "Azure AD" with "Entra ID" as MSFT moved away from the old service name.

Also consider default the authentication type to client secret for new installs since we're so close to the EOL for API key support.

`Application ID`:: (_[]string_) ID of the application. This is Application ID from the API Access settings blade in the Azure portal.

`Api Key`:: (_[]string_) The API key which will be generated, more on the steps here https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID.
`Authentication Type`:: (_string_) Optional. The authentication method to use. Accepted values: `api_key` or `client_secret`. Defaults to `api_key` if not set.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: should we flip the default auth to client_secret for new installs? Microsoft is discontinuing API key support soon, right?

`Api Key`:: (_[]string_) The API key which will be generated. See [Azure Monitor Log Analytics API Overview](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) for more information.
`Authentication Type`:: (_string_) Optional. The authentication method to use. Accepted values: `api_key` or `client_secret`. Defaults to `api_key` if not set.

NOTE: API Key authentication is deprecated. Users currently authenticating via API Key are encouraged to migrate to Client Secret authentication. Client Secret authentication uses Azure Active Directory (Azure AD) and provides more robust security through short-lived tokens.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is MSFT still actively using the "Azure Active Directory"? I guess they moved to Entra ID naming now.

@@ -1,3 +1,8 @@
- version: "1.10.0-next"
changes:
- description: Add support for Azure AD client secret authentication. New optional parameters `auth_type`, `client_id`, `client_secret`, and `tenant_id` have been added. `api_key` is now optional.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As before, i suggest to replace "Azure AD" with Entra ID.

Comment on lines +55 to +72
description: The client ID for Azure AD authentication.
multi: false
required: false
show_user: true
- name: client_secret
type: password
title: Client Secret
description: The client secret for Azure AD authentication.
secret: true
multi: false
required: false
show_user: true
- name: tenant_id
type: text
title: Tenant ID
description: The tenant ID for Azure AD authentication.
multi: false
required: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggest replacing Azure AD with Entra ID.

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

@jakubgalecki0 jakubgalecki0 merged commit 94d8456 into elastic:main Mar 30, 2026
11 checks passed
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Package azure_application_insights - 1.10.0 containing this change is available at https://epr.elastic.co/package/azure_application_insights/1.10.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:azure_application_insights Azure Application Insights Metrics Overview Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants