Skip to content

Commit 97002a3

Browse files
authored
Merge branch 'main' into renovate/google.golang.org-grpc-1.x
2 parents a148635 + e138d64 commit 97002a3

File tree

19 files changed

+232
-57
lines changed

19 files changed

+232
-57
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ type NginxProxySpec struct {
7373
//
7474
// +optional
7575
DisableHTTP2 *bool `json:"disableHTTP2,omitempty"`
76+
// DisableSNIHostValidation disables the validation that ensures the SNI hostname
77+
// matches the Host header in HTTPS requests. When disabled, HTTPS connections can
78+
// be reused for requests to different hostnames covered by the same certificate.
79+
// This resolves HTTP/2 connection coalescing issues with wildcard certificates but
80+
// introduces security risks as described in Gateway API GEP-3567.
81+
// If not specified, defaults to false (validation enabled).
82+
//
83+
// +optional
84+
DisableSNIHostValidation *bool `json:"disableSNIHostValidation,omitempty"`
7685
// Kubernetes contains the configuration for the NGINX Deployment and Service Kubernetes objects.
7786
//
7887
// +optional

apis/v1alpha2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106
"required": [],
107107
"type": "boolean"
108108
},
109+
"disableSNIHostValidation": {
110+
"description": "DisableSNIHostValidation disables the validation that ensures the SNI hostname matches the Host header in HTTPS requests. This resolves HTTP/2 connection coalescing issues with wildcard certificates but introduces security risks as described in Gateway API GEP-3567.",
111+
"required": [],
112+
"type": "boolean"
113+
},
109114
"ipFamily": {
110115
"description": "IPFamily specifies the IP family to be used by the NGINX.",
111116
"enum": [

charts/nginx-gateway-fabric/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ nginx:
251251
# disableHTTP2:
252252
# description: DisableHTTP2 defines if http2 should be disabled for all servers.
253253
# type: boolean
254+
# disableSNIHostValidation:
255+
# description: DisableSNIHostValidation disables the validation that ensures the SNI hostname matches the Host header in HTTPS requests. This resolves HTTP/2 connection coalescing issues with wildcard certificates but introduces security risks as described in Gateway API GEP-3567.
256+
# type: boolean
254257
# ipFamily:
255258
# description: IPFamily specifies the IP family to be used by the NGINX.
256259
# type: string

config/crd/bases/gateway.nginx.org_nginxproxies.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ spec:
5656
DisableHTTP2 defines if http2 should be disabled for all servers.
5757
If not specified, or set to false, http2 will be enabled for all servers.
5858
type: boolean
59+
disableSNIHostValidation:
60+
description: |-
61+
DisableSNIHostValidation disables the validation that ensures the SNI hostname
62+
matches the Host header in HTTPS requests. When disabled, HTTPS connections can
63+
be reused for requests to different hostnames covered by the same certificate.
64+
This resolves HTTP/2 connection coalescing issues with wildcard certificates but
65+
introduces security risks as described in Gateway API GEP-3567.
66+
If not specified, defaults to false (validation enabled).
67+
type: boolean
5968
ipFamily:
6069
default: dual
6170
description: |-

deploy/crds.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,15 @@ spec:
641641
DisableHTTP2 defines if http2 should be disabled for all servers.
642642
If not specified, or set to false, http2 will be enabled for all servers.
643643
type: boolean
644+
disableSNIHostValidation:
645+
description: |-
646+
DisableSNIHostValidation disables the validation that ensures the SNI hostname
647+
matches the Host header in HTTPS requests. When disabled, HTTPS connections can
648+
be reused for requests to different hostnames covered by the same certificate.
649+
This resolves HTTP/2 connection coalescing issues with wildcard certificates but
650+
introduces security risks as described in Gateway API GEP-3567.
651+
If not specified, defaults to false (validation enabled).
652+
type: boolean
644653
ipFamily:
645654
default: dual
646655
description: |-

internal/controller/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (h *eventHandlerImpl) sendNginxConfig(ctx context.Context, logger logr.Logg
208208
panic("expected deployment, got nil")
209209
}
210210

211-
cfg := dataplane.BuildConfiguration(ctx, gr, gw, h.cfg.serviceResolver, h.cfg.plus)
211+
cfg := dataplane.BuildConfiguration(ctx, logger, gr, gw, h.cfg.serviceResolver, h.cfg.plus)
212212
depCtx, getErr := h.getDeploymentContext(ctx)
213213
if getErr != nil {
214214
logger.Error(getErr, "error getting deployment context for usage reporting")

internal/controller/nginx/agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func (n *NginxUpdaterImpl) UpdateConfig(
9090
) {
9191
msg := deployment.SetFiles(files)
9292
if msg == nil {
93+
n.logger.V(1).Info("No changes to nginx configuration files, not sending to agent")
9394
return
9495
}
9596

internal/controller/nginx/config/http/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ type ProxySSLVerify struct {
127127

128128
// ServerConfig holds configuration for an HTTP server and IP family to be used by NGINX.
129129
type ServerConfig struct {
130-
Servers []Server
131-
RewriteClientIP shared.RewriteClientIPSettings
132-
IPFamily shared.IPFamily
133-
Plus bool
130+
Servers []Server
131+
RewriteClientIP shared.RewriteClientIPSettings
132+
IPFamily shared.IPFamily
133+
Plus bool
134+
DisableSNIHostValidation bool
134135
}

internal/controller/nginx/config/servers.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ func (g GeneratorImpl) executeServers(
6161
servers, httpMatchPairs := createServers(conf, generator, keepAliveCheck)
6262

6363
serverConfig := http.ServerConfig{
64-
Servers: servers,
65-
IPFamily: getIPFamily(conf.BaseHTTPConfig),
66-
Plus: g.plus,
67-
RewriteClientIP: getRewriteClientIPSettings(conf.BaseHTTPConfig.RewriteClientIPSettings),
64+
Servers: servers,
65+
IPFamily: getIPFamily(conf.BaseHTTPConfig),
66+
Plus: g.plus,
67+
RewriteClientIP: getRewriteClientIPSettings(conf.BaseHTTPConfig.RewriteClientIPSettings),
68+
DisableSNIHostValidation: conf.BaseHTTPConfig.DisableSNIHostValidation,
6869
}
6970

7071
serverResult := executeResult{

0 commit comments

Comments
 (0)