Skip to content

Conversation

@kapral18
Copy link
Contributor

@kapral18 kapral18 commented Aug 28, 2025

fixes #228298

  • Add IPv6 address support for remote cluster seed nodes and proxy addresses using bracket notation ( [::1]:9300 )
  • Move address validation from client-side to shared common library using ipaddr.js for robust IPv4/IPv6 validation
  • Update cluster serialization and cloud URL parsing to handle IPv6 addresses correctly

How to test

  1. Spin up local kibana and es on default ports (yarn es snapshot and yarn start --no-base-path)
  2. Go to /app/management/data/remote_clusters
  3. Click "add new cluster"
  4. Click "certificates celect"
  5. Add loopback ipv6 address to seed pointing to cluster communication port [::1]:9300
  6. Observe no client side error for seed field, proving that ipv6 syntax is now valid
  7. Add test name
  8. Uncheck skip_unavailable
  9. Click next
  10. Click create remote cluster
  11. Observe live cluster connection in the list of remote clusters

Release Note

Added IPv6 support to address fields in Remote Clusters UI

@kapral18 kapral18 self-assigned this Aug 28, 2025
@kapral18 kapral18 force-pushed the enhancement/remote-clusters/support-ipv6-in-remote-address-field branch from 953f8af to c2b8fae Compare August 28, 2025 22:38
@kapral18 kapral18 marked this pull request as ready for review August 29, 2025 13:37
@kapral18 kapral18 requested a review from a team as a code owner August 29, 2025 13:37
@kapral18 kapral18 added release_note:enhancement Feature:CCR and Remote Clusters Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// labels Aug 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@kapral18 kapral18 added backport:version Backport to applied version labels v9.2.0 v9.1.3 v8.19.3 v9.0.6 and removed v9.0.6 labels Aug 29, 2025
- Comment out failing test case for IPv4-mapped IPv6 due to unsupported format
- Replace custom IPv4, IPv6, and hostname validation logic with `ipaddr.js`
- Add helper function `looksLikeIPv4` to identify numeric IPv4 attempts
- Update `parseAddressAndPort` to handle IPv6 without brackets and improve port parsing
- Simplify `isAddressValid` to leverage `ipaddr.js` for IPv4 and IPv6 validation
- Ensure `isPortValid` correctly checks for both address and port presence
- Updated tests and validation logic to support IPv4, IPv6, and hostname formats for seed nodes and proxy addresses.
- Added new snapshot tests for IPv4 and IPv6 address validation.
- Modified `extractHostAndPort` function to handle IPv6 addresses with and without brackets.
- Updated error messages to reflect the new supported formats.
- Enhanced `validateProxy` and `validateSeed` functions to correctly parse and validate IPv6 addresses.
- Adjusted `convertCloudRemoteAddressToProxyConnection` to handle different URL formats and default ports.
… formats

- Refactor test cases to include hostname, IPv4, and IPv6 proxy addresses.
- Modify `deserializeCluster` to use `extractHostAndPort` for extracting the host from the deprecated proxy address.
- Update `isCloudAdvancedOptionsEnabled` to correctly compare the extracted host with the server name for all address types.
- Move `validate_address` and related functions to `common/lib` for better reusability.
- Adjust imports in various files to use the new location of `validate_address` functions.
@kapral18 kapral18 force-pushed the enhancement/remote-clusters/support-ipv6-in-remote-address-field branch from 0a110e8 to 3b7bb19 Compare August 29, 2025 13:43
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
remoteClusters 98 99 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
remoteClusters 71.4KB 82.5KB +11.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
remoteClusters 9.0KB 9.0KB +15.0B

cc @kapral18

@sabarasaba
Copy link
Member

@elasticmachine merge upstream

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

thanks for working on this @kapral18, code changes lgtm tested locally 🚀

@kapral18 kapral18 merged commit 82f7f9d into elastic:main Sep 1, 2025
18 checks passed
@kapral18 kapral18 deleted the enhancement/remote-clusters/support-ipv6-in-remote-address-field branch September 1, 2025 13:26
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/17379027139

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 233415

Questions ?

Please refer to the Backport tool documentation

@kapral18
Copy link
Contributor Author

kapral18 commented Sep 1, 2025

💔 Some backports could not be created

Status Branch Result
9.1
8.19 An unhandled error occurred. Please see the logs for details

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 233415

Questions ?

Please refer to the Backport tool documentation

kapral18 added a commit to kapral18/kibana that referenced this pull request Sep 1, 2025
fixes elastic#228298

- Add IPv6 address support for remote cluster seed nodes and proxy
addresses using bracket notation ( [::1]:9300 )
- Move address validation from client-side to shared common library
using ipaddr.js for robust IPv4/IPv6 validation
- Update cluster serialization and cloud URL parsing to handle IPv6
addresses correctly

1. Spin up local kibana and es on default ports (`yarn es snapshot` and
`yarn start --no-base-path`)
2. Go to `/app/management/data/remote_clusters`
3. Click "add new cluster"
4. Click "certificates celect"
5. Add loopback ipv6 address to seed pointing to cluster communication
port `[::1]:9300`
6. Observe no client side error for `seed` field, proving that ipv6
syntax is now valid
7. Add `test` name
8. `Uncheck skip_unavailable`
10. Click `next`
11. Click `create remote cluster`
12. Observe live cluster connection in the list of remote clusters

Added IPv6 support to address fields in Remote Clusters UI

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 82f7f9d)
@kapral18
Copy link
Contributor Author

kapral18 commented Sep 1, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kapral18 added a commit to kapral18/kibana that referenced this pull request Sep 1, 2025
fixes elastic#228298

- Add IPv6 address support for remote cluster seed nodes and proxy
addresses using bracket notation ( [::1]:9300 )
- Move address validation from client-side to shared common library
using ipaddr.js for robust IPv4/IPv6 validation
- Update cluster serialization and cloud URL parsing to handle IPv6
addresses correctly

1. Spin up local kibana and es on default ports (`yarn es snapshot` and
`yarn start --no-base-path`)
2. Go to `/app/management/data/remote_clusters`
3. Click "add new cluster"
4. Click "certificates celect"
5. Add loopback ipv6 address to seed pointing to cluster communication
port `[::1]:9300`
6. Observe no client side error for `seed` field, proving that ipv6
syntax is now valid
7. Add `test` name
8. `Uncheck skip_unavailable`
10. Click `next`
11. Click `create remote cluster`
12. Observe live cluster connection in the list of remote clusters

Added IPv6 support to address fields in Remote Clusters UI

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 82f7f9d)
kapral18 added a commit that referenced this pull request Sep 2, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[Remote Clusters] Add IPv6 support
(#233415)](#233415)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-01T13:26:07Z","message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:CCR
and Remote Clusters","Team:Kibana
Management","backport:version","v9.2.0","v9.1.4","v8.19.4"],"title":"[Remote
Clusters] Add IPv6
support","number":233415,"url":"https://github.com/elastic/kibana/pull/233415","mergeCommit":{"message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233415","number":233415,"mergeCommit":{"message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9"}},{"branch":"9.1","label":"v9.1.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elastic Machine <[email protected]>
kapral18 added a commit that referenced this pull request Sep 2, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Remote Clusters] Add IPv6 support
(#233415)](#233415)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-01T13:26:07Z","message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:CCR
and Remote Clusters","Team:Kibana
Management","backport:version","v9.2.0","v9.1.4","v8.19.4"],"title":"[Remote
Clusters] Add IPv6
support","number":233415,"url":"https://github.com/elastic/kibana/pull/233415","mergeCommit":{"message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233415","number":233415,"mergeCommit":{"message":"[Remote
Clusters] Add IPv6 support (#233415)\n\nfixes #228298\n\n- Add IPv6
address support for remote cluster seed nodes and proxy\naddresses using
bracket notation ( [::1]:9300 )\n- Move address validation from
client-side to shared common library\nusing ipaddr.js for robust
IPv4/IPv6 validation\n- Update cluster serialization and cloud URL
parsing to handle IPv6\naddresses correctly\n\n## How to test\n\n1. Spin
up local kibana and es on default ports (`yarn es snapshot` and\n`yarn
start --no-base-path`)\n2. Go to
`/app/management/data/remote_clusters`\n3. Click \"add new cluster\"\n4.
Click \"certificates celect\"\n5. Add loopback ipv6 address to seed
pointing to cluster communication\nport `[::1]:9300`\n6. Observe no
client side error for `seed` field, proving that ipv6\nsyntax is now
valid\n7. Add `test` name\n8. `Uncheck skip_unavailable`\n10. Click
`next`\n11. Click `create remote cluster`\n12. Observe live cluster
connection in the list of remote clusters\n\n## Release Note\nAdded IPv6
support to address fields in Remote Clusters
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"82f7f9d83a21db96ddb8cc6957f138a8e7729da9"}},{"branch":"9.1","label":"v9.1.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/233682","number":233682,"state":"OPEN"},{"branch":"8.19","label":"v8.19.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elastic Machine <[email protected]>
ymao1 pushed a commit to ymao1/kibana that referenced this pull request Sep 2, 2025
fixes elastic#228298

- Add IPv6 address support for remote cluster seed nodes and proxy
addresses using bracket notation ( [::1]:9300 )
- Move address validation from client-side to shared common library
using ipaddr.js for robust IPv4/IPv6 validation
- Update cluster serialization and cloud URL parsing to handle IPv6
addresses correctly

## How to test

1. Spin up local kibana and es on default ports (`yarn es snapshot` and
`yarn start --no-base-path`)
2. Go to `/app/management/data/remote_clusters`
3. Click "add new cluster"
4. Click "certificates celect"
5. Add loopback ipv6 address to seed pointing to cluster communication
port `[::1]:9300`
6. Observe no client side error for `seed` field, proving that ipv6
syntax is now valid
7. Add `test` name
8. `Uncheck skip_unavailable`
10. Click `next`
11. Click `create remote cluster`
12. Observe live cluster connection in the list of remote clusters

## Release Note
Added IPv6 support to address fields in Remote Clusters UI

---------

Co-authored-by: Elastic Machine <[email protected]>
MichelLosier pushed a commit to MichelLosier/kibana that referenced this pull request Sep 2, 2025
fixes elastic#228298

- Add IPv6 address support for remote cluster seed nodes and proxy
addresses using bracket notation ( [::1]:9300 )
- Move address validation from client-side to shared common library
using ipaddr.js for robust IPv4/IPv6 validation
- Update cluster serialization and cloud URL parsing to handle IPv6
addresses correctly

## How to test

1. Spin up local kibana and es on default ports (`yarn es snapshot` and
`yarn start --no-base-path`)
2. Go to `/app/management/data/remote_clusters`
3. Click "add new cluster"
4. Click "certificates celect"
5. Add loopback ipv6 address to seed pointing to cluster communication
port `[::1]:9300`
6. Observe no client side error for `seed` field, proving that ipv6
syntax is now valid
7. Add `test` name
8. `Uncheck skip_unavailable`
10. Click `next`
11. Click `create remote cluster`
12. Observe live cluster connection in the list of remote clusters

## Release Note
Added IPv6 support to address fields in Remote Clusters UI

---------

Co-authored-by: Elastic Machine <[email protected]>
kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Sep 3, 2025
fixes elastic#228298

- Add IPv6 address support for remote cluster seed nodes and proxy
addresses using bracket notation ( [::1]:9300 )
- Move address validation from client-side to shared common library
using ipaddr.js for robust IPv4/IPv6 validation
- Update cluster serialization and cloud URL parsing to handle IPv6
addresses correctly

## How to test

1. Spin up local kibana and es on default ports (`yarn es snapshot` and
`yarn start --no-base-path`)
2. Go to `/app/management/data/remote_clusters`
3. Click "add new cluster"
4. Click "certificates celect"
5. Add loopback ipv6 address to seed pointing to cluster communication
port `[::1]:9300`
6. Observe no client side error for `seed` field, proving that ipv6
syntax is now valid
7. Add `test` name
8. `Uncheck skip_unavailable`
10. Click `next`
11. Click `create remote cluster`
12. Observe live cluster connection in the list of remote clusters

## Release Note
Added IPv6 support to address fields in Remote Clusters UI

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:CCR and Remote Clusters needs_docs release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.19.4 v9.1.4 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[remote clusters] Support IPv6 in Remote Address field

5 participants