Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ext-Authz: Perform clear route cache based on specific headers. #14326

Open
VirajSalaka opened this issue Dec 8, 2020 · 2 comments
Open

Ext-Authz: Perform clear route cache based on specific headers. #14326

VirajSalaka opened this issue Dec 8, 2020 · 2 comments
Assignees
Labels
area/ext_authz enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@VirajSalaka
Copy link

Description:
The concern here is as same as mentioned in #12195. In my usecase, I would like to make the routing decision based on a specific header (using cluster-header property) for some routes only. And those headers would be injected from the external Auth filter. To make this work, we need to set the clear_route_cache property to true at the moment. As per the current design, the cache clearing process will only be triggered if we modify the headers inside the ext_authz filter.

But the concern here is we may require to populate various headers within the ext_authz filter and for all these headers this cache clearing process will happen even though it is not required. Hence I would like to suggest adding another separate field to specifically mention those headers as an array of strings. (Something like clear_route_cache_on_headers)

Based on #12195, I guess there are some other users who would be interested in the same feature. I would like to know your opinion on this.

[optional Relevant Links:]

if (config_->clearRouteCache() &&
(!response->headers_to_set.empty() || !response->headers_to_append.empty() ||
!response->headers_to_remove.empty())) {
ENVOY_STREAM_LOG(debug, "ext_authz is clearing route cache", *callbacks_);
callbacks_->clearRouteCache();
}

@VirajSalaka VirajSalaka added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Dec 8, 2020
@dio dio added help wanted Needs help! and removed triage Issue requires triage labels Dec 9, 2020
@esmet
Copy link
Contributor

esmet commented Feb 9, 2021

I'll take a look at this. @VirajSalaka would you say that clear_route_cache_on_headers is an allow-list of headers that are set, appended, or removed only when clear_route_cache is set to true?

@esmet
Copy link
Contributor

esmet commented Feb 9, 2021

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ext_authz enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

4 participants