-
Notifications
You must be signed in to change notification settings - Fork 337
TLS support for auxiliary transports #5375
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
Conversation
3f03af7 to
f8cca8d
Compare
62fd182 to
1bbb420
Compare
1bbb420 to
9614f9e
Compare
7604e9c to
9207ee9
Compare
d59bbf1 to
d0ec7b4
Compare
910aea9 to
f3f6c97
Compare
|
@cwperks can you take a look when convenient? |
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
9d1e301 to
6be11f5
Compare
|
Thank you for enhancing (and fixing) the bwc tests in this repo with this change :) |
|
@DarshitChanpura @nibix wdyt about having aux transport tests in this repo and testing for EIT? I would be happy to accept the maintenance in this case and if there are other aux transports in the future (f.e. Apache arrow as an alternative to default netty) then we can find another appropriate place for the tests at a later time. The changes in this PR should get merged to supply the settings, so the current point of contention is where the appropriate place for the tests is. |
Well, as a temporary solution, it's okay. Still, I would also think that it won't be sustainable in the long run, as each further transport has these effects:
IMHO, the infrastructure that is provided by the security plugin should be tested by a minimal test implementation that is co-located with the tests. Wouldn't it be possible to have the integration tests with security on the GRPC plugin side? |
gRPC plugin is in core and currently none of the core plugins test with security...not saying its not possible but typically only plugins with their own repo test with security. I see 2 solutions:
|
|
@finnegancarroll any thoughts on the latter of moving grpc plugin out of core and to its own repo? |
|
Ah, I did not know that gRPC is part of the core project. That changes the situation a bit, I thought it was a separate repo. |
|
I am wondering: what are the criteria to decide what goes to the core repo and what goes to its own repo? |
That's an art, not a science ;). In all seriousness, I agree that we should have criteria somewhere to help people distinguish when to do either. My general guidance is this: if you want a separate set of maintainers go with a separate repo. If the core maintainers agree to do the maintenance then it can go in core. So really it boils down to who does the maintenance..I think. |
|
IMO Workload Management is another area that was introduced in the core that might be better as a separate plugin repo as they are also talking about doing testing with security. For example, they are assigning requests to workload groups and some of the matching rules involve user attributes like username and backend roles. CC: @kkhatua @kaushalmahi12 @jainankitk you may be interested in this conversation |
Are there BWC implications of doing this since it would no longer be available natively? I think there's competing interests here as one long term goal for gRPC is to become more natively available in OpenSearch. We expect this transport to, in theory, be more performant across the board and not just a couple key operations. We also expect plugins to more frequently take a dependency on gRPC as support is expanded to plugin APIs (I know @karenyrx is running into a similar issue with KNN query support). I think an issue will be raised in core soon to discuss the placement of the gRPC plugin which will be very relevant to this conversation of taking it as a test dependency. Will copy this discussion and related issue there. |
No issues with bwc. Only functional changes to plugins have bwc considerations..not where the plugin actually resides. If a plugin is the same code, then it would produce the same binary whether located in its own repo or in the core. |
|
@cwperks I believe even if we move authN/authZ into or out of the core, it will still execute before the actual RestHandlers hence I assume rest layer will continue to access the same authN/authZ info via ThreadContext/SomeOtherMechanism in future. Is my understanding incorrect on this ? Regarding testing with security, yes we will need it if we enable the security attribute based autotagging but then again we have following options as you mentioned
|
Description
In core auxiliary transports may implement secure variants to provide security plugin functionality such as EIT, authN, and authZ. Today auxiliary transports are provided this interface in core but it remains un-implemented in security plugin. These changes enable security plugin to provide basic TLS support such that secure auxiliary transports can encrypt data in transit.
Configuration settings for each aux transport exist under distinct namespaces, where the identifier for the transport is the same as the key for enabling it under setting
aux.transport.types.Note that these changes provide no authorization component and only work to deliver an SSL configuration. Users can configure
clientauth_modeto allow/disallow certificates access to a particular transport, but no permissions are enforced and no user is authenticated when a connection is successfully established.Testing
These changes add mock aux transports to unit tests for
SslContextHandlerand include the OpenSearch core native gRPC transport plugin within integration test suites to verify TLS is functioning as expected. These changes can also be tested manually by compiling this feature branch and installing it on an OpenSearch distribution.Env variables for convenience:
Build OpenSearch/security plugin/gRPC plugin:
Install both plugins:
Create demo certs for security plugin - Respond yes yes no (keeping cluster mode disabled):
Enable the secure gRPC auxiliary transport:
Configure security settings with demo certs (.pem format):
Note: This example configures
clientauth_mode: REQUIRE.Start OpenSearch:
Test plaintext connection:
Test insecure TLS with no client certificate provided:
Test TLS with client certificate provided:
Note:
-insecureto skip host name verification.Issues Resolved
#17795
Testing
Unit tests and integration tests for mock auxiliary transport CertTypes.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.