Replies: 4 comments 8 replies
-
NGINX Ingress Controller (NGINX/F5) supports re-encrypt via Policies attached to VirtualServer resources. The EgressMTLS fields allow for re-encrypt and mTLS client certificate validation. The CA and client certificate can be referenced as well as various other settings related to the TLS session. A user can specify if SNI should be used and can override which name is sent via I am less familiar with the details, but community NGINX kubernetes ingress also supports re-encrypt use cases. |
Beta Was this translation helpful? Give feedback.
-
I am not sure how much this is just imprecise terminology vs actual design goals, but one thing I would note is "upstream TLS" is broader than "re-encrypt". Users may want to add TLS to traffic hops even if it wasn't TLS originally. Ex: This is more common on egress where TLS is delegated to some centralized proxy |
Beta Was this translation helpful? Give feedback.
-
I agree that we should support this case, it's an important one which has been discussed several times before, but we've yet to have a champion to drive it forward. To add to the list of relevant issues we had the following issues and PRs where this was discussed also:
And the current documentation for this feature hints at the fact that this is not possible here (albeit the wording may be a bit confusing and may need some updating, it says we "can" do it then the next sentence says we can't). Assuming this discussion continues to include comments in favor of this, I would suggest that we start a GEP as a result of this discussion and work towards the precise implementation details so that we can try and get this implemented sooner rather than later. @candita is it feasible for you to drive that forward, and is that a responsibility you want? |
Beta Was this translation helpful? Give feedback.
-
Sorry to be slow, @candita. I really appreciate your roundup of the implementations, it's awesome to have everything in the one place. In terms of actual config, it seems to me like we need at least a CA cert for the backend service(s), maybe with the ability to specify an SNI as well. In addition, it seems like we might want to be able to supply the identity to the Gateway (that is, a client keypair)? However, I'm not in favor of adding something to the Listener yet, for two reasons: Firstly, I'm worried about adding things to Listener while we're still figuring out what we're going to do in GEP-1282 (#1282), because once people start using it, it's difficult to migrate them away. I know we need to solve this problem soon, but I don't want to rush into something that we end up stuck with either. Secondly, the TLS details for connecting to a backend seem to me like they should be tied to the backend, rather than the Listener, that's why I'd like to address #1282. Related to this, do we see that there might be a need for CA certs on a per-backend basis? If so, that's a good argument for pushing that config closer to the backend, via something like we're talking about in #1282. To be clear, I think that both this issue and GEP-1282 are priorities, and we should definitely address them in v0.6.0, which I think we're hoping to get out before October (in time for Kubecon NA). |
Beta Was this translation helpful? Give feedback.
-
Currently only Terminate and Passthrough TLS mode types are specified by the Gateway API. Without Upstream TLS, we cannot offer a comparable experience to our users. The absence of re-encrypt was once debated as a beta “blocker” in #968, and it warrants discussion to be included in the next release.
Upstream TLS, or re-encrypted, traffic is encrypted from the edge to gateway, followed by a re-encrypt before delivery from the gateway to the backend. While Gateway API specifies the edge->gateway hop, it doesn’t specify a way to encrypt the gateway->backend hop of the traffic path. It is missing a mechanism for separately providing the destination CA (certificate authority). It may be missing other components, as mentioned in #1067.
Adding
upstreamTLS
to theListener
tls.mode
types, plus an additional, optionalCACertificateRefs
might be a good basic start. First it’s worth mentioning how re-encrypt is handled by other technologies. Istio, OpenShift, and Contour handle it somewhat differently as outlined below.Istio Gateway appears to support re-encrypt with a DestinationRule to encrypt the gateway->backend hop:
Ref: Istio / Understanding TLS Configuration and Istio / Destination Rule
OpenShift
Route
(comparable to GW APIGateway
) supports re-encrypt with the following route configuration items:Ref: Secured routes - Configuring Routes | Networking | OpenShift Container Platform 4.10
Contour supports re-encrypt from Envoy to the backend using:
Service
annotation: projectcontour.io/upstream-protocol.tls:Ref: Upstream TLS
Some of the ideas discussed so far for filling in this gap in Gateway API are documented in:
Beta Was this translation helpful? Give feedback.
All reactions