xds: httpfilter API changes to support filter state retention (A83) #8745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How the API looked before this change?
Filter, that was responsible for functionality like config parsing and optionally for building client and server interceptors (or filter instances).Filters keyed by the supported type_urls.How the API looks after this change?
FilterProvider, that contains functionality for config parsing and other things like "what are the supported type_urls?", "Are filters produced by this provider supposed to be terminal?", "Are filters produced by this provider supposed to work on the client/server?" etc.FilterProviderwill also contain functionality to create filter instances represented by a new interface,Filter.Filterinterface contains functionality to build client and server interceptors. If this filter is not supported on either the client or the server, that functionality can be a no-op.Filterwill also contain a newClosemethod allowing it to free up any resources allocated.FilterProviderss keyed by the supported type_urls.Why is this change required?
How will this be used?
Filterinstances only when the filter names in the xDS resources change. Otherwise, they will only create new interceptors using the updated filter configuration from the existingFilter. This will allowFilterinstances to share state across interceptors and across state updates.The changes here and inspired by similar changes made for Java and described here: https://github.com/grpc/proposal/blob/master/A83-xds-gcp-authn-filter.md#java
RELEASE NOTES: None