tls: move ssl connection info into SocketAddressProvider#17334
tls: move ssl connection info into SocketAddressProvider#17334ggreenway merged 21 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
envoy/network/connection.h
Outdated
| */ | ||
| virtual const SocketAddressProvider& addressProvider() const PURE; | ||
| virtual SocketAddressProviderSharedPtr addressProviderSharedPtr() const PURE; | ||
| virtual SocketAddressSetterSharedPtr addressProviderSharedPtr() const PURE; |
There was a problem hiding this comment.
note: I have to change this due to allow the StreamInfo to set the upstream SSL connection into the AddressProvider.
| * @param connection_info sets the upstream ssl connection. | ||
| */ | ||
| virtual void | ||
| setUpstreamSslConnection(const Ssl::ConnectionInfoConstSharedPtr& ssl_connection_info) PURE; |
There was a problem hiding this comment.
This was kept to avoid change the 'downstreamSslConnection()' interface as non const. I feel change the 'downstreamSslConnection' isn't right direction.
Also this is why I can change the place to set the upstream SSL connection
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
|
/retest |
|
Retrying Azure Pipelines: |
envoy/network/socket.h
Outdated
| * @return the upstream SSL connection. This will be nullptr if the upstream | ||
| * connection does not use SSL. | ||
| */ | ||
| virtual Ssl::ConnectionInfoConstSharedPtr upstreamSslConnection() const PURE; |
There was a problem hiding this comment.
I think this interface should only have the downstreamSslConnection(). All the other fields here are specific to the downstream connection, so including the upstream connection seems misleading.
There was a problem hiding this comment.
Yes, I feel strange too. Although we can keep this in the StreamInfo also, but it still feel strange, since the StreamInfo is only mean to stream for one direction(upstream, or downstream). Also can see the downstream StreamInfo's upstream SSL info is copied from upstream StreamInfo. For example:
envoy/source/common/tcp_proxy/tcp_proxy.cc
Line 531 in a8033fa
So in the end, the upstream SSL info is still mixed with downstream SSL info into downstream StreamInfo. Based on my guess the reason is the filter need the upstream StreamInfo, but other than tcpProxy or HttpRouter filter can't get the upstream StreamInfo, since the upstream StreamInfo is created the last filter (tcpProxy/http router filter).
There was a problem hiding this comment.
The streaminfo is a bit odd, and has a mix of upstream/downstream. But SocketAddressProvider is only supposed to have information that should be copied to each request on the connection. The upstream ssl info should not be copied between requests, so I don't think it belongs here.
There was a problem hiding this comment.
thanks, got it, let me revert the change to upstream SSL info.
This reverts commit 2df315a. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
This reverts commit d04acbd. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
This reverts commit 3b56911. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
This reverts commit f9881a3. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
…ider" This reverts commit 2dffc9f. Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
emm...I can't reproduce the ci failure |
|
Looks like the test timed out. Unsure why. Let's see if it's happier in CI today: /retest |
|
Retrying Azure Pipelines: |
|
The last two guarddog tests are taking over 1 minute each, so the test is timing out. Unsure why. Can you try merging main into the PR to see if that helps? |
got it, thanks |
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
|
@soulxu CI is fixed, but now's there a merge conflict; please resolve. |
|
/wait |
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
resolved, thanks again! |
|
emm.... I will take a look at this tomorrow. @ggreenway do you have any suggestions on fixing the coverage test, just add more tests? |
|
Looks like this should address the coverage issue. Merge from main to get it. Sorry for all the CI trouble on this PR. a066b5e |
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
…bridge-stream * upstream/main: (32 commits) tls: move ssl connection info into SocketAddressProvider (envoyproxy#17334) conn pool: default enable runtime feature `conn_pool_delete_when_idle` (envoyproxy#17577) api: LEDS api introduction (envoyproxy#17419) kafka: add support for api versions request in mesh-filter (envoyproxy#17475) ext_proc: Implement BUFFERED_PARTIAL processing mode (envoyproxy#17531) tooling: Async/pathlib/mypy cleanups and utils (envoyproxy#17505) xds: restructure CertificateProvider fields (envoyproxy#17201) Refactor OverloadIntegrationTest breaking out a test base, and the fake resource monitors. (envoyproxy#17530) listener: move active connection collection out of active tcp listener (envoyproxy#16947) tools: format checks for backticks (envoyproxy#17566) coverage: set lower limit for common/quic and common (envoyproxy#17573) v2: final source removal (envoyproxy#17565) test: bumping coverage (envoyproxy#17564) quic: enforcing header size and contents (envoyproxy#17520) Support for canonicalizing URI properly for AWS SigV4 signer (envoyproxy#17137) listener: add a stat for transport socket connect timeout (envoyproxy#17458) listener: add listen() error handling (envoyproxy#17427) http: return per route config when direct response is set (envoyproxy#17449) removing most v2 references from source/ (envoyproxy#17415) bug fix: return bootstrap when validating config (envoyproxy#17499) ... Signed-off-by: Garrett Bourg <bourg@squareup.com>
…17334) Part of envoyproxy#17168 Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Commit Message: tls: move ssl connection info into SocketAddressProvider
Additional Description:
Moving the StreamInfo's SSL connection info into the SocketAddressProvider.
Risk Level: low
Testing: unittest
Docs Changes: n/a
Release Notes: n/a
Part of #17168
Signed-off-by: He Jie Xu hejie.xu@intel.com