-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
ambient: stash hbone peer principal in endpoint metadata #50753
Changes from all commits
e2653c5
44f2df7
836788f
06aa692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -667,6 +667,10 @@ func buildEnvoyLbEndpoint(b *EndpointBuilder, e *model.IstioEndpoint, mtlsEnable | |
ep.HostIdentifier = &endpoint.LbEndpoint_Endpoint{Endpoint: &endpoint.Endpoint{ | ||
Address: util.BuildInternalAddressWithIdentifier(connectOriginate, net.JoinHostPort(address, strconv.Itoa(port))), | ||
}} | ||
peerPrincipal, _ := structpb.NewStruct(map[string]any{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this for everything doing hbone or just waypoints? Like does sidecar have the issue today? Seems like probably yes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I would think so; the simplest implementation seemed to be just always adding the identity in endpoint metadata |
||
"uri_san": meta.Identity, | ||
}) | ||
ep.Metadata.FilterMetadata[util.UpstreamPrincipalMetadataKey] = peerPrincipal | ||
ep.Metadata.FilterMetadata[util.OriginalDstMetadataKey] = util.BuildTunnelMetadataStruct(address, port) | ||
if b.dir != model.TrafficDirectionInboundVIP { | ||
// Add TLS metadata matcher to indicate we can use HBONE for this endpoint. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems identical to buildInternalUpstreamCluster. is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is from a former iteration where I had a custom filter. I'll clean this up once I get this all working locally