Skip to content
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

Add V2 TCP traffic permissions #18706

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions agent/xds/proxystateconverter/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,13 @@ func (s *Converter) makeInboundListener(cfgSnap *proxycfg.ConfigSnapshot, name s
l4Dest.MaxInboundConnections = uint64(cfg.MaxInboundConnections)
}

// TODO(proxystate): Intentions will be added to l4 destination in the future. This is currently done in finalizePublicListenerFromConfig.
l4Dest.AddEmptyIntention = true
defaultAction := pbproxystate.TrafficPermissionAction_INTENTION_ACTION_DENY
if cfgSnap.IntentionDefaultAllow {
defaultAction = pbproxystate.TrafficPermissionAction_INTENTION_ACTION_ALLOW
}
l4Dest.TrafficPermissions = &pbproxystate.L4TrafficPermissions{
DefaultAction: defaultAction,
}
}
l.Routers = append(l.Routers, localAppRouter)

Expand Down Expand Up @@ -1575,7 +1580,7 @@ func (g *Converter) makeL7Destination(opts destinationOpts) (*pbproxystate.L7Des
// access and that every filter chain uses our TLS certs.
if len(opts.httpAuthzFilters) > 0 {
// TODO(proxystate) support intentions in the future
dest.Intentions = make([]*pbproxystate.L7Intention, 0)
dest.TrafficPermissions = make([]*pbproxystate.L7TrafficPermission, 0)
//cfg.HttpFilters = append(opts.httpAuthzFilters, cfg.HttpFilters...)
}

Expand Down
Loading