Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zaharidichev
Copy link
Member

This change adds support for TLS in the ProxyProtocol enum. For the time being we can only use SNIs
to do do TLS routing.

Signed-off-by: Zahari Dichev [email protected]

Signed-off-by: Zahari Dichev <[email protected]>
@cratelyn
Copy link
Member

cratelyn commented Oct 3, 2024

    = Solution: Upgrade to >=0.12.3 (try `cargo update -p tonic`)
   = tonic v0.10.2
     └── linkerd2-proxy-api v0.14.0

this advisory is only two days old, so i suspect it's unrelated to your changes here.

@cratelyn
Copy link
Member

cratelyn commented Oct 3, 2024

note: this only affects v0.12.0 - v0.12.2 from the advisory, here: GHSA-4jwc-w2hc-78qv. we're unaffected, via use of v0.10.2.

https://github.com/rustsec/advisory-db/pull/2094/files patched the advisory db, so we can probably re-run ci now for a ✔️


message Distribution {
oneof kind {
Empty empty = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is an empty variant strictly necessary here? We should be able to use presence of the other variants to indicate empty.

Copy link
Member Author

Choose a reason for hiding this comment

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

This has been the pattern followed through the rest of the API

Copy link
Member

@cratelyn cratelyn Oct 14, 2024

Choose a reason for hiding this comment

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

https://github.com/linkerd/linkerd2-proxy-api/blob/main/proto/outbound.proto#L139 i was curious myself, so here's an existing example of that pattern, just to demonstrate. there are a few more in that file if you grep for empty = 1.

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 so that this state is explicit and can't be ambiguous i.e. if a field is unset.

Cargo.toml Outdated
@@ -16,6 +16,7 @@ default = []
arbitrary = ["quickcheck"]
destination = ["http-types", "net", "prost-types", "tonic/codegen"]
grpc-route = ["http-route"]
tls-route = []
Copy link
Member

Choose a reason for hiding this comment

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

nit: sort

Signed-off-by: Zahari Dichev <[email protected]>
@zaharidichev zaharidichev merged commit c9914c2 into main Oct 15, 2024
7 of 8 checks passed
@zaharidichev zaharidichev deleted the zd/tls-routes branch October 15, 2024 11:53
zaharidichev added a commit that referenced this pull request Oct 27, 2024
#383 introduced support for route and backend level errors. This commit changes
the structure of these types in order to make the route error optional
(protobuf enums are non-optional values unless an experimental feature is specified).

Signed-off-by: Zahari Dichev <[email protected]>
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.

4 participants