Set ExtAuthz Cluster name to URL Host (#1132)

This commit is contained in:
Travis Groth 2020-07-23 14:10:16 -04:00 committed by GitHub
parent 1867feb5b9
commit 90d95b8c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ func (srv *Server) buildClusters(options *config.Options) []*envoy_config_cluste
buildInternalCluster(options, "pomerium-control-plane-http", httpURL, false),
}
clusters = append(clusters, buildInternalCluster(options, "pomerium-authz", authzURL, true))
clusters = append(clusters, buildInternalCluster(options, authzURL.Host, authzURL, true))
if config.IsProxy(options.Services) {
for _, policy := range options.Policies {

View file

@ -166,7 +166,7 @@ func buildMainHTTPConnectionManagerFilter(options *config.Options, domains []str
Timeout: grpcClientTimeout,
TargetSpecifier: &envoy_config_core_v3.GrpcService_EnvoyGrpc_{
EnvoyGrpc: &envoy_config_core_v3.GrpcService_EnvoyGrpc{
ClusterName: "pomerium-authz",
ClusterName: options.GetAuthorizeURL().Host,
},
},
},

View file

@ -50,7 +50,7 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) {
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz",
"grpcService": {
"envoyGrpc": {
"clusterName": "pomerium-authz"
"clusterName": "127.0.0.1:5443"
},
"timeout": "10s"
},