diff --git a/packages/azure_application_insights/_dev/build/docs/README.md b/packages/azure_application_insights/_dev/build/docs/README.md index 4535f66423a..b756c008f42 100644 --- a/packages/azure_application_insights/_dev/build/docs/README.md +++ b/packages/azure_application_insights/_dev/build/docs/README.md @@ -8,7 +8,15 @@ The Application Insights Integration allows users to retrieve application insigh `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. 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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. See [Azure Monitor Log Analytics API Overview](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) for more information. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. The integration contains the following data streams: diff --git a/packages/azure_application_insights/_dev/build/docs/app_insights.md b/packages/azure_application_insights/_dev/build/docs/app_insights.md index 616cec20a74..59b6e9ea089 100644 --- a/packages/azure_application_insights/_dev/build/docs/app_insights.md +++ b/packages/azure_application_insights/_dev/build/docs/app_insights.md @@ -6,7 +6,15 @@ The Application Insights Integration allows users to retrieve application insigh `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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. More on the steps here https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. #### Configuration options diff --git a/packages/azure_application_insights/_dev/build/docs/app_state.md b/packages/azure_application_insights/_dev/build/docs/app_state.md index d4ff8df8f29..8b71a50a934 100644 --- a/packages/azure_application_insights/_dev/build/docs/app_state.md +++ b/packages/azure_application_insights/_dev/build/docs/app_state.md @@ -6,7 +6,15 @@ The Application State Integration allows users to retrieve application insights `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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. More on the steps here https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. ## Additional notes about metrics and costs diff --git a/packages/azure_application_insights/changelog.yml b/packages/azure_application_insights/changelog.yml index c53601bbc2f..d691dc26036 100644 --- a/packages/azure_application_insights/changelog.yml +++ b/packages/azure_application_insights/changelog.yml @@ -1,3 +1,8 @@ +- version: "1.10.0" + 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. + type: enhancement + link: https://github.com/elastic/integrations/pull/17899 - version: "1.9.1" changes: - description: Fix the H1 for SEO purpose. diff --git a/packages/azure_application_insights/data_stream/app_insights/agent/stream/stream.yml.hbs b/packages/azure_application_insights/data_stream/app_insights/agent/stream/stream.yml.hbs index aae7921dd04..9ec075b52be 100644 --- a/packages/azure_application_insights/data_stream/app_insights/agent/stream/stream.yml.hbs +++ b/packages/azure_application_insights/data_stream/app_insights/agent/stream/stream.yml.hbs @@ -3,9 +3,30 @@ period: {{period}} {{#if application_id}} application_id: {{application_id}} {{/if}} +{{#if auth_type}} +auth_type: {{auth_type}} +{{/if}} +{{#unless auth_type}} +{{#if api_key}} +api_key: {{api_key}} +{{/if}} +{{/unless}} +{{#contains "api_key" auth_type}} {{#if api_key}} api_key: {{api_key}} {{/if}} +{{/contains}} +{{#contains "client_secret" auth_type}} +{{#if client_id}} +client_id: {{client_id}} +{{/if}} +{{#if client_secret}} +client_secret: {{client_secret}} +{{/if}} +{{#if tenant_id}} +tenant_id: {{tenant_id}} +{{/if}} +{{/contains}} {{#if metrics}} metrics: {{metrics}} {{/if}} diff --git a/packages/azure_application_insights/data_stream/app_state/agent/stream/stream.yml.hbs b/packages/azure_application_insights/data_stream/app_state/agent/stream/stream.yml.hbs index 97abaa593dc..4927b4d849d 100644 --- a/packages/azure_application_insights/data_stream/app_state/agent/stream/stream.yml.hbs +++ b/packages/azure_application_insights/data_stream/app_state/agent/stream/stream.yml.hbs @@ -3,9 +3,30 @@ period: {{period}} {{#if application_id}} application_id: {{application_id}} {{/if}} +{{#if auth_type}} +auth_type: {{auth_type}} +{{/if}} +{{#unless auth_type}} +{{#if api_key}} +api_key: {{api_key}} +{{/if}} +{{/unless}} +{{#contains "api_key" auth_type}} {{#if api_key}} api_key: {{api_key}} {{/if}} +{{/contains}} +{{#contains "client_secret" auth_type}} +{{#if client_id}} +client_id: {{client_id}} +{{/if}} +{{#if client_secret}} +client_secret: {{client_secret}} +{{/if}} +{{#if tenant_id}} +tenant_id: {{tenant_id}} +{{/if}} +{{/contains}} {{#if processors}} processors: {{processors}} diff --git a/packages/azure_application_insights/docs/README.md b/packages/azure_application_insights/docs/README.md index 2f4ca1d15ad..83b69c6e95b 100644 --- a/packages/azure_application_insights/docs/README.md +++ b/packages/azure_application_insights/docs/README.md @@ -8,7 +8,15 @@ The Application Insights Integration allows users to retrieve application insigh `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. 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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. See [Azure Monitor Log Analytics API Overview](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) for more information. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. The integration contains the following data streams: diff --git a/packages/azure_application_insights/docs/app_insights.md b/packages/azure_application_insights/docs/app_insights.md index 162311c40a4..167e9b76755 100644 --- a/packages/azure_application_insights/docs/app_insights.md +++ b/packages/azure_application_insights/docs/app_insights.md @@ -6,7 +6,15 @@ The Application Insights Integration allows users to retrieve application insigh `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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. More on the steps here https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. #### Configuration options diff --git a/packages/azure_application_insights/docs/app_state.md b/packages/azure_application_insights/docs/app_state.md index d5caa7d3568..f022a58cdc9 100644 --- a/packages/azure_application_insights/docs/app_state.md +++ b/packages/azure_application_insights/docs/app_state.md @@ -6,7 +6,15 @@ The Application State Integration allows users to retrieve application insights `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. + +`Api Key`:: (_string_) Optional. The API key used for authentication when `auth_type` is set to `api_key`. More on the steps here https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID. + +`Client ID`:: (_string_) Optional. The client (application) ID of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Client Secret`:: (_string_) Optional. The client secret of the Azure AD application. Required when `auth_type` is `client_secret`. + +`Tenant ID`:: (_string_) Optional. The tenant (directory) ID of the Azure AD tenant. Required when `auth_type` is `client_secret`. ## Additional notes about metrics and costs diff --git a/packages/azure_application_insights/manifest.yml b/packages/azure_application_insights/manifest.yml index 3d0c1d53fbc..be00125c8bb 100644 --- a/packages/azure_application_insights/manifest.yml +++ b/packages/azure_application_insights/manifest.yml @@ -1,6 +1,6 @@ name: azure_application_insights title: Azure Application Insights Metrics Overview -version: "1.9.1" +version: "1.10.0" description: Collect application insights metrics from Azure Monitor with Elastic Agent. type: integration icons: @@ -30,12 +30,46 @@ vars: multi: false required: true show_user: true + - name: auth_type + type: select + title: Authentication Type + description: The authentication type to use. Either "api_key" or "client_secret". + options: + - value: api_key + text: API Key + - value: client_secret + text: Client Secret + multi: false + required: false + show_user: true - name: api_key type: password title: Api Key secret: true multi: false - required: true + required: false + show_user: true + - name: client_id + type: text + title: Client ID + 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 show_user: true policy_templates: - name: app_insights