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

Support skipping certificate verification when establishing a Quic connection #17700

Open
mum4k opened this issue Aug 12, 2021 · 9 comments
Open
Labels

Comments

@mum4k
Copy link
Contributor

mum4k commented Aug 12, 2021

Envoys seems to skip certificate verifications by default as documented in the API.

However the Quic implementation of the createQuicNetworkConnection function currently doesn't take in any configuration and always uses the EnvoyQuicProofVerifier.

This prevents establishment of Quic connection in load testing applications where we might be running with test / bogus certificates. This might also be affecting other use cases, so hoping to start a discussion whether this is something we want to improve by allowing a configuration that skips the certificate verification.

@mum4k mum4k added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Aug 12, 2021
@danzh2010
Copy link
Contributor

danzh2010 commented Aug 12, 2021

Worth pointing out that the Envoy config trusted_ca allows skipping root cert verification. This should be supported already by EnvoyQuicProofVerifier which calls into the same defatul cert validator.
However, the difference is that EnvoyQuicProofVerifier also verifies hostname in CHLO matches SNI domains in leaf cert:

for (const absl::string_view& config_san : cert_view->subject_alt_name_domains()) {

It worth discussing whether this match should be mandatory or configurable.

@mum4k
Copy link
Contributor Author

mum4k commented Aug 12, 2021

Thank you @danzh2010 for adding the context, I confirm that this is the verification in question.

@ggreenway ggreenway added area/quic and removed triage Issue requires triage labels Aug 13, 2021
@alyssawilk
Copy link
Contributor

I'm torn here - I like QUIC matching existing TLS behavior but I also like verifying by default.
I am inclined to say if we want to change the default behavior we should do it before QUIC exits alpha (and config locks down). Given QUIC and TLS share config I lean towards compatibility and sorting out TLS defaults later.
cc @yanavlasov @RyanTheOptimist @mattklein123 for thoughts

@RyanTheOptimist
Copy link
Contributor

Wow! I feel very strongly that certificates should be verified by default. Having things insecure by default seems like a disaster waiting to happen. What would it take to change this behavior? (Maybe this is not practical in the short term but I really think this needs some investigation)

@alyssawilk
Copy link
Contributor

generally changing high risk config defaults like this in Envoy involves a envoy-announce email, and a runtime guarded change if the config isn't present, so folks can flip the flag while they realize the envoy-announce email affected them. This is likely to break some deployments but I agree I think for security it's one of those breaking changes we really ought to do.
I'll take on comms and the deprecation dance if @mattklein123 agrees it's worth tackling.

@mattklein123 mattklein123 added help wanted Needs help! and removed enhancement Feature requests. Not bugs or questions. labels Aug 19, 2021
@mattklein123
Copy link
Member

All things being equal I agree we should verify by default, however 2 gotchas:

  1. As Alyssa says we will need to warn first, then fail with runtime, etc. It will be a lengthy migration.
  2. The verification settings are incredibly convoluted. Figuring out how to decide in code/config whether verification is "enabled" is going to require some debate in and of itself, and then quite a bit of testing.

I think it would be worth it to track ^ as a separate issue.

@alyssawilk
Copy link
Contributor

Ok, so what I'd suggest then is we leave QUIC verifying by default, and add the knob to turn it off at Nighthawk's convenience: as it'll keep the prior default there's no need to lock this in before alpha wraps up.

What we should do before we leave alpha @danzh2010 is to document the inversion in both QUIC and TLS docs so folks don't get surprised. The explanation can link to the issue tracking TLS switching defaults, which I've just filed as #17771

@danzh2010
Copy link
Contributor

I will update the document about the difference. Adding the knob to turn off verification is not a blocker for MVP, right?

@alyssawilk
Copy link
Contributor

correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants