implement buildSecureClientTransportEngine with serverName parameter - #5894
Conversation
serverName is used to populate the Server Name Indication (SNI) Signed-off-by: Orlando AGESOKO <orlando.agesoko@soheito.moe>
…rt-engine-with-server-name-indication
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5894 +/- ##
==========================================
- Coverage 73.69% 73.68% -0.01%
==========================================
Files 437 437
Lines 26649 26655 +6
Branches 3943 3945 +2
==========================================
+ Hits 19640 19642 +2
- Misses 5140 5141 +1
- Partials 1869 1872 +3
🚀 New features to boost your workflow:
|
|
Thank you, @orages , please do not forget to update |
Signed-off-by: Orlando AGESOKO <orlando.agesoko@soheito.moe>
Signed-off-by: Orlando AGESOKO <orlando.agesoko@soheito.moe>
Signed-off-by: Orlando AGESOKO <orlando.agesoko@soheito.moe>
Signed-off-by: Orlando AGESOKO <orlando.agesoko@soheito.moe>
Thanks @cwperks Yes, I think it should work, see please https://github.com/opensearch-project/OpenSearch/pull/20321/changes#diff-6267a8e9b6166356b484dc5363c982e8d4b2e4c62cdb9199f06a8908ebf4b485R312 which basically invokes this new factory method with server name. |
cwperks
left a comment
There was a problem hiding this comment.
Oh I see now, we are overloading buildSecureClientTransportEngine in core. Any reason why we are overloading it instead of modifying the existing signature? I'm not terribly concerned about bwc bc the security plugin would be the only consumer.
I think we could definitely use the new method signature only, the weak motivation behind keeping 2 options is that in 90% cases, the server name would not be needed |
Description
This PR add support for
SecureTransportSettingsProvider.buildSecureClientTransportEngine(Settings settings, String serverName, String hostname, int port)introduced in opensearch-project/OpenSearch#20321This change add the possibility to create SSL Engine with the TLS Server Name Indication (SNI) extension populated with a given
serverName.Issues Resolved
opensearch-project/OpenSearch#17316
Testing
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.