-
Notifications
You must be signed in to change notification settings - Fork 5.3k
allow typed_per_filter_config to refer to "custom" HTTP filter names #12274
Description
Use case: We'd like to use multiple ext_authz filters configured with different gRPC servers, and would like to be able to toggle them separately via route config. This means we can't just use the canonical filter name, but need to be able to refer to custom names.
#9618 made Envoy able to infer most extension types from the type URL of the config, which frees up users to use the name field to make filter names more descriptive (particularly useful for distinguishing multiple instances of the same filter).
It looks like typed_per_filter_config doesn't yet have this capability and requires that the canonical filter name is used.
I'm not super familiar with the code or filter registration system, but it seems like this could be done by either:
- keeping a map of filter name to type, and looking up the supplied name in that map to figure out the filter config type
- use the type URL of the config to infer the filter type
- both (with a precedence order for applying 1 and 2).
Probably just 1) makes sense? that would ensure that there can't be multiple configs that map to the same filter.
It also might require a config option somewhere backwards compatible? There could be a working config today where a filter has a custom name but the typed_per_filter_config is using the old name.