Skip to content

ssl: expose upstream TLS client context config#6178

Closed
kyessenov wants to merge 2 commits intoenvoyproxy:masterfrom
kyessenov:add_client_cert_presented
Closed

ssl: expose upstream TLS client context config#6178
kyessenov wants to merge 2 commits intoenvoyproxy:masterfrom
kyessenov:add_client_cert_presented

Conversation

@kyessenov
Copy link
Copy Markdown
Contributor

Description: Populate certificate validation context for upstream host descriptions. We would like to collect whether upstream has client cert defined for telemetry purposes in a custom filter.

/assign @lizan

Risk Level: Small
Testing: None, looking for a recommendation how to test this properly.
Docs Changes: None
Release Notes:

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@lizan
Copy link
Copy Markdown
Member

lizan commented Mar 5, 2019

Do you have a WIP PR that is relying on this in the filter? I don’t think this should be in the factory interface but would like to see how you’re using it.

@kyessenov
Copy link
Copy Markdown
Contributor Author

https://github.com/istio/proxy/pull/2138/files#diff-82ed8ded232725e4efcf543a37d56131R222

Ideally, I could just access the security info from cluster info, but I don't see a way to do it without going through a factory right now.

@lizan
Copy link
Copy Markdown
Member

lizan commented Mar 5, 2019

I think ideally you would like to see what is actually being used for the upstream connection? so something like #6144 but for upstream in StreamInfo sounds more appropriate, no?

@kyessenov
Copy link
Copy Markdown
Contributor Author

Yes and no. I think we do want an actual connection info for telemetry. But we also want a policy check using the intended connection settings. I realize there is an issue that upstream cluster info is inaccessible during decodeHeaders ATM, but that can be fixed separately.

/**
* @return CertificateValidationContextConfig the certificate validation context config.
*/
virtual const Ssl::CertificateValidationContextConfig* certificateValidationContext() const PURE;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a bit of abstraction for this by not leaking Ssl namespace into here, perhaps a Protobuf::Message& config() or abstract class TransportSocketConfig. Ssl::Connection in TransportSocket is due to historical reason and that is to be removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like ATLS is not using certificate validation context. How do we tell whether ATLS config is meant for mutual TLS?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean ALTS? If you expose TransportSocket proto does that work?

@stale
Copy link
Copy Markdown

stale bot commented Mar 15, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 15, 2019
@stale
Copy link
Copy Markdown

stale bot commented Mar 23, 2019

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants