Skip to content

SpecificPerFilterConfig should support semantic names #12575

Closed

Description

@mandarjog

Filter names no longer encode filter types, so the name envoy.filters.http.ext_authz is not strictly required.
note: myco.ext_authz in the example.

  - name: myco.ext_authz
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
      http_service:
          server_uri:
            cluster: ext-authz

However, route specific config name is hardcoded in the filter code, which forces the route config to continue using envoy.filters.http.ext_authz compatibility name.

    routes:
    - match: { prefix: "/static" }
      route: { cluster: some_service }
      typed_per_filter_config:
        envoy.filters.http.ext_authz:
          "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute
          disabled: true

Http::Utility::resolveMostSpecificPerFilterConfig<FilterConfigPerRoute>(

When a filter of the same type is instantiated in several different configs, this does not work.

Options

  1. Pass in the name to the filter, this may already be the case. The filter should use that name instead of hardcoded value like the one above.
Http::Utility::resolveMostSpecificPerFilterConfig<FilterConfigPerRoute>(
          getFilterSemanticName(), route);

instead of

      Http::Utility::resolveMostSpecificPerFilterConfig<FilterConfigPerRoute>(
          HttpFilterNames::get().ExtAuthorization, route);
  1. Use thread context to figure this out?

@dio @kyessenov

Activity

  1. kyessenov commented on Aug 10, 2020

    @kyessenov
    Contributor

    Maybe use some combination of type URL and config name?

  2. markdroth commented on Mar 17, 2021

    @markdroth
    Contributor

    Is this a dup of #12274?

  3. mattklein123 commented on Mar 17, 2021

    @mattklein123
    Member

    Yeah dup of #12274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions