-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[POC] RCS 2.0 - fulfilling cluster handles cross cluster requests #92089
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
Closed
Closed
Changes from 153 commits
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
c2abab4
Clean up
n1v0lg 27a8679
Checkstyle
n1v0lg 67df73b
Add assertion
n1v0lg ed6dd51
Merge branch 'main' into remote-access-authentication-header
n1v0lg d4f399d
Clean up and test parse bytes
n1v0lg b39c861
Visibility
n1v0lg 0d1bb46
Merge branch 'main' into remote-access-authentication-header
n1v0lg 5b53b3d
Nit
n1v0lg 8d0d67e
Typo
n1v0lg 7c6b127
Merge branch 'main' into remote-access-authentication-header
n1v0lg 567d652
Merge branch 'main' into remote-access-authentication-header
n1v0lg 33b9eac
List instead of collection
n1v0lg bf17175
Merge branch 'main' into remote-access-authentication-header
n1v0lg ceb631d
WIP send requests with remote access headers
n1v0lg 36bfadc
Merge branch 'main' into send-remote-access-headers
n1v0lg 461fab2
Merge branch 'main' into remote-access-authentication-header
n1v0lg 9928890
WIP remote access authenticator
n1v0lg c88a776
WIP role building
n1v0lg 64d0ff4
Subject authc type
n1v0lg 0b1c04c
WIP role references
n1v0lg 97d6dca
Hacky but it works
n1v0lg badff5c
Lint
n1v0lg cd691b5
Merge branch 'main' into remote-access-authentication-header
n1v0lg 3646d27
Refactor access header
n1v0lg 2491e98
Not a supplier
n1v0lg aeb09f4
Address review feedback
n1v0lg 302d1e0
Lint and assert
n1v0lg 17f0231
Name
n1v0lg c6ce67f
Getters
n1v0lg b5e0b51
Role descriptors bytes
n1v0lg 137ccf3
Use wrap raw bytes in class
n1v0lg 59fc014
Plug in raw bytes
n1v0lg 97e0bbf
Merge branch 'main' into remote-access-authentication-header
n1v0lg ca23372
Merge branch 'main' into poc/remote-access-authorization
n1v0lg b9f9814
Clean up tests
n1v0lg 397792f
Merge branch 'main' into remote-access-authentication-header
n1v0lg 8da5abd
Merge branch 'remote-access-authentication-header' into send-remote-a…
n1v0lg 64f4345
WIP
n1v0lg 31f742f
Merge branch 'main' into send-remote-access-headers
n1v0lg 8a89fa1
Composite interceptor
n1v0lg 67c9e49
Throw on missing credential
n1v0lg c6154fa
More
n1v0lg 20ce992
WIP restructuring
n1v0lg 8660bd8
Wrap send request
n1v0lg 5fded15
Version check etc
n1v0lg bfd9d7e
Move code around
n1v0lg ab71afd
Remove log line
n1v0lg d0d476b
Move assertion
n1v0lg 4b3b263
WIP interceptor
n1v0lg 7af1d83
More request types
n1v0lg 2ef482a
Include shardsearch
n1v0lg 948d6e3
Comments
n1v0lg a2a62f8
Merge branch 'main' into send-remote-access-headers
n1v0lg 4efa803
Clean up
n1v0lg d2ba5d9
Conjunction
n1v0lg 88386d8
Test with multiple clusters
n1v0lg a89dc1c
Minor
n1v0lg dc8d497
WIP tests
n1v0lg 9680dc3
WIP tests
n1v0lg 9e31464
More test
n1v0lg 7caa648
Complete happy path unit test
n1v0lg 29b6cff
More obvious feature flag test
n1v0lg 9ac5fac
Test and TODOs
n1v0lg 68ca91d
Test credential missing
n1v0lg 99a0ee4
Nit
n1v0lg 14f15af
Merge branch 'main' into send-remote-access-headers
n1v0lg 1665703
WIP remote access headers IT
n1v0lg ff96c1b
WIP IT
n1v0lg 19f9aac
Simplify and move test
n1v0lg b668944
Yet more
n1v0lg 0b5fb77
Use queue
n1v0lg 1a166c6
Merge branch 'main' into send-remote-access-headers
n1v0lg 12e3dc2
IT
n1v0lg 5ec40eb
Merge branch 'main' into send-remote-access-headers
n1v0lg c00f4d9
More headers
n1v0lg 9e44075
Minimize roundtrips
n1v0lg 5281743
Remove old class
n1v0lg 720e470
Fix v dumb typo
n1v0lg 9bc0706
Simplify test
n1v0lg 7ef7c72
Clean up
n1v0lg 096786a
Merge branch 'main' into send-remote-access-headers
n1v0lg d208619
WIP conditions not met test
n1v0lg beec35b
More tests and cleanup
n1v0lg 4ccdd71
Search local cluster
n1v0lg 89c001b
WIP multi-cluster test
n1v0lg 84c5f83
Multicluster test
n1v0lg 0698d0c
Nit clean up
n1v0lg dfec24b
Assert on local results
n1v0lg eeff6ab
Refresh true on index doc
n1v0lg 6f07a4a
Rm TODO
n1v0lg 8acd2e5
Undo whitespace
n1v0lg 6543cc0
Merge branch 'main' into send-remote-access-headers
n1v0lg 8043952
WIP address review feedback
n1v0lg bcb9f4f
Address comments
n1v0lg 8fc8c2a
Javadoc
n1v0lg 369c1df
Merge branch 'main' into send-remote-access-headers
n1v0lg 845c674
Merge branch 'main' into send-remote-access-headers
n1v0lg ea93667
Merge branch 'send-remote-access-headers' into poc/remote-access-auth…
n1v0lg a3339c4
New roles etc
n1v0lg 073148e
Hack around scroll handling
n1v0lg 71e3a52
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 6b5e4bc
Merge
n1v0lg 1f748b6
WIP remote access support for internal users
n1v0lg e45f2a0
Also throw
n1v0lg 39ba86f
Tweaks
n1v0lg 3ab9d5f
Fix resolve remote cluster alias
n1v0lg dbce724
Merge branch 'main' into remote-access-for-internal-users
n1v0lg fdcb86f
Resolve cluster alias for opened connections
n1v0lg 46475de
Merge branch 'main' into use-internal-remote-connection-on-open
n1v0lg 0419e7c
Merge branch 'main' into remote-access-for-internal-users
n1v0lg 23ce32a
Adjust tests
n1v0lg a7298f9
Fix typo
n1v0lg 4236c42
Remove assertion
n1v0lg 6f8a796
Merge branch 'use-internal-remote-connection-on-open' into poc/remote…
n1v0lg 6c16e9c
Hack internal users
n1v0lg c7f54bf
WIP cross cluster search user
n1v0lg cadf2d2
Merge branch 'remote-access-for-internal-users' into poc/remote-acces…
n1v0lg d450731
Async search user not involved in CCS
n1v0lg 25d8ca7
Remove async user for now
n1v0lg 64fdd2e
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 04e593d
WIP profiles and separate authenticator
n1v0lg 0782f93
Merge branch 'main' into poc/remote-access-authorization
n1v0lg d7941f7
Nit
n1v0lg 2aea06e
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 2bf04cb
Rewire internal user handling
n1v0lg 28cedc4
Detect remote cluster profile
n1v0lg 8538534
Strip headers
n1v0lg 4f81cc3
Two clusters
n1v0lg 955c739
Remote access authenticator stands alone
n1v0lg 3d919e1
Tweaks
n1v0lg 444699a
Nits
n1v0lg eec7ab8
Exclude remote access type from tests
n1v0lg 7d29281
Clean up
n1v0lg bf1e4f6
Undo
n1v0lg 0e9e4a5
Another nit
n1v0lg d5fe668
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 3b84ef9
Enum ordinal matters
n1v0lg 30a650d
More test fixes
n1v0lg 2586d22
WIP explore re-using authc chain
n1v0lg db9d4a0
Works with alternative
n1v0lg 003b4aa
Limited role fix
n1v0lg 65bea32
More
n1v0lg b674a80
Fix
n1v0lg 9871670
More tweaks
n1v0lg acd0b0e
Spotless
n1v0lg 7f0e548
Integ test
n1v0lg 0c16aa1
Remove unused classes
n1v0lg 97b0681
Merge
n1v0lg 0adb15e
Remove other test
n1v0lg 10252c0
Clean up
n1v0lg 7bfa646
Nit
n1v0lg 5738221
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 83e1fda
Merge branch 'main' into poc/remote-access-authorization
n1v0lg a535210
Merge branch 'main' into poc/remote-access-authorization
n1v0lg 3fc93e5
Fixes
n1v0lg a358ffa
Merge branch 'main' into poc/remote-access-authorization
n1v0lg fea0ee0
Merge and clean up and better encapsulate remote access authc
n1v0lg 6be3ca9
More clean up
n1v0lg 33d3353
Dont need api key service as field
n1v0lg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,14 @@ public void removeListener(TransportConnectionListener listener) { | |
|
|
||
| @Override | ||
| public void openConnection(DiscoveryNode node, ConnectionProfile profile, ActionListener<Transport.Connection> listener) { | ||
| delegate.openConnection(node, profile, listener); | ||
| delegate.openConnection( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change from this PR: #92584 -- pending approval from distributed team. |
||
| node, | ||
| profile, | ||
| ActionListener.wrap( | ||
| connection -> listener.onResponse(new InternalRemoteConnection(connection, clusterAlias)), | ||
| listener::onFailure | ||
| ) | ||
| ); | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| import java.net.InetAddress; | ||
| import java.util.HashSet; | ||
| import java.util.Set; | ||
| import java.util.concurrent.ExecutionException; | ||
|
|
||
| import static org.hamcrest.Matchers.equalTo; | ||
| import static org.hamcrest.Matchers.hasItems; | ||
|
|
@@ -89,7 +90,7 @@ public void testGetConnection() { | |
| assertEquals(1, versions.size()); | ||
| } | ||
|
|
||
| public void testResolveRemoteClusterAlias() { | ||
| public void testResolveRemoteClusterAlias() throws ExecutionException, InterruptedException { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change from this PR: #92584 -- pending approval from distributed team. |
||
| DiscoveryNode remoteNode1 = new DiscoveryNode("remote-node-1", address, Version.CURRENT); | ||
| PlainActionFuture<Void> future = PlainActionFuture.newFuture(); | ||
| remoteConnectionManager.connectToRemoteClusterNode(remoteNode1, validator, future); | ||
|
|
@@ -105,6 +106,10 @@ public void testResolveRemoteClusterAlias() { | |
| Transport.Connection proxyConnection = remoteConnectionManager.getConnection(remoteNode2); | ||
| assertThat(proxyConnection, instanceOf(RemoteConnectionManager.ProxyConnection.class)); | ||
| assertThat(RemoteConnectionManager.resolveRemoteClusterAlias(proxyConnection).get(), equalTo("remote-cluster")); | ||
|
|
||
| PlainActionFuture<Transport.Connection> future2 = PlainActionFuture.newFuture(); | ||
| remoteConnectionManager.openConnection(remoteNode1, null, future2); | ||
| assertThat(RemoteConnectionManager.resolveRemoteClusterAlias(future2.get()).get(), equalTo("remote-cluster")); | ||
| } | ||
|
|
||
| private static class TestRemoteConnection extends CloseableConnection { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This file is safe to ignore: hacking it to work with two fulfilling clusters and the new remote port set up.