Skip to content

Commit d1b8fcd

Browse files
author
openshift-service-mesh-bot
committed
Automator: merge upstream changes to openshift-service-mesh/istio@master
* upstream/master: gatewayapi: make the cors origin stricter with wildcards (#59026) Automator: update istio/client-go@master dependency in istio/istio@master (#59036) Automator: update istio/client-go@master dependency in istio/istio@master (#59034) add tls-inspector for listener with only TLS ports (#59028) test: add support for customizing min TLS version and ECDH curves in echo client/server (#58918) Automator: update go-control-plane in istio/istio@master (#59025) improve bugreport output (#58977) update EOL information (#58991) Reduce flakiness of the TestServiceRestart test (#59022)
2 parents 6330525 + 9e476e6 commit d1b8fcd

File tree

31 files changed

+370
-81
lines changed

31 files changed

+370
-81
lines changed

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ require (
1919
github.com/coreos/go-oidc/v3 v3.15.0
2020
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
2121
github.com/docker/cli v28.3.3+incompatible
22-
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260131204543-4ca8b9cded3e
23-
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260131204543-4ca8b9cded3e
22+
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260206183300-2c82eafd9a42
23+
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260206183300-2c82eafd9a42
2424
github.com/evanphx/json-patch/v5 v5.9.11
2525
github.com/fatih/color v1.18.0
2626
github.com/felixge/fgprof v0.9.5
@@ -94,8 +94,8 @@ require (
9494
gopkg.in/yaml.v2 v2.4.0
9595
gopkg.in/yaml.v3 v3.0.1
9696
helm.sh/helm/v3 v3.18.6
97-
istio.io/api v1.29.0-alpha.0.0.20260205010447-d2bc7d18a337
98-
istio.io/client-go v1.29.0-alpha.0.0.20260205011149-b3a6b2e28b06
97+
istio.io/api v1.29.0-alpha.0.0.20260210161025-1d9832db7b28
98+
istio.io/client-go v1.29.0-alpha.0.0.20260210161328-2c12cf6497ed
9999
k8s.io/api v0.35.0
100100
k8s.io/apiextensions-apiserver v0.35.0
101101
k8s.io/apimachinery v0.35.0

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bF
137137
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
138138
github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA=
139139
github.com/envoyproxy/go-control-plane v0.14.0/go.mod h1:NcS5X47pLl/hfqxU70yPwL9ZMkUlwlKxtAohpi2wBEU=
140-
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260131204543-4ca8b9cded3e h1:AVgH0UMPEgGjTwNFuwmyYwz2RlmrmLh9UMKkskR23s0=
141-
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260131204543-4ca8b9cded3e/go.mod h1:+fG/snSdlOxU+5RWuuKSYxF9zusT3Duy1MDbETA44Bo=
142-
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260131204543-4ca8b9cded3e h1:vZh2y0YJNFaOSlHryFiTVNIf7NpoN2q8d6V9jaK3+Lo=
143-
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260131204543-4ca8b9cded3e/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A=
140+
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260206183300-2c82eafd9a42 h1:vVy7IYNRbHUtKLnxTkvRLWTizSxoVzKjisc50dnQgZ4=
141+
github.com/envoyproxy/go-control-plane/contrib v1.36.1-0.20260206183300-2c82eafd9a42/go.mod h1:+fG/snSdlOxU+5RWuuKSYxF9zusT3Duy1MDbETA44Bo=
142+
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260206183300-2c82eafd9a42 h1:blM0MLiLZ0MK8cqcTL7ZrnBWw60NZnBp1fItB5gCvhA=
143+
github.com/envoyproxy/go-control-plane/envoy v1.36.1-0.20260206183300-2c82eafd9a42/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A=
144144
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI=
145145
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4=
146146
github.com/envoyproxy/protoc-gen-validate v1.3.0 h1:TvGH1wof4H33rezVKWSpqKz5NXWg5VPuZ0uONDT6eb4=
@@ -599,10 +599,10 @@ gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
599599
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
600600
helm.sh/helm/v3 v3.18.6 h1:S/2CqcYnNfLckkHLI0VgQbxgcDaU3N4A/46E3n9wSNY=
601601
helm.sh/helm/v3 v3.18.6/go.mod h1:L/dXDR2r539oPlFP1PJqKAC1CUgqHJDLkxKpDGrWnyg=
602-
istio.io/api v1.29.0-alpha.0.0.20260205010447-d2bc7d18a337 h1:fTa0j3yQhp5RohEaAaGB+DiXWX6EEq4CGcrcvU+9Sao=
603-
istio.io/api v1.29.0-alpha.0.0.20260205010447-d2bc7d18a337/go.mod h1:+brQWcBHoROuyA6fv8rbgg8Kfn0RCGuqoY0duCMuSLA=
604-
istio.io/client-go v1.29.0-alpha.0.0.20260205011149-b3a6b2e28b06 h1:S3ger4fZHVuV61d9HKwUksc2y1vQhtyu4zgVr0lD03M=
605-
istio.io/client-go v1.29.0-alpha.0.0.20260205011149-b3a6b2e28b06/go.mod h1:NHEtxuW56GL/RuXXE6NLdzrBURs++EyIp2WSsL9Fpe8=
602+
istio.io/api v1.29.0-alpha.0.0.20260210161025-1d9832db7b28 h1:XfD9JeoBiLBUAE/qUdXGHXGgp/QjD4oEMQ3wWblr2MU=
603+
istio.io/api v1.29.0-alpha.0.0.20260210161025-1d9832db7b28/go.mod h1:+brQWcBHoROuyA6fv8rbgg8Kfn0RCGuqoY0duCMuSLA=
604+
istio.io/client-go v1.29.0-alpha.0.0.20260210161328-2c12cf6497ed h1:3YEZuC1anwr0xbov1qDXttUbSsKVTYmqqiNp8l2TVYA=
605+
istio.io/client-go v1.29.0-alpha.0.0.20260210161328-2c12cf6497ed/go.mod h1:jMwrwPdbeFUycV1v3z7qzCIjgNDLCs9IIRUO+d7d5M0=
606606
k8s.io/api v0.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY=
607607
k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA=
608608
k8s.io/apiextensions-apiserver v0.35.0 h1:3xHk2rTOdWXXJM+RDQZJvdx0yEOgC0FgQ1PlJatA5T4=

manifests/charts/base/files/crd-all.gen.yaml

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

operator/version/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323

2424
const (
2525
// OperatorCodeBaseVersion is the version string from the code base.
26-
OperatorCodeBaseVersion = "1.26.0"
27-
OperatorEOLYear = 2026
26+
OperatorCodeBaseVersion = "1.30.0"
27+
OperatorEOLYear = 2027
2828
OperatorEOLMonth = time.February
2929
)
3030

pilot/pkg/config/kube/gateway/conversion.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,9 +1238,15 @@ func createCorsFilter(filter *k8s.HTTPCORSFilter) *istio.CorsPolicy {
12381238
// Code here is based on kgateway implementation
12391239
// Direct wildcard allows any origin
12401240
if rs == "*" {
1241+
// Use strict regex that only matches valid origin formats per RFC 6454
1242+
// Format: <scheme>://<host>(:<port>)?
1243+
// Allows: http://example.com, https://sub.example.com:8443, ws://localhost:3000
12411244
res.AllowOrigins = append(res.AllowOrigins, &istio.StringMatch{
12421245
MatchType: &istio.StringMatch_Regex{
1243-
Regex: "^.*$",
1246+
// Match valid origin: scheme://host(:port)?
1247+
// - scheme: starts with letter, followed by alphanumeric, +, -, or .
1248+
// - host(:port): any characters except /, whitespace, ?, #
1249+
Regex: `^[a-zA-Z][a-zA-Z0-9+.-]*://[^/\s?#]+$`,
12441250
},
12451251
})
12461252
continue

pilot/pkg/config/kube/gateway/testdata/http.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ spec:
373373
port: 80
374374
filters:
375375
- cors:
376-
allowCredentials: true
377376
allowOrigins:
378377
- '*'
379378
allowMethods:

pilot/pkg/config/kube/gateway/testdata/http.yaml.golden

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ spec:
147147
- cors-wildcard-origin.domain.example
148148
http:
149149
- corsPolicy:
150-
allowCredentials: true
151150
allowHeaders:
152151
- Accept
153152
- Accept-Language
@@ -159,7 +158,7 @@ spec:
159158
- HEAD
160159
- POST
161160
allowOrigins:
162-
- regex: ^.*$
161+
- regex: ^[a-zA-Z][a-zA-Z0-9+.-]*://[^/\s?#]+$
163162
unmatchedPreflights: IGNORE
164163
name: default.http-route-cors-wildcard-1.0
165164
route:

pilot/pkg/networking/core/listener_waypoint.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,17 @@ func (lb *ListenerBuilder) buildWaypointInternal(wls []model.WorkloadInfo, svcs
566566
}
567567
}
568568
nonInspectorPorts := nonTLSPorts.DeleteAll(tlsPorts.UnsortedList()...).UnsortedList()
569-
if len(nonInspectorPorts) > 0 {
570-
slices.Sort(nonInspectorPorts)
571-
return &listener.ListenerFilter{
572-
Name: wellknown.TLSInspector,
573-
ConfigType: xdsfilters.TLSInspector.ConfigType,
574-
FilterDisabled: listenerPredicateExcludePorts(nonInspectorPorts),
569+
if len(tlsPorts) > 0 {
570+
if len(nonInspectorPorts) > 0 {
571+
slices.Sort(nonInspectorPorts)
572+
return &listener.ListenerFilter{
573+
Name: wellknown.TLSInspector,
574+
ConfigType: xdsfilters.TLSInspector.ConfigType,
575+
FilterDisabled: listenerPredicateExcludePorts(nonInspectorPorts),
576+
}
575577
}
578+
// all ports are TLS, add the inspector with no disabled ports
579+
return xdsfilters.TLSInspector
576580
}
577581
return nil
578582
}()

pilot/pkg/xds/waypoint_test.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,41 @@ spec:
234234
hasTLSInspector(443, true)
235235
}
236236

237+
func TestWaypointTLSInspectorWithOnlyTLSPorts(t *testing.T) {
238+
// Test that tls_inspector is added when only TLS ports exist.
239+
// This reproduces a bug where tls_inspector was only added when there
240+
// were non-TLS ports to exclude from inspection.
241+
242+
tlsServiceEntry := `apiVersion: networking.istio.io/v1
243+
kind: ServiceEntry
244+
metadata:
245+
name: tls-only
246+
namespace: default
247+
labels:
248+
istio.io/use-waypoint: waypoint
249+
spec:
250+
hosts: ["secure.example.com"]
251+
addresses: ["5.5.5.5"]
252+
ports:
253+
- number: 443
254+
name: tls
255+
protocol: TLS
256+
resolution: STATIC`
257+
258+
d, proxy := setupWaypointTest(t,
259+
waypointGateway,
260+
waypointSvc,
261+
waypointInstance,
262+
tlsServiceEntry)
263+
264+
l := xdstest.ExtractListener("main_internal", d.Listeners(proxy))
265+
filters := xdstest.ExtractListenerFilters(l)
266+
267+
// tls_inspector must be present even with only TLS ports
268+
tlsInspector := filters[wellknown.TLSInspector]
269+
assert.Equal(t, tlsInspector != nil, true)
270+
}
271+
237272
func TestWaypointEndpoints(t *testing.T) {
238273
d, proxy := setupWaypointTest(t,
239274
waypointGateway,

pkg/config/xds/filter_types.gen.go

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

0 commit comments

Comments
 (0)