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

quiche: make quic proof source and crypto stream pluggable #16658

Merged
merged 43 commits into from
Jun 10, 2021

Conversation

danzh2010
Copy link
Contributor

Commit Message: make quic proof source and crypto streams extensions. Add config for default ones. If not specified in config, the default ones will be used.

Risk Level: low
Testing: existing tests passed
Part of #2557

danzh1989 added 9 commits May 14, 2021 17:05
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #16658 was opened by danzh2010.

see: more, trace.

Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010
Copy link
Contributor Author

/assign @alyssawilk

danzh1989 added 2 commits May 25, 2021 15:22
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
danzh1989 added 2 commits May 27, 2021 11:48
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
danzh1989 added 2 commits May 27, 2021 12:30
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
@@ -48,4 +63,12 @@ message QuicProtocolOptions {
// bound by 6000, regardless of this field or how many connections there are.
google.protobuf.UInt32Value packets_to_read_to_connection_count_ratio = 5
[(validate.rules).uint32 = {gte: 1}];

// The crypto server stream implementation used for this listener.
// If not specified the :ref:`QUICHE defaul one<envoy_v3_api_field_extensions.quic.v3.CryptoServerStreamConfig>` will be used.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should this say "default" instead of "defaul"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

api/envoy/config/listener/v3/quic_config.proto Outdated Show resolved Hide resolved
@@ -48,4 +63,12 @@ message QuicProtocolOptions {
// bound by 6000, regardless of this field or how many connections there are.
google.protobuf.UInt32Value packets_to_read_to_connection_count_ratio = 5
[(validate.rules).uint32 = {gte: 1}];

// The crypto server stream implementation used for this listener.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the C++ name of a class, or something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, added quic class names instead.

Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010 danzh2010 changed the title quiche: extend quic proof source and crypto streams quiche: make quic proof source and crypto stream pluggable Jun 8, 2021
Signed-off-by: Dan Zhang <danzh@google.com>
Copy link
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

API looks good, but one question to verify that this is intentional:
Why do you set the extension name to be different than the extension path in both extensions (e.g., you use envoy.quic.server.crypto_stream.quiche instead of envoy.quic.crypto_stream)?

@danzh2010
Copy link
Contributor Author

API looks good, but one question to verify that this is intentional:
Why do you set the extension name to be different than the extension path in both extensions (e.g., you use envoy.quic.server.crypto_stream.quiche instead of envoy.quic.crypto_stream)?

Yes, that's intentional. "server" and "quiche" is the unique to this extensions. We might add client or non-quiche-default extensions in the future.

@danzh2010
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

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

🐱

Caused by: a #16658 (comment) was created by @danzh2010.

see: more, trace.

Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010
Copy link
Contributor Author

API looks good, but one question to verify that this is intentional:
Why do you set the extension name to be different than the extension path in both extensions (e.g., you use envoy.quic.server.crypto_stream.quiche instead of envoy.quic.crypto_stream)?

Yes, that's intentional. "server" and "quiche" is the unique to this extensions. We might add client or non-quiche-default extensions in the future.

And I will fix their ordering as a follow up.

Copy link
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

/lgtm api

@repokitteh-read-only repokitteh-read-only bot removed the api label Jun 9, 2021
@danzh2010
Copy link
Contributor Author

Can this be merged?

import "envoy/config/core/v3/protocol.proto";

import "google/protobuf/any.proto";
Copy link
Member

Choose a reason for hiding this comment

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

this is unused - could you remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

phlax
phlax previously requested changes Jun 9, 2021
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

@danzh2010 ive added a couple of docs nits

@@ -48,4 +50,14 @@ message QuicProtocolOptions {
// bound by 6000, regardless of this field or how many connections there are.
google.protobuf.UInt32Value packets_to_read_to_connection_count_ratio = 5
[(validate.rules).uint32 = {gte: 1}];

// Configure which implementation of quic::QuicCryptoClientStreamBase to be used for this listener.
Copy link
Member

@phlax phlax Jun 9, 2021

Choose a reason for hiding this comment

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

could you surround quic::QuicCryptoClientStreamBase with `` as its a literal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

// [#extension-category: envoy.quic.server.crypto_stream]
core.v3.TypedExtensionConfig crypto_stream_config = 6;

// Configure which implementation of quic::ProofSource to be used for this listener.
Copy link
Member

Choose a reason for hiding this comment

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

please make quic::ProofSource a literal also

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

/lgtm api

Signed-off-by: Dan Zhang <danzh@google.com>
danzh1989 added 2 commits June 9, 2021 19:34
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
@phlax phlax dismissed their stale review June 10, 2021 06:52

nits addressed - thanks @danzh2010

@adisuissa
Copy link
Contributor

/lgtm api

Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

LGTM! Looks like CI flaked though - I'll kick off another run but feel free to ping me if you notice it's green before I do :-)

@alyssawilk alyssawilk merged commit beb5a93 into envoyproxy:main Jun 10, 2021
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
…y#16658)

Commit Message: make quic proof source and crypto streams extensions. Add config for default ones. If not specified in config, the default ones will be used.

Risk Level: low
Testing: existing tests passed
Part of envoyproxy#2557
Co-authored-by: Dan Zhang <danzh@google.com>
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.

8 participants