Sds: Ssl socket factory owns ContextConfig#4028
Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom Aug 2, 2018
Merged
Sds: Ssl socket factory owns ContextConfig#4028mattklein123 merged 3 commits intoenvoyproxy:masterfrom
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Wayne Zhang <qiwzhang@google.com>
Signed-off-by: Wayne Zhang <qiwzhang@google.com>
Contributor
Author
|
@lizan @PiotrSikora could you help to review it? |
lizan
reviewed
Aug 1, 2018
Member
lizan
left a comment
There was a problem hiding this comment.
Generally LGTM for make TransportSocketFactory own ContextConfig, but prefer deferring onConfigUpdate.
source/common/ssl/ssl_socket.h
Outdated
|
|
||
| private: | ||
| // Will be called when config_ is changed | ||
| void onConfigUpdate(); |
Member
There was a problem hiding this comment.
How this will be called? and tests? If the caller is not in this PR, include this in that PR.
Contributor
Author
There was a problem hiding this comment.
Done. onConfigUpdate is removed.
Signed-off-by: Wayne Zhang <qiwzhang@google.com>
lizan
approved these changes
Aug 2, 2018
PiotrSikora
reviewed
Aug 2, 2018
| private: | ||
| Ssl::ContextManager& manager_; | ||
| Stats::Scope& stats_scope_; | ||
| ClientContextConfigPtr config_; |
Contributor
There was a problem hiding this comment.
Why do we need to retain those? IT doesn't seem that those are used anywhere?
Contributor
Author
There was a problem hiding this comment.
It will be used in a later PR to create a new context when context_config is updated with new secret.
Contributor
Author
There was a problem hiding this comment.
Here is the code to use it
void ServerSslSocketFactory::onConfigUpdate() {
ssl_ctx_ = manager_.createSslServerContext(stats_scope_, *config_, server_names_);
}
PiotrSikora
approved these changes
Aug 2, 2018
mattklein123
approved these changes
Aug 2, 2018
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description:
This change is one of PR to support dynamic SDS. The overall implementation PR is here #3700
Changes in this PR
Risk Level: Low
Testing: Unit-test