-
Notifications
You must be signed in to change notification settings - Fork 363
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
api: Add TLS configuration attributes in ClientTrafficPolicy #2287
Conversation
🚀 Thank you for contributing to the Envoy Gateway project! 🚀 Before merging, please ensure to follow the process below:
NOTE: Once your PR is under review, please do not rebase and force push it. Otherwise, it will force your reviewers to review the PR from scratch rather than simply look at your latest changes. What's more, you can help expedite the processing of your PR by
|
🚀 Deployed on https://gateway-pr-2287-preview--eg-preview.netlify.app |
api/v1alpha1/tls_types.go
Outdated
type TLSVersions struct { | ||
// Min specifies the minimal TLS verison to use | ||
// +optional | ||
Min TLSVersion `json:"min,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using *TLSVersion
, optional fields are always ptr type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
api/v1alpha1/tls_types.go
Outdated
|
||
// Max specifies the maximal TLS verison to use | ||
// +optional | ||
Max TLSVersion `json:"max,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
api/v1alpha1/tls_types.go
Outdated
// Version details the minimum/maximum TLS protocol verison that | ||
// should be supported by this listener. | ||
// +optional | ||
Version *TLSVersions `json:"version,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to setup a default value for this field in EG?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today EG simply doesn't specify any default, leaving the default up to Envoy itself. Maybe keep that behaviour, so that there will be backwards compatibility with previous EG versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default min version is TLSv1_2
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto
Using TLS protocol versions below TLSv1_2 has serious security considerations and risks.
what is the reason to use version below TLSv1_2 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases there are legacy clients that don't support TLS 1.2 but require an older version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for being explicit here. Setting the default to "whatever Envoy wants" leaves behavior interesting undefined as the Envoy version changes.
As @arkodg notes, Envoy's current default minimum version is TLS 1.2, and there are some very good reasons not to go below that. I'd vote to define Envoy Gateway's minimum as TLS 1.2, while still allowing users to select 1.0 or 1.1 if they need to.
(Allowing the maximum to float with Envoy is OK with me, FTR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I'd also vote to call this stanza versions
plural rather than version
singular.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for being explicit here. Setting the default to "whatever Envoy wants" leaves behavior interesting undefined as the Envoy version changes.
"Whatever Envoy wants" is the current default, and is also what would happen if there is no ClientTrafficPolicy
attached at all.
The TLS_Auto
constant maps all the way to the Envoy Proxy's enum, which is defined as Envoy will choose the optimal TLS version.
Setting the minimum in EG to something other than TLS_Auto
means that if Envoy Proxy fixes its default, maybe for solving some future CVE, then Envoy Gateway doesn't automatically benefit from the fix in Envoy Proxy.
(I'd also vote to call this stanza versions plural rather than version singular.)
I'm thinking to maybe get rid of the versions
intermediate level, and align more closely with how Envoy Proxy models it. I think this would make it clearer.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we could rm versions
in favor of minVersion
& maxVersion
, thoughts @kflynn ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minVersion
and maxVersion
work for me.
I would definitely prefer having Envoy Gateway dictate a particular minimum version for predictability, but I don't feel all that strongly there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified the version specification to remove the intermediate level.
I also set the default minimal version default to be 1.2 and the default maximal version to be 1.3. This is actually exactly the same as it was before, since this is Envoy Proxy's default. I agree that it makes sense to document it more clearly.
api/v1alpha1/tls_types.go
Outdated
// ALPNProtocols supplies the list of ALPN protocols that should be | ||
// exposed by the listener. If left empty, ALPN will not be exposed. | ||
// +optional | ||
ALPNProtocols []string `json:"alpnProtocols,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest a enumerate type instead of string
, since envoyproxy TLS only support two values: h2,http/1.1
or http/1.1
.
IMO, we can add http protocol version enumerate type under api/v1alpha1/shared_types.go
, like:
HTTPProtocolVersion1_1 = "http/1.1"
HTTPProtocolVersion2 = "http/2"
and we can translate their combination into envoyproxy supported values:
["http/1.1", "http/2"]
will be seen ash2,http/1.1
["http/1.1"]
will be seen ashttp/1.1
- invalid otherwise
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe it's better to keep this as strings. I tried to create a configuration in Envoy where the ALPN was something else and Envoy had no issue with that - I was able to use openssl s_client
to negotiate that different protocol string.
If somebody uses a custom version of Envoy that is aware of a different protocol, it should be possible to configure it from EG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, since alpn_protocols
is also a string type in envoyproxy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, need to use a custom type to enforce kube builder validations
check out
gateway/api/v1alpha1/ratelimit_types.go
Line 136 in 52946be
// +kubebuilder:validation:Enum=Exact;RegularExpression;Distinct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But ALPN is more than just "h2" and "http/1.1". If I define this as an enum, it becomes impossible to use anything else. See @guydc's comment #2287 (comment) below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a specific use case where you'd like to set a specific ALPN apart from h2 and http/1.1 ?
its safer to use enums and validate synchronously imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is that validation the values to just "h2" and "http/1.1" is limiting. If this is moved to enums, I think it would make sense to have all of the possible values in the IANA registry available as accepted enums.
EG is not there yet, but at some point it would make sense to have ClientTrafficPolicy
documents attached also to TLS routes. When that happens, it would be possible to have other protocols supported. Examples would include SMTP, MQTT, or IMAP with EG terminating the TLS and routing to a service running in the cluster. If ALPN is limited to just the two possibilities - this won't be possible.
It honestly seems better to me to not set this as an enum. The default is set to [ "h2", "http/1.1" ]
, meaning that most people wouldn't touch this. But when more control over this is needed, it makes more sense to me to make it possible to control this setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to be an enum, as agreed in the meeting.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2287 +/- ##
==========================================
- Coverage 64.75% 64.74% -0.01%
==========================================
Files 113 113
Lines 16567 16567
==========================================
- Hits 10728 10727 -1
- Misses 5165 5168 +3
+ Partials 674 672 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks, defer to @envoyproxy/gateway-maintainers
Depends on envoyproxy#2287. Signed-off-by: Lior Okman <lior.okman@sap.com>
api/v1alpha1/tls_types.go
Outdated
// ALPNProtocols supplies the list of ALPN protocols that should be | ||
// exposed by the listener. If left empty, ALPN will not be exposed. | ||
// +optional | ||
ALPNProtocols []string `json:"alpnProtocols,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the alpn_protocols
be exposed to the API? Are there any particular use cases that need other ALPNs than the default "h2", "http/1.1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases we have customers that want to disable ALPN altogether, or disable negotiating HTTP/2 with ALPN.
Generally, there are cases where it makes sense to have a custom implemented protocol. For example, Istio uses a custom ALPN protocol to distinguish between types of traffic (e.g. istio/istio#40680 ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what the real case for? can you summarize it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases we have customers that want to disable ALPN altogether, or disable negotiating HTTP/2 with ALPN.
AFAIK, normally the server side wants to let the user side choose between HTTP 1.1 and HTTP2 for back compatibility.
Generally, there are cases where it makes sense to have a custom implemented protocol. For example, Istio uses a custom ALPN protocol to distinguish between types of traffic (e.g. istio/istio#40680 ).
The Istio use case is legitimate, but Istio just uses ALPN internally without exposing it as an API, and it's not a Gateway scenario.
I suggest removing this from the API if we don't have a concrete use case right now. We can always add it later, but it will be really hard to remove an existing feature from API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Envoy disables ALPN by default. Envoy Gateway enables ALPN and sets it to [h2, http/1.1]
by default. It's a reasonable behavior, but perhaps users should have the option to control this parameter.
In general, other protos are supported in the IANA registry. In rare cases, it could be necessary to support other protos, e.g. there was a period where curl
was spec-compliant and used http/1.0
as ALPN for HTTP/1.0.
Other Gateways like Emissary-Ingress do support configuration of alpn settings. The Emissary docs imply that it could be necessary to explicitly set ALPN to [h2]
for gRPC. I'm not sure if this generally mandatory or required for specific grpc clients. I assume that this was also the considered when ALPN was included in CTP. Maybe @AliceProxy can provide some context here as well.
Another reason to control ALPN is related to HTTP version preservation and compatibility.
- Protocol downgrades can create certain vulnerabilities, e.g. as mentioned here. If a particular backend only supports HTTP/1, the default EG configuration will make protocol downgrades possible. HTTP2 => HTTP1 is very common, but some operators may prefer to use the same protocol version on both backend and proxy, which will require customizing ALPN.
- When Envoy is used as a Gateway and it's proxying traffic to an HTTP/1 backend, the backend owners may prefer that clients use HTTP/1. Some industry examples: Akamai doesn't support HTTP/2 by default, Cloudflare support HTTP/2 Disablement, CloudFront support HTTP/2 Disablement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer to @envoyproxy/gateway-maintainers for more inputs.
// SignatureAlgorithms specifies which signature algorithms the listener should | ||
// support. | ||
// +optional | ||
SignatureAlgorithms []string `json:"signatureAlgorithms,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, are there any use cases that need to configure CipherSuites,ECDHCurves, and SignatureAlgorithms? I'm not an expert on TLS, I'm just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If TLS protocol versions below 1.2 are used, the default cipher suite is not going to work. See the documentation here.
The ability to control the supported curves and signature algorithms is needed for some scenarios where additional hardening is needed - the customer wants to specify exactly what should be used.
While most use-cases shouldn't need to touch the defaults, sometimes it's required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer to @envoyproxy/gateway-maintainers for more inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This is a rare use case, but it is a real use case.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be an enum ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is so much of a moving target that even the Envoy Proxy documentation doesn't specify what the up-to-date values are. I'm not sure it makes sense to have an enum here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, lets keep it as is
should these be defined under |
Yes, if upstream them to Gateway API. |
@zhaohuabing referring to the |
Ha, I haven't noticed that :-) |
Version *TLSVersions `json:"version,omitempty"` | ||
|
||
// CipherSuites specifies the set of cipher suites supported when | ||
// negotiating TLS 1.0 - 1.2. This setting has no effect for TLS 1.3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be enforced with CEL validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
// +optional | ||
CipherSuites []string `json:"ciphers,omitempty"` | ||
|
||
// ECDHCurves specifies the set of supported ECDH curves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default needs to be specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
api/v1alpha1/tls_types.go
Outdated
SignatureAlgorithms []string `json:"signatureAlgorithms,omitempty"` | ||
|
||
// ALPNProtocols supplies the list of ALPN protocols that should be | ||
// exposed by the listener. If left empty, ALPN will not be exposed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// exposed by the listener. If left empty, ALPN will not be exposed. | |
// exposed by the listener. By default http/1.1 and http/2 are enabled . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
@arkodg That's a good point. The last activity related to Gateway TLS More recently, the Policy Attachment GEP mentioned I feel that both alternatives (policy and options) are equally valid from the Gateway-API perspective. Policies are more flexible (e.g. supporting both |
jotting down some more pros and cons of each approach Using the
Cons
Creating a new field within ClientTrafficPolicy
Cons
|
I think that the strongly typed config is significantly more important than having the configuration close to the listener. Just the |
More pros for the policy approach:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for commenting on the wrong PR! 🤦♂️ I've added some here, and yes, I'd like to request some changes here. Thanks!
api/v1alpha1/tls_types.go
Outdated
// Version details the minimum/maximum TLS protocol verison that | ||
// should be supported by this listener. | ||
// +optional | ||
Version *TLSVersions `json:"version,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I'd also vote to call this stanza versions
plural rather than version
singular.)
api/v1alpha1/tls_types.go
Outdated
TLSAuto TLSVersion = "TLS_Auto" | ||
// TLSv1_0 specifies TLS version 1.0 | ||
TLSv10 TLSVersion = "TLSv1_0" | ||
// TLSv1_1 specifies TLS version 1.1 | ||
TLSv11 TLSVersion = "TLSv1_1" | ||
// TLSv1.2 specifies TLS version 1.2 | ||
TLSv12 TLSVersion = "TLSv1_2" | ||
// TLSv1.3 specifies TLS version 1.3 | ||
TLSv13 TLSVersion = "TLSv1_3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted on the wrong PR 🤦♂️, I'd rather these just be "v1.2" etc. Forcing the user to type "TLS_" all the type feels kind of pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the TLS
prefixes from the enum values.
(I'd also vote to call this stanza versions plural rather than version singular.)
I think maybe it would be better to get rid of the intermediate version
level to make it clearer.
That would make it:
tls:
minTLSVersion: v1_2
maxTLSVersion: v1_3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go with @arkodg's take here:
tls:
minVersion: v1.2
maxVersion: v1.3
(I don't care terribly if it's v1.2
or v1_2
, though I'd slightly prefer the .
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the intermediate version
structure.
api/v1alpha1/tls_types.go
Outdated
Min *TLSVersion `json:"min,omitempty"` | ||
|
||
// Max specifies the maximal TLS version to use | ||
// +optional | ||
Max *TLSVersion `json:"max,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also as noted on the wrong PR 🤦♂️, I think it's important to allow setting either of these without being forced to set the other.
OTOH if - as I recommend - the default minimum is v1.2, then setting the maximum to e.g. v1.1 without also setting the minimum lower should be an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently the case. That's why both of these fields are optional. If you set one but not the other, then Envoy Proxy will use its default, (which is TLS_AUTO
) and is documented as (DEFAULT) Envoy will choose the optimal TLS version.
This works correctly regardless of which of the fields was set or unset.
The implementation itself verifies that the minimum version is not greater than the maximum version. Since these are string constants, it's not easy to concisely validate correct ordering with CEL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the other PR, it would actually throw an error if you set min
and left max
at AUTO
, since AUTO
is defined to have the value -1
. 🙂 That's what prompted me to look at this.
I agree that expressing this in CEL is tricky. 🙁 I'm not actually sure it's possible...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the API is agreed upon, I'll make sure to add tests (as part of the other PR) to verify that the verification works correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added CEL validation to verify that tls.minVersion <= tls.maxVersion
removing the
This API can be deprecated once these fields are natively introduced upstream |
api/v1alpha1/tls_types.go
Outdated
// - ECDHE-RSA-AES256-GCM-SHA384 | ||
// | ||
// +optional | ||
CipherSuites []string `json:"ciphers,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be made into an enum for better validation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to make it into an enum, because the values in here are not always singular values.
See the cipher list documentation from Envoy Proxy's underlying library.
The values in this array are expressions, allowing things like [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]
, which is an expression that says "either the first cipher or the second".
Additional possible values are to use !
or '+' or '-' as the prefix for a cipher name. This cannot be expressed as an enum in Envoy Gateway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, lets keep it as is
// In builds using BoringSSL FIPS the default curve is: | ||
// - P-256 | ||
// +optional | ||
ECDHCurves []string `json:"ecdhCurves,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be made into an enum for better validation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The set of valid values are not clear.
Envoy Proxy doesn't define them - the underlying BoringSSL library does. If Envoy Proxy is compiled against a different version of BoringSSL, there may be different valid values than the ones the EnvoyGateway code base uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @liorokman that curves & ciphers should not be enums – there's not going to be a great way to validate, especially in BYOEnvoy cases. 🙁 This is a case where we should be thinking carefully about the behavior when there's an error, and documenting it. (Personally I'd like to see a status on the Gateway
itself, recognizing that that's somewhat fraught with peril...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool lets keep as is
api/v1alpha1/tls_types.go
Outdated
// - ECDHE-RSA-AES256-GCM-SHA384 | ||
// | ||
// +optional | ||
CipherSuites []string `json:"ciphers,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go field name and json field name dont match - cipherSuites
and ciphers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, appreciate addressing all the review comments and enhancing the doc strings
@liorokman seeing some merge conflicts, can you rebase ? |
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Documented the defaults used for fields. Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
protocol version. Defined the default minimal TLS version to be 1.2 and the default maximal TLS version to 1.3. Signed-off-by: Lior Okman <lior.okman@sap.com>
Signed-off-by: Lior Okman <lior.okman@sap.com>
to tls.maxVersion Signed-off-by: Lior Okman <lior.okman@sap.com>
was specified. Fixed a CEL issue where setting tls.maxVersion without setting tls.minVersion was not correctly validated Signed-off-by: Lior Okman <lior.okman@sap.com>
918a2d2
to
a959866
Compare
Signed-off-by: Lior Okman <lior.okman@sap.com>
Require that if HTTP/3 is enabled then ALPN protocols are not specified, since HTTP/3 sets a custom "h3" protocol in ALPN. Signed-off-by: Lior Okman <lior.okman@sap.com>
Depends on envoyproxy#2287. Signed-off-by: Lior Okman <lior.okman@sap.com>
Depends on envoyproxy#2287. Signed-off-by: Lior Okman <lior.okman@sap.com>
Depends on envoyproxy#2287. Signed-off-by: Lior Okman <lior.okman@sap.com>
…2297) * api: Add TLS configuration attributes in ClientTrafficPolicy Signed-off-by: Lior Okman <lior.okman@sap.com> * Fixed typos in the comments. Signed-off-by: Lior Okman <lior.okman@sap.com> * Updated the comment for `TLSSettings`. Signed-off-by: Lior Okman <lior.okman@sap.com> * Regenerated after rebasing Signed-off-by: Lior Okman <lior.okman@sap.com> * api: Add TLS configuration attributes in ClientTrafficPolicy Signed-off-by: Lior Okman <lior.okman@sap.com> * feat: Implement setting common TLS parameters in ClientTrafficPolicy. Depends on #2287. Signed-off-by: Lior Okman <lior.okman@sap.com> * Fixed linter and gen-check errors Signed-off-by: Lior Okman <lior.okman@sap.com> * Implement the changes required after the reviewed API Signed-off-by: Lior Okman <lior.okman@sap.com> * Set ALPN protocols in QUIC in the same way as in HTTPS Signed-off-by: Lior Okman <lior.okman@sap.com> * * Regenerated and recreated the manifests after rebase * Make the new tests pass Signed-off-by: Lior Okman <lior.okman@sap.com> * Alphabetize the output test yamls to make "gen-check" pass Signed-off-by: Lior Okman <lior.okman@sap.com> * * Remove references to the API from the XDS layer * Use non API types in the IR structure * Rename TLSListenerConfig to TLSConfig * Use string slices instead of Enum slices for ALPN in the IR structure Signed-off-by: Lior Okman <lior.okman@sap.com> * Changed the TLS protocol version constants to have a dot instead of an underscore separator. Signed-off-by: Lior Okman <lior.okman@sap.com> * * Reworked the ALPN logic so that an empty array in the IR layer translates to the required defaults in the XDS layer * Fixed translation issues between the ALPN constants and the values required on the XDS level Signed-off-by: Lior Okman <lior.okman@sap.com> * Make gen-check pass Signed-off-by: Lior Okman <lior.okman@sap.com> * * Require that ALPN constants are also valid ALPN identification strings. * Replace the user-facing "http/2" ALPN string with "h2". Signed-off-by: Lior Okman <lior.okman@sap.com> --------- Signed-off-by: Lior Okman <lior.okman@sap.com>
What this PR does / why we need it:
This PR adds the relevant optional TLS configuration attributes to
ClientTrafficPolicy
Which issue(s) this PR fixes:
Related to #2286