diff --git a/packages/httpjson/changelog.yml b/packages/httpjson/changelog.yml index 0f31eaa45d6..3dc1d9689ef 100644 --- a/packages/httpjson/changelog.yml +++ b/packages/httpjson/changelog.yml @@ -1,3 +1,8 @@ +- version: "1.2.3" + changes: + - description: Fixes oauth2 config rendering + type: bugfix + link: https://github.com/elastic/integrations/pull/3518 - version: "1.2.2" changes: - description: Fixes rendering issue for custom oauth2 scopes diff --git a/packages/httpjson/data_stream/generic/agent/stream/httpjson.yml.hbs b/packages/httpjson/data_stream/generic/agent/stream/httpjson.yml.hbs index 8d2fd81d684..9d45186622d 100644 --- a/packages/httpjson/data_stream/generic/agent/stream/httpjson.yml.hbs +++ b/packages/httpjson/data_stream/generic/agent/stream/httpjson.yml.hbs @@ -2,18 +2,20 @@ config_version: 2 data_stream: dataset: {{data_stream.dataset}} interval: {{request_interval}} -{{#unless oauth_id}} + {{#if username}} auth.basic.user: {{username}} {{/if}} {{#if password}} auth.basic.password: {{password}} {{/if}} -{{/unless}} + {{#if pipeline}} pipeline: {{pipeline}} {{/if}} -{{#if oauth_id}} + +{{#unless username}} +{{#unless password}} {{#if oauth_id}} auth.oauth2.client.id: {{oauth_id}} {{/if}} @@ -54,7 +56,8 @@ auth.oauth2.azure.resource: {{oauth_azure_resource}} auth.oauth2.endpoint_params: {{oauth_endpoint_params}} {{/if}} -{{/if}} +{{/unless}} +{{/unless}} request.url: {{request_url}} request.method: {{request_method}} diff --git a/packages/httpjson/manifest.yml b/packages/httpjson/manifest.yml index 91bd750cf3c..3696038e206 100644 --- a/packages/httpjson/manifest.yml +++ b/packages/httpjson/manifest.yml @@ -3,7 +3,7 @@ name: httpjson title: Custom HTTPJSON Input description: Collect custom data from REST API's with Elastic Agent. type: integration -version: 1.2.2 +version: 1.2.3 release: ga conditions: kibana.version: "^7.16.0 || ^8.0.0"