Skip to content

Commit

Permalink
[Fleet] Add sync integrations fields to remote ES output (elastic#208516
Browse files Browse the repository at this point in the history
)

## Summary

Closes elastic#192361

Added `sync_integrations` flag to remote elasticsearch output to the API
and UI with the Remote Kibana URL and API key (secret).

To test:
- enable feature flag: `xpack.fleet.enableExperimental:
['enableSyncIntegrationsOnRemote']`
- add/edit output and enable Synchronize integrations switch
- When the switch is enabled, Kibana URL and API key is required,
otherwise optional (but still has to be valid URL)
- test preconfigured output with the new fields

<img width="724" alt="image"
src="https://github.com/user-attachments/assets/5cf4c0b1-f8c3-4447-a0ef-a8aa8e362277"
/>

Example preconfig:
```
  - name: 'Preconfiged remote output'
    type: 'remote_elasticsearch'
    id: 'remote-output2'
    hosts: ["http://192.168.64.1:9200"]
    sync_integrations: true
    kibana_url: "http://localhost:5601"
    secrets:
      service_token: token
      kibana_api_key: key
```

Added callout to help create the API key (privileges have to be
confirmed when elastic#192363 is done)

<img width="714" alt="image"
src="https://github.com/user-attachments/assets/5a5e7a8c-0a56-4234-ad66-b15f5f53de76"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
juliaElastic and kibanamachine authored Feb 3, 2025
1 parent 8fe5738 commit 07a61ab
Show file tree
Hide file tree
Showing 25 changed files with 1,053 additions and 33 deletions.
180 changes: 180 additions & 0 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -26835,6 +26835,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -26855,6 +26863,25 @@
"secrets": {
"additionalProperties": true,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": true,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -26968,6 +26995,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down Expand Up @@ -27925,6 +27955,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -27945,6 +27983,25 @@
"secrets": {
"additionalProperties": false,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -28058,6 +28115,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down Expand Up @@ -28953,6 +29013,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -28973,6 +29041,25 @@
"secrets": {
"additionalProperties": true,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": true,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -29086,6 +29173,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down Expand Up @@ -30131,6 +30221,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -30151,6 +30249,25 @@
"secrets": {
"additionalProperties": true,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": true,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -30264,6 +30381,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down Expand Up @@ -31206,6 +31326,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -31226,6 +31354,25 @@
"secrets": {
"additionalProperties": false,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -31339,6 +31486,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down Expand Up @@ -32219,6 +32369,14 @@
"is_preconfigured": {
"type": "boolean"
},
"kibana_api_key": {
"nullable": true,
"type": "string"
},
"kibana_url": {
"nullable": true,
"type": "string"
},
"name": {
"type": "string"
},
Expand All @@ -32239,6 +32397,25 @@
"secrets": {
"additionalProperties": true,
"properties": {
"kibana_api_key": {
"anyOf": [
{
"additionalProperties": true,
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
{
"type": "string"
}
]
},
"service_token": {
"anyOf": [
{
Expand Down Expand Up @@ -32352,6 +32529,9 @@
},
"type": "object"
},
"sync_integrations": {
"type": "boolean"
},
"type": {
"enum": [
"remote_elasticsearch"
Expand Down
Loading

0 comments on commit 07a61ab

Please sign in to comment.