Skip to main content

Questions tagged [spring-cloud-gateway]

Spring Cloud Gateway is an API Gateway library on top of the Spring reactive ecosystem. Use this tag when encountering issues with Spring Cloud Gateway components.

spring-cloud-gateway
-1 votes
0 answers
21 views

Spring Cloud Gateway with Kubernetes discovery client for http and grpc requests

I'm trying to implement gateway service using Spring Cloud Gateway with k8s client dicovery that will redirect both http/1.1 and http/2(GRPC) requests I set the following configurations: server: ...
Lior Derei's user avatar
0 votes
0 answers
29 views

Spring authorization server RP-initiated logout not working

I have a project with spring gateway as oauth client for spring authorization server. Everything is working fine in terms of oidc authentication besides the logout. Logout does not work due to CORS, ...
IonutB's user avatar
  • 73
0 votes
0 answers
17 views

trying to load each elements of list from separate yaml files into parent yaml

In Spring Cloud Gateway, we have too many routes in one application yaml. I am trying to break them into individual routes and import them into main/parent yaml. Tried below approach of spring.profile....
Arpit S's user avatar
  • 185
0 votes
0 answers
35 views

Connection refused to keycloak's configuration uri from my gateway spring boot service (both running on docker)

It seems my gateway service is failing to resolve the host of my keycloak realm configuration uri (both are running locally on docker) I am able to see the page via browser on "http://localhost:...
markoss's user avatar
0 votes
0 answers
33 views

How to call REST API using Spring Webclient in global post filter

Spring Cloud Gateway with WebFlux: 4.1.0 We have implemented couple of custom Global pre and post filters in our Spring Cloud Gateway application. We are using Spring WebClient utility to make call to ...
Deepak Chhetri's user avatar
0 votes
0 answers
37 views

Spring security logout not working when exceptionHandling.authenticationEntryPoint configured

I have configured a Spring Gateway service with Spring security enabled and oauth2 configured. I can perform the login and logout without any issue, even a custom LogoutSuccessHandler, until I ...
jorge-plaza's user avatar
0 votes
0 answers
16 views

Handling ReadTimeOut Exception with Spring Cloud Gateway/Netty Client

We are using Spring Cloud Gateway to route messages to different endpoints. In some cases seeing read timeout happening and in hence is no "response" received resulting in wrapped '...
Arpit S's user avatar
  • 185
0 votes
0 answers
23 views

separate individual routes in spring cloud gateway

I am using Spring Cloud Gateway(Spring Boot 2.7.X) to route/POST request to different external endpoints for configured customers. The routes are configured in application yml. With more and more ...
Arpit S's user avatar
  • 185
0 votes
0 answers
24 views

Custom Gateway filter order in Spring Cloud Gateway

I am exploring Spring Cloud Gateway. I want to introduce a custom HTTPHeadersFilter for all the routes. Also i want to protect the gateway with authentication .Hence am using Spring Security. I have ...
saurav's user avatar
  • 5,796
-1 votes
1 answer
59 views

Session management in a spring-oauth2-client that works as a gateway

I am implementing a microservices application and for the authentication issue I have used something similar to what @ch4mp proposed in his https://www.baeldung.com/spring-cloud-gateway-bff-oauth2 ...
Andre Gallegos's user avatar
0 votes
0 answers
38 views

Issues with Establishing WebSocket Connection via JHipster, Spring Cloud Gateway, and Traefik

I'm experiencing difficulties in establishing a WebSocket connection through Spring Cloud Gateway and Traefik in my JHipster project. When I attempt to create a WebSocket connection, I encounter the ...
Jennifer Schuhmacher's user avatar
-1 votes
0 answers
42 views

CORS with spring cloud gateway MVC is not working

I have a simple spring-cloud-gateway-mvc gateway where I have configured the cors through configuration which does not work. spring: cloud: gateway: mvc: routes: - id: ...
pmverma's user avatar
  • 1,661
0 votes
0 answers
18 views

Render same app in 4 different iframes of browser window each with unique JSESSIONID

A front end react app interacts with a legacy backend via an API gateway between them. It fires two requests - /api/login - where it passes LDAP credentials via API gateway to legacy backend and gets ...
Jacob's user avatar
  • 444
0 votes
0 answers
109 views

Issue in Spring Authorization Server and Spring Cloud Gateway refresh_token flow

I have created Spring Authorization Server and Spring Cloud Gateway and everything looks perfect, but I found a problem in the gateway and specifically in the flow based on the refresh token. When ...
HDonev's user avatar
  • 1
0 votes
1 answer
32 views

Spring Cloud Gateway Can't Forward to React Vite Dev Server, Works After Nginx Build

I'm having trouble getting Spring Cloud Gateway to forward requests to my React application when it's running in development mode with Vite. Here's the breakdown: Development: When I run npm run dev ...
Nguyen Nguyen's user avatar
0 votes
3 answers
180 views

How to secure microservice websocket endpoint with Spring Cloud Gateway?

I have a microservice architecture based project, for which I have added Spring Cloud Gateway in front. My plan is to centralize security in the gateway. I have added OIDC and OAuth 2 for ...
IonutB's user avatar
  • 73
0 votes
1 answer
49 views

How to use Spring Cloud API Gateway (MVC) to create filter that dynamically obtains a value with addRequestParameter?

In Spring Cloud API Gateway (MVC), I am trying to filer a GET request that dynamically creates a request param (query string)? Original request path to API Gateway with path param: v1/sample-resource/...
user23524156's user avatar
0 votes
0 answers
85 views

Spring Cloud Gateway + Spring Security + Spring Boot 3

We're migrating all our microservices to Spring Boot 3. Zuul to be migrated to Spring Boot3. Hence Spring-cloud will be the new API Gateway. Zuul was acting like a resource server(used JWTs + OAuth2) ...
Padmaja's user avatar
  • 119
0 votes
0 answers
38 views

Spring cloud gateway : Returns 200 to an api call but no response in body

When I hit URL through postman, [localhost:8090/api/v1] I get 200 but no response in body and when I check the logs of the service which was hit through gateway it shows nothing, which means it didn't ...
Aditya Priyam iGTB's user avatar
0 votes
0 answers
35 views

Spring Gateway routes not applied to multiple SecurityWebFilterChains

---> .csrf((c) -> {c.disable();}) for the /api/** security filter chain caused the following to happen for an unknown reason: The issue is not having the gateway route filters and resources ...
MrSnafu's user avatar
0 votes
0 answers
19 views

How to access same request in prefilter and postfilter in Spring Cloud Gateway?

We're moving from zuul to Spring Cloud Gateway. Storing all the request and response details in a table using pre-filter and post-filter implementation. Following is the implementation in zuul ...
Padmaja's user avatar
  • 119
0 votes
0 answers
37 views

spring cloud webflux with http2

I have a spring cloud webflux application, I want my application to work on the http2 protocol. I create a certificate and keys through Keystore explorer, add them to the configuration of my gateway ...
Арчи's user avatar
0 votes
0 answers
32 views

Problems with the authentication route using spring cloud gateway with oauth

I'm having problems with the authentication route using spring cloud gateway with oauth.I have 3 simple authentication services, which have a gateway, an oauth configuration service and the user. When ...
Jean Fernandine's user avatar
0 votes
1 answer
104 views

Http Connection Management In Spring Cloud Gateway / Reactor Netty

We use Spring Cloud Gateway (Spring Boot 2.0) to route(POST) request to different external customer REST endpoint (along with filters). Most of the time routing is ok in production, only certain times ...
Arpit S's user avatar
  • 185
1 vote
1 answer
56 views

Getting IllegalStateException and ClassNotFoundException: jakarta.servlet.Filter While Using Keycloak Service with Spring Cloud Gateway

I am currently working on routing api which uses Spring Cloud Gateway library. I also want to use Keycloak for authentication purposes, but I failed to implement a proper Keycloak configuration for my ...
KaraKaplan's user avatar
0 votes
0 answers
62 views

What is the difference between K8 resources springCloudGateway and gateway api?

VMware provided springCloudGateway kind resources to kubernates. Which can be defined as kind in yml config file for dynamic routing with many features. Kubernates introduce gateway api as rules, ...
atiqkhaled's user avatar
0 votes
0 answers
31 views

PrematureCloseException in netty http client

We are using Spring Cloud Gateway (spring boot 2.7.X, JDK 11) to route request. To fetch/pass OAuth2.0 token before routing, filter is added to fetch it from OAuth2.0 provider, to make secure call to ...
Arpit S's user avatar
  • 185
0 votes
1 answer
31 views

Spring gateway dependency causing clientRegistrationRepository cannot be null

The issue is coming because of spring gateway starter mvc, i am using webflux because gateway needs webflux and i am using okta for oauth2.0 implementation. I created the same project demo with same ...
Rani's user avatar
  • 13
1 vote
1 answer
41 views

Is there a method in Spring Boot to access the data of a received OAuth2-token?

Currently I am building a Spring Cloud Gateway-application, which should act as an API-gateway between an Angular Frontend and some downstream-services. So far, the frontend logs into the gateway, ...
h.martinez's user avatar
0 votes
0 answers
36 views

Spring Cloud Gateway on AWS

Somehow, I'm having trouble getting Spring Cloud Gateway to work on AWS. It works fine locally, but after deployment to AWS, it doesn't. I think I need another pair of eyes on this. I have a simple ...
Dzmitry's user avatar
  • 53
0 votes
0 answers
36 views

[SpringCloudGateway]: Netty HttpClient failed to connect with SSLHandshakeException after establishing HTTPS connection with endpoint

We have built API Gateway application using Spring Cloud Gateway 4.0 (on webflux) framework and Azul Zulu OpendJDK 17. The application is able to intercept incoming request and redirect it to the ...
Deepak Chhetri's user avatar
0 votes
0 answers
45 views

Spring Cloud Gateway gives error while reading response from GRPC requests "ResponseFacade cannot be cast to class HttpServerResponse"

I have configured the api gateway with grpc. The requests route correctly to the grpc url, however gateway is unable to read the response and it fails with below error. "ResponseFacade cannot be ...
ShivaniK's user avatar
0 votes
0 answers
58 views

Gateway service does not get informed about an updated service port

I have a cluster of Spring Cloud services; Eureka Server Gateway Client Service (port:0 so a random port is assigned on each startup) When I start all the applications up, everything looks good. ...
Eric's user avatar
  • 449
0 votes
0 answers
23 views

While using Spring Cloud Gateway and configuring the circuit breaker, the server crashes

resilience4j: circuitbreaker: configs: default: sliding_window_size: 100 slow-call-duration-threshold: 9500 permitted_number_of_calls_in_half_open_state: 10 ...
ethan yang's user avatar
0 votes
1 answer
117 views

Simple discovery client in Spring Cloud Gateway MVC

Availability of virtual threads made me want to switch from reactive Spring Cloud Gateway to it's MVC version. Migration of most of the code was easy (changing some classes and method names, moving ...
Krzysztof's user avatar
-1 votes
1 answer
57 views

How to get inputStream as return value from ServerHttpRequest in spring reactive?

I am writing a Spring Reactive implementation for a third-party SPI which is based on a traditional servlet. One method requires InputStream from request as return value: /** * Returns the request ...
Michael's user avatar
  • 410
0 votes
1 answer
84 views

Spring websocket connection closed by spring cloud gateway after 30 seconds

My application is a microservice application. I am using spring web sockets to send notifications to the front end. In my application, I have a gateway service to route the HTTP requests to the ...
Devmina's user avatar
  • 45
0 votes
0 answers
69 views

Spring Cloud Gateway Custom Filter Handle Error Response

I have a customer filter in my spring cloud gateway and I am making a request with WebClient to validate authentication. If the response is 200 I want to continue with the execution/chain and if they ...
iqueqiorio's user avatar
  • 1,179
0 votes
0 answers
22 views

How to communicate with a server with an invalid certificate

I have a Spring Cloud based service. It has in its application.yml the option spring: security: oauth2: client: provider: blitz-provider: ...
ka3ak's user avatar
  • 2,721
0 votes
0 answers
65 views

How to strip predicate path prefix from all the configured route configurations?

Our team is migrating the API Gateway application from Netflix Zuul 1.x framework to Spring Cloud Gateway (SCG) 4.0 framework. There are more than 30 routes configured in the SCG application in the ...
Deepak Chhetri's user avatar
0 votes
1 answer
132 views

React Native OAuth2 Backend for Frontend With Spring Cloud Gateway BFF

Hello I am using learning about OAuth. I have a react native app, and I want to connect it to my Java Spring backend, with OAuth. I used this tutorial to add OAuth to my Java backend: https://www....
Kado's user avatar
  • 13
0 votes
0 answers
21 views

What is the right way of doing custom Authentication in spring WebFlux. In my configuration i have redirect after Authentication problem

I try to implement custom Authentication digital signature based in Spring Cloud Gateway. At this moment i just return true for signature validation. public class AdsAuthenticationFilter implements ...
Vladimir Surkov's user avatar
0 votes
0 answers
15 views

Cannot disable CORS in Spring Cloud Gateway

IN the frontend React Web App. import { useState } from "react" export default function PrestadoresServico() { const [prestadoresServicos, setPrestadoresServicos] = useState([]) ...
Diego Alves's user avatar
  • 2,607
1 vote
1 answer
134 views

Converting ServerHttpRequest to HttpServletRequest

I'm migrating an application from Netflix/Zuul to Spring Cloud Gateway: public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { ServletServerHttpRequest ...
cybertextron's user avatar
  • 10.9k
0 votes
0 answers
116 views

Unable to integrate grpc with spring cloud gateway

I am trying to integrate grpc with the spring cloud gateway. I want to hit a grpc gateway URL with a proto file and redirect it to the grpc service. My gateway config looks like below ... .. .. server:...
ShivaniK's user avatar
1 vote
1 answer
52 views

Is application.properties deprecated for configuring microservices gateways?

I recently completed a tutorial from 3 months ago, but the configuration advised for the API gateway isn't working as expected. I'm encountering a 404 error when trying to access /quiz-services. Can ...
Rahul Gupta's user avatar
0 votes
1 answer
133 views

Azure Ad SSO Authentication Fail and redirect back to login page then getting TOO_MANY_REDIRECTS

I am facing issue with azure ad authentication in spring cloud, I have configured the things correctly but not sure why I am facing issue. Problem: We are able to generate oauth code when we inspect ...
Raj musham's user avatar
0 votes
1 answer
105 views

No 'Access-Control-Allow-Origin' with Spring Cloud API Gateway and OAuth2 Server

I'm facing a CORS issue when using Spring Cloud API Gateway along with a Spring Security OAuth2 server. My frontend application running on http://localhost:4200/ is blocked due to a missing Access-...
abus's user avatar
  • 89
0 votes
0 answers
53 views

Spring Cloud Gateway Encoded Slash Issue After Upgrade

I just recently updated my Spring Cloud Gateway that I use as a proxy to other Microservices to java 21 (upgraded from java 8), Spring 3.2.. (upgraded from 2.7.3) and Spring cloud 2023.0. (upgraded ...
kpolli's user avatar
  • 1
0 votes
0 answers
86 views

Add dynamic value in the header

i use spring cloud gateway mvc. We can add header value with addRequestHeader @Bean public RouterFunction<ServerResponse> bookServiceRoute() { return route("bookRoute") ...
robert trudel's user avatar

15 30 50 per page
1
2 3 4 5
26