-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.17.2 - terminating gateway broken by xds changes #20360
Comments
jmurret
added a commit
that referenced
this issue
Jan 29, 2024
4 tasks
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
This was referenced Jan 31, 2024
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
…6.x (#20418) Fix SAN matching on terminating gateways (#20417) Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
…7.x (#20419) Fix SAN matching on terminating gateways (#20417) Fixes issue: #20360 A regression was introduced in #19954 where the SAN validation matching was reduced from 4 potential types down to just the URI. Terminating gateways will need to match on many fields depending on user configuration, since they make egress calls outside of the cluster. Having more than one matcher behaves like an OR operation, where any match is sufficient to pass the certificate validation. To maintain backwards compatibility with the old untyped `match_subject_alt_names` Envoy behavior, we should match on all 4 enum types. https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#enum-extensions-transport-sockets-tls-v3-subjectaltnamematcher-santype Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com>
Closing, as this is addressed by #20417, this will be released in the next set of patch releases likely around March timeframe. |
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
hashi-derek
added a commit
that referenced
this issue
Jan 31, 2024
hashi-derek
added a commit
that referenced
this issue
Feb 1, 2024
This was referenced Feb 1, 2024
hashi-derek
added a commit
that referenced
this issue
Feb 1, 2024
hashi-derek
added a commit
that referenced
this issue
Feb 1, 2024
hashi-derek
added a commit
that referenced
this issue
Feb 1, 2024
Add known issue for GH-20360. Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
hashi-derek
added a commit
that referenced
this issue
Feb 1, 2024
Add known issue for GH-20360. Co-authored-by: Derek Menteer <derek.menteer@hashicorp.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upgraded to 1.17.2 via the helm chart and am seeing the terminating gateway is broken by #19954
agent/xds/clusters.go:1626 incorrectly restricts envoy to looking at URI SANs that match the hostname provided in config.
However certificates will have a DNS SAN with the hostname value. As a result outbound TLS connections fail on certificate errors.
I believe the fix is to use SanType: envoy_tls_v3.SubjectAltNameMatcher_DNS
Working config pre-upgrade (1.17.1):
![image](https://private-user-images.githubusercontent.com/590320/300075804-f6e5f1f9-8c89-49ea-8f92-2f192462e7f3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk4MzUsIm5iZiI6MTcxOTYzOTUzNSwicGF0aCI6Ii81OTAzMjAvMzAwMDc1ODA0LWY2ZTVmMWY5LThjODktNDllYS04ZjkyLTJmMTkyNDYyZTdmMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQwNTM4NTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZTBhN2M5MjgzODgyZDhiNjMyNTllOGFmNjNhNjEwNDMzOTBiZTNlMmE0ZjBkMTlmY2EzNGU1ODZlNDk0NzZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.uYJVIpvM6Flcls43HaXO5s20yfYKVc5MyzbFoBEK9vk)
Failing config from 1.17.2:
![image](https://private-user-images.githubusercontent.com/590320/300075593-b727d530-3055-4391-8d10-eb0b79916e8e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk4MzUsIm5iZiI6MTcxOTYzOTUzNSwicGF0aCI6Ii81OTAzMjAvMzAwMDc1NTkzLWI3MjdkNTMwLTMwNTUtNDM5MS04ZDEwLWViMGI3OTkxNmU4ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQwNTM4NTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hM2U5NjI0N2JlNTVkMGM2YjM2YTYwMDliYjc0MmFhYWNmNTBhYzc3ZWQwMmIzZGU0MjA2ZDJhNTEyNmRmNDY0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AQwmD3CoWHNclRPW9g1_NXTZOK-3VkUtzox9x856VSg)
The text was updated successfully, but these errors were encountered: