-
Notifications
You must be signed in to change notification settings - Fork 5.5k
tls: SDS support for private key providers #16737
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2ffd0a2
Do not resolve private key DataSource if there isn't any.
ipuustin 9b3621e
Add a test for dynamically configuring private key provider secret.
ipuustin 7ac4fec
Allocate a TransportSocketFactoryContext to last the server lifetime.
ipuustin 0ec9b33
Fix the test after the error handling changes.
ipuustin 6586eb9
Fix also secret_manager_impl_test.
ipuustin 640ea6b
Fix one more test using changed exception message.
ipuustin f9d1d7d
Fix sds_api_test.
ipuustin 43ff7cc
Remove extra .get() from smart pointer.
ipuustin 7ef7172
Listener: initialize TransportSocketFactoryContext only once.
ipuustin e7d373b
Simplify test in hopes it might work on windows.
ipuustin a424f11
Merge remote-tracking branch 'origin/main' into sds-rebase
ipuustin bf37e7c
Fix protobuf linking in Windows tests.
ipuustin de5492d
Merge remote-tracking branch 'origin/main' into sds-private-key-provider
ipuustin e86a4d2
Merge remote-tracking branch 'origin/main' into sds-private-key-provider
ipuustin 2776ce2
Fix formatting.
ipuustin 5694ee6
Add an integration test.
ipuustin 3d7bfb3
Refactor integration test.
ipuustin ce4a63f
Disable QUIC.
ipuustin 66e6674
Replicate a CDS+SDS test with a private key provider.
ipuustin 731b702
Add pointer alias.
ipuustin 2ceb097
Yaml processing in tests.
ipuustin 74cfe05
Merge branch 'main' into sds-pr
ipuustin 1a7f0c2
Add SecretManagerPtr.
ipuustin 9dd9a9f
Change asserts to EXPECT_TRUEs.
ipuustin 576bb89
Merge remote-tracking branch 'upstream/main' into sds-private-key-pro…
ipuustin 37ecabd
Add UNREFERENCED_PARAMETER for disable_quic.
ipuustin 09c0a68
Empty commit to trigger CI.
ipuustin 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -790,6 +790,14 @@ class ClusterImplBase : public Cluster, protected Logger::Loggable<Logger::Id::u | |
| */ | ||
| void setOutlierDetector(const Outlier::DetectorSharedPtr& outlier_detector); | ||
|
|
||
| /** | ||
| * Set the TransportSocketFactoryContext pointer so that the memory isn't lost | ||
| * for the cluster lifetime in case SDS is used. | ||
| */ | ||
| void | ||
| setTransportFactoryContext(std::unique_ptr<Server::Configuration::TransportSocketFactoryContext> | ||
|
Member
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. Nit |
||
| transport_factory_context); | ||
|
|
||
| /** | ||
| * Wrapper around Network::Address::resolveProtoAddress() that provides improved error message | ||
| * based on the cluster's type. | ||
|
|
@@ -880,6 +888,8 @@ class ClusterImplBase : public Cluster, protected Logger::Loggable<Logger::Id::u | |
| const bool local_cluster_; | ||
| Config::ConstMetadataSharedPoolSharedPtr const_metadata_shared_pool_; | ||
| Common::CallbackHandlePtr priority_update_cb_; | ||
| std::unique_ptr<Server::Configuration::TransportSocketFactoryContext> | ||
| transport_factory_context_{}; | ||
| }; | ||
|
|
||
| using ClusterImplBaseSharedPtr = std::shared_ptr<ClusterImplBase>; | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package test.common.secret; | ||
|
|
||
| message TestPrivateKeyMethodConfig { | ||
| } |
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.
Main nits remaining are to fix up these
unique_ptrtype names everywhere to follow theFooPtrstyle in https://github.com/envoyproxy/envoy/blob/main/STYLE.md#deviations-from-google-c-style-guidelines.