Skip to content

Commit

Permalink
Merge branch 'v3.x.x' into reboot/k8-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
pj892031 authored Jan 14, 2025
2 parents 6ceb72e + 8704622 commit 2ce88b1
Show file tree
Hide file tree
Showing 43 changed files with 1,726 additions and 1,857 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
SERVER_MAX_HTTP_REQUEST_HEADER_SIZE: 16348
SERVER_WEBSOCKET_REQUESTBUFFERSIZE: 16348
APIML_GATEWAY_SERVICESTOLIMITREQUESTRATE: discoverableclient
APIML_GATEWAY_ROUTING_COOKIENAMEFORRATELIMIT: apimlAuthenticationToken
APIML_GATEWAY_COOKIENAMEFORRATELIMIT: apimlAuthenticationToken
zaas-service:
image: ghcr.io/balhar-jakub/zaas-service:${{ github.run_id }}-${{ github.run_number }}
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
.noStore()
.cachePrivate()
.mustRevalidate())
.addResourceLocations("/static/index.html", "classpath:/static/index.html");
.addResourceLocations("/static/", "classpath:/static/");

registry
.addResourceHandler("/static/**")
Expand All @@ -40,6 +40,6 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry
.addResourceHandler("/resources/**")
.setCacheControl(CacheControl.maxAge(Duration.ofDays(365L)))
.addResourceLocations("/resources/**", "/resources/static/**", "/resources/templates/**");
.addResourceLocations("/resources/", "/resources/static/", "/resources/templates/");
}
}
2 changes: 1 addition & 1 deletion api-catalog-ui/frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ REACT_APP_STATUS_UPDATE_MAX_RETRIES=10
REACT_APP_STATUS_UPDATE_DEBOUNCE=300
REACT_APP_CA_ENV=false
REACT_APP_STATUS_UPDATE_SCALING_DURATION=1000
REACT_APP_ZOWE_BUILD_INFO=3.0.52-SNAPSHOT
REACT_APP_ZOWE_BUILD_INFO=3.1.1-SNAPSHOT
1,609 changes: 1,034 additions & 575 deletions api-catalog-ui/frontend/package-lock.json

Large diffs are not rendered by default.

59 changes: 30 additions & 29 deletions api-catalog-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dependencies": {
"@emotion/core": "11.0.0",
"@emotion/is-prop-valid": "1.3.1",
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@eslint/migrate-config": "^1.3.1",
"@jest/globals": "29.7.0",
"@material-ui/core": "4.12.4",
Expand All @@ -17,13 +17,13 @@
"@react-loadable/revised": "1.5.0",
"@types/enzyme": "3.10.18",
"@types/jest": "29.5.14",
"@types/react": "18.3.12",
"agentkeepalive": "4.5.0",
"@types/react": "18.3.18",
"agentkeepalive": "4.6.0",
"buffer": "6.0.3",
"emotion-theming": "11.0.0",
"exception-formatter": "2.1.2",
"graphiql": "3.7.2",
"graphql": "16.9.0",
"graphiql": "3.8.3",
"graphql": "16.10.0",
"graphql-ws": "^5.16.0",
"history": "4.10.1",
"htmr": "1.0.2",
Expand All @@ -36,8 +36,8 @@
"react": "18.3.1",
"react-app-polyfill": "3.0.0",
"react-dom": "18.3.1",
"react-hook-form": "7.53.2",
"react-redux": "9.1.2",
"react-hook-form": "7.54.2",
"react-redux": "9.2.0",
"react-router-dom": "5.3.4",
"react-toastify": "10.0.6",
"redux": "5.0.1",
Expand All @@ -48,7 +48,7 @@
"redux-persist-transform-filter": "0.0.22",
"redux-thunk": "3.1.0",
"rxjs": "7.8.1",
"sass": "1.80.7",
"sass": "1.83.1",
"stream": "0.0.3",
"swagger-ui-react": "5.18.2",
"url": "0.11.4",
Expand Down Expand Up @@ -84,25 +84,25 @@
"@babel/eslint-parser": "7.25.9",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/preset-env": "7.26.0",
"@babel/preset-react": "7.25.9",
"@babel/preset-react": "7.26.3",
"@cfaester/enzyme-adapter-react-18": "0.8.0",
"@eslint/compat": "1.2.2",
"@eslint/js": "9.14.0",
"@eslint/compat": "1.2.4",
"@eslint/js": "9.17.0",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.0.1",
"@testing-library/react": "16.1.0",
"@testing-library/user-event": "14.5.2",
"ajv": "8.17.1",
"ansi-regex": "6.1.0",
"body-parser": "1.20.3",
"caniuse-lite": "1.0.30001680",
"concurrently": "9.1.0",
"caniuse-lite": "1.0.30001690",
"concurrently": "9.1.2",
"cors": "2.8.5",
"cross-env": "7.0.3",
"cypress": "13.15.2",
"cypress": "13.17.0",
"cypress-file-upload": "5.0.8",
"enzyme": "3.11.0",
"eslint": "9.14.0",
"eslint": "9.17.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "4.1.0",
Expand All @@ -111,9 +111,9 @@
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.37.2",
"express": "4.21.1",
"globals": "15.12.0",
"eslint-plugin-react": "7.37.3",
"express": "4.21.2",
"globals": "15.14.0",
"html-loader": "5.1.0",
"jest": "29.7.0",
"jest-environment-enzyme": "7.1.2",
Expand All @@ -124,9 +124,9 @@
"jest-watch-typeahead": "2.2.2",
"json-schema": "0.4.0",
"mini-css-extract-plugin": "2.9.2",
"nodemon": "3.1.7",
"nodemon": "3.1.9",
"nth-check": "2.1.1",
"prettier": "3.3.3",
"prettier": "3.4.2",
"prop-types": "15.8.1",
"querystring-es3": "0.2.1",
"react-app-rewired": "2.2.1",
Expand All @@ -135,26 +135,27 @@
"redux-mock-store": "1.5.5",
"rimraf": "6.0.1",
"source-map-explorer": "2.5.3",
"start-server-and-test": "2.0.8",
"start-server-and-test": "2.0.9",
"tmpl": "1.0.5",
"undici": "6.19.8",
"yaml": "2.6.0"
"yaml": "2.7.0"
},
"overrides": {
"nth-check": "2.1.1",
"jsdom": "16.7.0",
"got": "14.4.4",
"got": "14.4.5",
"react-error-overlay": "6.0.11",
"tough-cookie": "5.0.0",
"@braintree/sanitize-url": "7.1.0",
"@braintree/sanitize-url": "7.1.1",
"resolve-url-loader": "5.0.0",
"lodash": "4.17.21",
"semver": "7.6.3",
"@babel/traverse": "7.25.9"
"@babel/traverse": "7.26.4",
"axios": "1.7.9"
},
"engines": {
"npm": "=10.9.0",
"node": "=20.18.0"
"npm": "=10.9.2",
"node": "=20.18.1"
},
"browserslist": [
">0.2%",
Expand Down
1 change: 1 addition & 0 deletions apiml-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
implementation libs.spring.boot.starter.actuator
implementation libs.spring.boot.starter.web
implementation libs.spring.cloud.starter.eureka.client
implementation libs.eureka.core

implementation libs.apache.commons.lang3
implementation libs.janino
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ allprojects {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module('javax.servlet:servlet-api')).using(module('javax.servlet:javax.servlet-api:4.0.1'))
// netty reactor contains a bug: https://github.com/reactor/reactor-netty/issues/3559 > https://github.com/reactor/reactor-netty/pull/3581
substitute(module('io.projectreactor.netty:reactor-netty-core')).using(module('io.projectreactor.netty:reactor-netty-core:1.1.23'))
substitute(module('io.projectreactor.netty:reactor-netty-http')).using(module('io.projectreactor.netty:reactor-netty-http:1.1.23'))
}
}

Expand Down
1 change: 1 addition & 0 deletions gateway-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ dependencies {
implementation libs.spring.boot.starter.thymeleaf
implementation libs.spring.doc.webflux
implementation libs.netty.reactor.http
implementation libs.google.gson
implementation libs.jjwt
implementation libs.jjwt.impl
implementation libs.jjwt.jackson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration;
import org.springframework.cloud.gateway.config.GatewayReactiveOAuth2AutoConfiguration;

@SpringBootApplication(
scanBasePackages = {
Expand All @@ -24,7 +23,7 @@
"org.zowe.apiml.product.logging",
"org.zowe.apiml.security"
},
exclude = {ReactiveOAuth2ClientAutoConfiguration.class, GatewayReactiveOAuth2AutoConfiguration.class}
exclude = {ReactiveOAuth2ClientAutoConfiguration.class}
)
public class GatewayServiceApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,28 @@ protected Mono<Void> processResponse(ServerWebExchange exchange, GatewayFilterCh
);
headers.set(HttpHeaders.COOKIE, cookieHeader);
}).build();
exchange = exchange.mutate().request(request).build();
}
if (!StringUtils.isEmpty(response.get().getHeaderName())) {
request = cleanHeadersOnAuthSuccess(exchange);
request = request.mutate().headers(headers ->
headers.add(response.get().getHeaderName(), response.get().getToken())
).build();
exchange = exchange.mutate().request(request).build();
}
if (failureHeader.isPresent()) {
if (request != null) {
request = request.mutate().headers(httpHeaders -> httpHeaders.add(ApimlConstants.AUTH_FAIL_HEADER, failureHeader.get())).build();
exchange = exchange.mutate().request(request).build();
}
exchange.getResponse().getHeaders().add(ApimlConstants.AUTH_FAIL_HEADER, failureHeader.get());
}
}
if (request == null) {
request = cleanHeadersOnAuthFail(exchange, failureHeader.orElse("Invalid or missing authentication"));
exchange = exchange.mutate().request(request).build();
}

exchange = exchange.mutate().request(request).build();
return chain.filter(exchange);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@Component
public class KeyResolver implements org.springframework.cloud.gateway.filter.ratelimit.KeyResolver {

@Value("${apiml.gateway.routing.cookieNameForRateLimit:apimlAuthenticationToken}")
@Value("${apiml.gateway.cookieNameForRateLimit:apimlAuthenticationToken}")
private String cookieName;

@Override
Expand Down
Loading

0 comments on commit 2ce88b1

Please sign in to comment.