[NET-10719] Fix cluster generation for jwt clusters for external jwt providers (#21604)

* Fix cluster generation for jwt clusters for external jwt providers

* add changelog
pull/21606/head
John Maguire 4 months ago committed by GitHub
parent 8555404662
commit 1fa428552b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
```release-note:bug
api-gateway: **(Enterprise only)** ensure clusters are properly created for JWT providers with a remote URI for the JWKS endpoint
```

@ -923,7 +923,6 @@ func (s *ResourceGenerator) injectGatewayDestinationAddons(cfgSnap *proxycfg.Con
} }
c.TransportSocket = transportSocket c.TransportSocket = transportSocket
} }
} }
return nil return nil
} }
@ -1004,6 +1003,8 @@ func (s *ResourceGenerator) clustersFromSnapshotAPIGateway(cfgSnap *proxycfg.Con
createdClusters[uid] = true createdClusters[uid] = true
} }
clusters = append(clusters, makeAPIGatewayJWKClusters(s.Logger, cfgSnap)...)
} }
return clusters, nil return clusters, nil
} }
@ -1145,7 +1146,6 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService(
} }
upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams() upstreamsSnapshot, err := cfgSnap.ToConfigSnapshotUpstreams()
if err != nil { if err != nil {
return c, err return c, err
} }

@ -8,8 +8,11 @@ package xds
import ( import (
envoy_http_jwt_authn_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/jwt_authn/v3" envoy_http_jwt_authn_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/jwt_authn/v3"
envoy_http_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" envoy_http_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3"
"google.golang.org/protobuf/proto"
"github.com/hashicorp/consul/agent/proxycfg"
"github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/go-hclog"
) )
type GatewayAuthFilterBuilder struct { type GatewayAuthFilterBuilder struct {
@ -22,3 +25,7 @@ type GatewayAuthFilterBuilder struct {
func (g *GatewayAuthFilterBuilder) makeGatewayAuthFilters() ([]*envoy_http_v3.HttpFilter, error) { func (g *GatewayAuthFilterBuilder) makeGatewayAuthFilters() ([]*envoy_http_v3.HttpFilter, error) {
return nil, nil return nil, nil
} }
func makeAPIGatewayJWKClusters(_ hclog.Logger, _ *proxycfg.ConfigSnapshot) []proto.Message {
return nil
}

Loading…
Cancel
Save