Skip to content

Support skipping certificate verification when establishing a Quic connection #17700

Open

Description

@mum4k

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.

Activity

  1. added
    enhancement
    triage
    on Aug 12, 2021
  2. danzh2010 commented on Aug 12, 2021

    @danzh2010
    Contributor

    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.

  3. mum4k commented on Aug 12, 2021

    @mum4k
    ContributorAuthor

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

  4. added and removed
    triage
    on Aug 13, 2021
  5. alyssawilk commented on Aug 16, 2021

    @alyssawilk
    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

  6. RyanTheOptimist commented on Aug 18, 2021

    @RyanTheOptimist
    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)

  7. alyssawilk commented on Aug 18, 2021

    @alyssawilk
    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.

  8. added
    help wanted
    and removed
    enhancement
    on Aug 19, 2021
  9. mattklein123 commented on Aug 19, 2021

    @mattklein123
    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.

  10. alyssawilk commented on Aug 19, 2021

    @alyssawilk
    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

  11. danzh2010 commented on Aug 19, 2021

    @danzh2010
    Contributor

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

  12. alyssawilk commented on Aug 19, 2021

    @alyssawilk
    Contributor

    correct!

  13. spodobetsd commented on Aug 20, 2025

    @spodobetsd

    Am I correct in understanding that if self-signed certificates are used, for example in Kubernetes when making service-to-service requests via envoy-proxy, quic will not be able to establish a connection?

  14. danzh2010 commented on Aug 20, 2025

    @danzh2010
    Contributor

    Am I correct in understanding that if self-signed certificates are used, for example in Kubernetes when making service-to-service requests via envoy-proxy, quic will not be able to establish a connection?

    Self-signed certs are okay as long as host name matches SAN in the certs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions