-
Notifications
You must be signed in to change notification settings - Fork 557
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
Spike dedicated rest middleware #18485
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attempt to programmatically register Jakarta Filter beans using the BeanDefinitionRegistryPostProcessor interface.
The BeanDefinitionRegistryPostProcessor bean needs to have a no-args constructor. It can inject the environment by implementing EnvironmentAware as well. Using the environment, you can read Spring Boot properties. WARNING: reading the filters does not work if they are defined using the GatewayCfg instead of using Spring Boot properties, as far as I can see. This might be an issue.
Fail with a custom servlet filter in the chain that throws an exception. WARNINGs: * The exception from a filter is currently not handled by the global advice that returns application/problem+json for errors. Instead, an application/json response is returned by the REST gateway. The client cannot properly handle this as an error response, tries to parse it into a TopologyResponse, and fails with that, swallowing the original exception. * The test adds filters to the application.properties statically for PoC purposes. If possible, the test should add them dynamically. Alternatively, the filter registration needs to read the gateway properties instead of Spring Boot properties as they would contain dynamically added filters as well.
Failing a filter means writing a failure response and returning instead of throwing an exception.
Allows to configure chain handlers for REST calls, similarly to ClientInterceptors for gRPC. Chain handlers can wrap and influence the request execution chain, similar to what's possible with gRPC.
Make a request fail with a custom chain handler for a REST call.
tmetzke
force-pushed
the
spike-dedicated-rest-middleware
branch
from
May 15, 2024 12:38
b126dab
to
d8256ad
Compare
Provide a (Spring Web) CompositeFilter bean which implements the Jakarta Servlet Filter API for the Zeebe Rest API. The CompositeFilter bean will act as a wrapper for user-implemented Filters for the Zeebe Rest API.
github-actions
bot
added
component/operate
Related to the Operate component/team
component/tasklist
Related to the Tasklist component/team
labels
May 22, 2024
Closing this as the spike itself is done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component/operate
Related to the Operate component/team
component/tasklist
Related to the Tasklist component/team
component/zeebe
Related to the Zeebe component/team
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.
Description
Spike to investigate REST API interceptors/middleware.
Related issues
related to #18446