Skip to content

Commit fc08dbd

Browse files
authored
fix: disable -shadow host suffix append (#7229)
* fix: disable `-shadow` host suffix append Signed-off-by: Shreemaan Abhishek <shreemaanabhishek@apache.org>
1 parent 70af785 commit fc08dbd

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

internal/xds/translator/route.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ func buildXdsRequestMirrorPolicies(mirrorPolicies []*ir.MirrorPolicy) []*routev3
543543
xdsMirrorPolicies = append(xdsMirrorPolicies, &routev3.RouteAction_RequestMirrorPolicy{
544544
Cluster: policy.Destination.Name,
545545
RuntimeFraction: mp,
546+
// We don't need to append the shadow host suffix as the mirror policy already uses a different cluster which is enough to distinguish the mirrored traffic
547+
DisableShadowHostSuffixAppend: true,
546548
})
547549
}
548550
}

internal/xds/translator/testdata/out/xds-ir/http-route-mirrors-percentage.routes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
cluster: route-dest
1313
requestMirrorPolicies:
1414
- cluster: mirror-route-dest
15+
disableShadowHostSuffixAppend: true
1516
runtimeFraction:
1617
defaultValue:
1718
denominator: MILLION

internal/xds/translator/testdata/out/xds-ir/http-route-multiple-mirrors-percentage.routes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
cluster: route-dest
1313
requestMirrorPolicies:
1414
- cluster: mirror-route-dest
15+
disableShadowHostSuffixAppend: true
1516
runtimeFraction:
1617
defaultValue:
1718
denominator: MILLION
1819
numerator: 250000
1920
- cluster: mirror-route-dest1
21+
disableShadowHostSuffixAppend: true
2022
runtimeFraction:
2123
defaultValue:
2224
denominator: MILLION

internal/xds/translator/testdata/out/xds-ir/http-route-multiple-mirrors.routes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
cluster: route-dest
1313
requestMirrorPolicies:
1414
- cluster: mirror-route-dest
15+
disableShadowHostSuffixAppend: true
1516
runtimeFraction:
1617
defaultValue:
1718
numerator: 100
1819
- cluster: mirror-route-dest1
20+
disableShadowHostSuffixAppend: true
1921
runtimeFraction:
2022
defaultValue:
2123
numerator: 100

release-notes/current.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ breaking changes: |
55
ALPNProtocols in EnvoyProxy Backend TLS setting use [h2, http/1.1] if not set.
66
When a Backend resource specifies TLS settings and SNI is not specified or a BackendTLSPolicy is not attached to it, the value of upstream TLS SNI is determined by the HTTP Host header.
77
When a Backend resource specifies TLS settings and SNI is not specified or a BackendTLSPolicy is not attached to it, the upstream certificate is validated for DNS SAN matching the SNI value sent.
8+
When a MirrorPolicy is used, the shadow host suffix is not appended to the mirrored cluster name.
89
910
# Updates addressing vulnerabilities, security flaws, or compliance requirements.
1011
security updates: |

0 commit comments

Comments
 (0)