Skip to content

Commit

Permalink
Add V2 TCP traffic permissions (#18771)
Browse files Browse the repository at this point in the history
Add support for TCP traffic permissions
  • Loading branch information
erichaberkorn authored Sep 13, 2023
1 parent 0b6efbb commit 12be06f
Show file tree
Hide file tree
Showing 21 changed files with 1,591 additions and 621 deletions.
6 changes: 2 additions & 4 deletions agent/xds/proxystateconverter/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,6 @@ func (s *Converter) makeInboundListener(cfgSnap *proxycfg.ConfigSnapshot, name s
if l7Dest == nil {
return nil, fmt.Errorf("l7 destination on inbound listener should not be empty")
}
l7Dest.AddEmptyIntention = true

// TODO(proxystate): L7 Intentions and JWT Auth will be added in the future.
//jwtFilter, jwtFilterErr := makeJWTAuthFilter(cfgSnap.JWTProviders, cfgSnap.ConnectProxy.Intentions)
Expand Down Expand Up @@ -1053,8 +1052,7 @@ 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
l4Dest.TrafficPermissions = &pbproxystate.L4TrafficPermissions{}
}
l.Routers = append(l.Routers, localAppRouter)

Expand Down Expand Up @@ -1575,7 +1573,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 = &pbproxystate.L7TrafficPermissions{}
//cfg.HttpFilters = append(opts.httpAuthzFilters, cfg.HttpFilters...)
}

Expand Down
Loading

0 comments on commit 12be06f

Please sign in to comment.