-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Remote Clusters] Add IPv6 support #233415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Remote Clusters] Add IPv6 support #233415
Conversation
953f8af to
c2b8fae
Compare
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
- 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.
0a110e8 to
3b7bb19
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
cc @kapral18 |
|
@elasticmachine merge upstream |
…remote-address-field
sabarasaba
left a comment
There was a problem hiding this 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 🚀
|
Starting backport for target branches: 8.19, 9.1 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
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)
# 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]>
# 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]>
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]>
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]>
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]>
fixes #228298
How to test
yarn es snapshotandyarn start --no-base-path)/app/management/data/remote_clusters[::1]:9300seedfield, proving that ipv6 syntax is now validtestnameUncheck skip_unavailablenextcreate remote clusterRelease Note
Added IPv6 support to address fields in Remote Clusters UI