You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This GEP proposes a way to validate the TLS certificate presented by the frontend client to the server
11
11
(Gateway in this case) during a [TLS Handshake Protocol][].
12
12
13
+
## Connection coalescing security issue
14
+
15
+
Gateway API standard defines a `Listener` as "the concept of a logical endpoint where a Gateway accepts network connections." This statement is incorrect because once the connection is established (this applies to both HTTP and TLS traffic) it can be reused across multiple listeners sharing the same port. This might lead to bypassing client certificate validation configuration for a given `Listener`. Those concerns were raised in [GEP-3567](). To provide the best experience for gateway users and secure their applications, client certificate configuration needs to be introduced with finer granularity per-port (binding to TCP connection).
16
+
13
17
## Goals
14
18
15
19
* Define an API field to specify the CA Certificate within the Gateway configuration that can be used as a trust anchor to validate the certificates presented by the client.
16
20
This use case has been highlighted in the [TLS Configuration GEP][] under segment 1 and in the [Gateway API TLS Use Cases][] document under point 7.
21
+
* Introduce explicit client certificate validation modes that reflect common TLS behaviors (e.g., optional vs. required client certs)
17
22
* Ensure the configuration mitigates the authentication bypass risks associated with HTTP/2 connection coalesing as described in [GEP-3567](https://gateway-api.sigs.k8s.io/geps/gep-3567/#interaction-with-client-cert-validation).
18
-
* Supporting a mode where validating client certificates is optional, useful for debugging and migrating to strict TLS.
19
23
20
24
## Non-Goals
21
25
* Define other fields that can be used to verify the client certificate such as the Certificate Hash.
22
26
23
27
### API
24
28
25
-
* Introduce a `FrontendValidation` field of type `FrontendTLSValidation` within [GatewayTLSConfig][] that can be used to validate the peer (frontend) with which the TLS connection is being made.
29
+
* Introduce two new structs `TLSConfig` and `FrontendTLSValidation` allowing for the definition of certificate validation used to authenticate the peer (frontend) in a TLS connection. A new `tls` field, storing an array of `TLSConfigs`, will be added to the gateway object.
30
+
* This new field is separate from the existing [BackendTLSPolicy][] configuration. [BackendTLSPolicy][] controls TLS certificate validation for connections *from* the Gateway to the backend service.
31
+
This proposal adds the ability to validate the TLS certificate presented by the *client* connecting to the Gateway (the frontend).
32
+
These two validation mechanisms operate independently and can be used simultaneously.
26
33
* Introduce a `caCertificateRefs` field within `FrontendTLSValidation` that can be used to specify a list of CA Certificates that can be used as a trust anchor to validate the certificates presented by the client.
27
-
* This new field is separate from the existing [BackendTLSPolicy][] configuration. [BackendTLSPolicy][] controls TLS certificate validation for connections *from* the
28
-
Gateway to the backend service. This proposal adds the ability to validate the TLS certificate presented by the *client* connecting to the Gateway (the
29
-
frontend). These two validation mechanisms operate independently and can be used simultaneously.
30
-
* Also introduce a `ObjectReference` structure that can be used to specify `caCertificateRefs` references.
34
+
* Add a new `FrontendValidationModeType` enum within `FrontendTLSValidation` indicating how gateway should validate client certificates. As for now we support following values but it might change in the future:
35
+
1)`AllowValidOnly`
36
+
2)`AllowInvalidOrMissingCert`
37
+
* Introduce a `ObjectReference` structure that can be used to specify `caCertificateRefs` references.
38
+
* Introduce a `tls` field within the Gateway Spec to allow for a common TLS configuration to apply across all listeners.
39
+
40
+
### Impact on listeners
41
+
42
+
This proposal removes frontendTLSValidation from Listener's TLS configuration and introduces gateways level per port configuration. This is a breaking change for exisitng implementation which uses this feature from Experimental API.
43
+
Once gateway level TLS is configured (either by default or for a specific port), the TLS settings will apply to all existing and newly created Listeners that match the configuration.
31
44
32
45
#### GO
33
46
@@ -65,57 +78,131 @@ type ObjectReference struct {
65
78
Namespace *Namespace `json:"namespace,omitempty"`
66
79
}
67
80
68
-
typeGatewayTLSConfigstruct {
69
-
......
70
-
// FrontendValidation holds configuration information for validating the frontend (client).
71
-
// Setting this field will require clients to send a client certificate
72
-
// required for validation during the TLS handshake. In browsers this may result in a dialog appearing
73
-
// that requests a user to specify the client certificate.
74
-
// The maximum depth of a certificate chain accepted in verification is Implementation specific.
// CACertificateRefs contains one or more references to
124
+
// Kubernetes objects that contain TLS certificates of
125
+
// the Certificate Authorities that can be used
126
+
// as a trust anchor to validate the certificates presented by the client.
127
+
//
128
+
// A single CA certificate reference to a Kubernetes ConfigMap
129
+
// has "Core" support.
130
+
// Implementations MAY choose to support attaching multiple CA certificates to
131
+
// a Listener, but this behavior is implementation-specific.
132
+
//
133
+
// Support: Core - A single reference to a Kubernetes ConfigMap
134
+
// with the CA certificate in a key named `ca.crt`.
135
+
//
136
+
// Support: Implementation-specific (More than one certificate in a ConfigMap with different keys or more than one reference, or other kinds of resources).
137
+
//
138
+
// References to a resource in a different namespace are invalid UNLESS there
139
+
// is a ReferenceGrant in the target namespace that allows the certificate
140
+
// to be attached. If a ReferenceGrant does not allow this reference, the
141
+
// "ResolvedRefs" condition MUST be set to False for this listener with the
0 commit comments