Skip to content
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

tls: separate out cert validation logic from ContextImpl #14757

Merged
merged 3 commits into from
Jan 26, 2021

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Jan 20, 2021

The first step towards #14614. Ref #14614 (comment)

Note that the change is almost moving codes from context_impl to cert_validator/** with a bit of necessary tweaks.

Commit Message: tls: separate out cert validation logic from ContextImpl
Additional Description: In order to create the extension point for certificate validation, separated out the cert validation logics from Tls::ContextImpl, and move them to Tls::DefaultCertValidator which implements Tls::CertValidator interface. Ref: #14614 and #9284
Risk Level: low (almost code moves)
Testing: unittest
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

cc @lizan

@mathetake mathetake changed the title [wip] tls: separate out cert validation logic from ContextImpl tls: separate out cert validation logic from ContextImpl Jan 20, 2021
@mathetake mathetake force-pushed the refactor-cert-validation branch from 38907b4 to 7004480 Compare January 20, 2021 06:56
@mathetake mathetake marked this pull request as ready for review January 20, 2021 08:29
@lizan
Copy link
Member

lizan commented Jan 21, 2021

Overall this looks good, the coverage is missing from some error config part:
https://storage.googleapis.com/envoy-pr/7004480/coverage/source/extensions/transport_sockets/tls/cert_validator/default_validator.cc.gcov.html

were them covered before?

@mathetake
Copy link
Member Author

looks like they haven't been covered before as well :https://storage.googleapis.com/envoy-pr/e1ca2ab/coverage/source/extensions/transport_sockets/tls/context_impl.cc.gcov.html

but some of them are formatted into multiple lines in this PR plus the file size becomes smaller so I think that is why the coverage goes down in terms of the number of lines covered 😕

@mathetake
Copy link
Member Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14757 (comment) was created by @mathetake.

see: more, trace.

@mathetake
Copy link
Member Author

@lizan added the coverage exception. PTAL

@lizan
Copy link
Member

lizan commented Jan 25, 2021

@ggreenway for non-tetrands review

Copy link
Contributor

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

LGTM

@ggreenway ggreenway merged commit 0bc3fc9 into envoyproxy:main Jan 26, 2021
@mathetake mathetake deleted the refactor-cert-validation branch January 26, 2021 01:00
ipuustin pushed a commit to ipuustin/envoy that referenced this pull request Sep 23, 2021
port of tls: separate out cert validation logic from ContextImpl (envoyproxy#14757)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants