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
feat: Per service configuration to ignore certain headers #1806
Conversation
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Code smell is due to code duplication, the duplication is boiler plate |
gateway-service/src/main/java/org/zowe/apiml/gateway/routing/RouteUtil.java
Outdated
Show resolved
Hide resolved
...tests/src/test/java/org/zowe/apiml/integration/proxy/GatewayPerServiceIgnoreHeadersTest.java
Outdated
Show resolved
Hide resolved
...y-service/src/main/java/org/zowe/apiml/gateway/filters/pre/PerServiceIgnoreHeaderFilter.java
Show resolved
Hide resolved
Signed-off-by: Carson Cook <carson.cook@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change on the filter, I would still want to resolve the integration test.
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
Signed-off-by: Carson Cook <carson.cook@ibm.com>
1934bfe
to
bdb6ecf
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes!
* PoC for per service ignore headers Signed-off-by: Carson Cook <carson.cook@ibm.com> * Dry code getting service instance from uri Signed-off-by: Carson Cook <carson.cook@ibm.com> * Improve filter name Signed-off-by: Carson Cook <carson.cook@ibm.com> * Add RouteUtil unit tests Signed-off-by: Carson Cook <carson.cook@ibm.com> * Add per service ignore header filter unit tests Signed-off-by: Carson Cook <carson.cook@ibm.com> * Add integration test for ignoring headers Signed-off-by: Carson Cook <carson.cook@ibm.com> * Fix proxyrequesthelper instantiation Signed-off-by: Carson Cook <carson.cook@ibm.com> * Use zuul context to get service instance Signed-off-by: Carson Cook <carson.cook@ibm.com> * Move integration test to functional test Signed-off-by: Carson Cook <carson.cook@ibm.com> * Fix mocking http client Signed-off-by: Carson Cook <carson.cook@ibm.com> * Remove formatting changes Signed-off-by: Carson Cook <carson.cook@ibm.com>
Description
This PR adds the ability to add
apiml.headersToIgnore
in service custom metadata to select which headers will be stripped from requests that go through the Gateway to that service.Linked to #1797
Type of change
Please delete options that are not relevant.
Checklist:
For more details about how should the code look like read the Contributing guideline