diff --git a/changelog/v1.19.0-beta3/extauthz-route-metadata-context.yaml b/changelog/v1.19.0-beta3/extauthz-route-metadata-context.yaml new file mode 100644 index 00000000000..9fda83befa8 --- /dev/null +++ b/changelog/v1.19.0-beta3/extauthz-route-metadata-context.yaml @@ -0,0 +1,7 @@ +changelog: + - type: NON_USER_FACING + issueLink: https://github.com/solo-io/solo-projects/issues/7484 + description: > + Add reserved portal filter namespaces to the ExtAuthz envoy filter config's `RouteMetadataContextNamespaces` list + to ensure that the route metadata is passed to the ext_authz service at route_metadata_context in CheckRequest. + resolvesIssue: false \ No newline at end of file diff --git a/projects/gloo/pkg/plugins/extauth/config_generator.go b/projects/gloo/pkg/plugins/extauth/config_generator.go index 42baa923264..83bc9966c1c 100644 --- a/projects/gloo/pkg/plugins/extauth/config_generator.go +++ b/projects/gloo/pkg/plugins/extauth/config_generator.go @@ -23,7 +23,11 @@ import ( "github.com/solo-io/solo-kit/pkg/utils/prototime" ) -const JWTFilterName = "envoy.filters.http.jwt_authn" +const ( + JWTFilterName = "envoy.filters.http.jwt_authn" + PortalMetadataFilterName = "io.solo.gloo.portal" + PortalCustomMetadataFilterName = "io.solo.gloo.portal.custom_metadata" +) var ( DefaultTimeout = prototime.DurationToProto(200 * time.Millisecond) @@ -228,7 +232,8 @@ func GenerateEnvoyConfigForFilter(settings *extauthv1.Settings, upstreams v1.Ups } cfg := &envoyauth.ExtAuthz{ - MetadataContextNamespaces: []string{JWTFilterName}, + MetadataContextNamespaces: []string{JWTFilterName}, + RouteMetadataContextNamespaces: []string{PortalMetadataFilterName, PortalCustomMetadataFilterName}, } httpService := settings.GetHttpService()