Spring Boot Cloud Gateway Routing - spring

I want to redirect a gateway url from http://gateway-service-url/other/http://dynamic-url
to http://dynamic-url

Related

How to implement role based authorization in spring cloud gateway

I am unable to implement spring security with jwt role based authorization in spring cloud gateway. Is it possible or I have to implement spring security in every microservice ?

API Gateway with SSO Authentication using Spring WEB MVC

Have created an API Gateway microservice (Sprint Boot project), using the Spring Cloud Starter Gateway.
Also the API Gateway would do the SSO Authentication, and on successful authentication, the IDP would redirect the SAML assertion to the API gateway HTTPS endpoint.
Added the spring-cloud-starter-gateway dependency and excluded all the transitive dependencies.
i have added the spring-boot-starter-web dependency so that the IDP would be able to redirect to the API gateway HTTPS endpoint.
I tested the SSO Authentication and it worked fine, but then when i wanted to test the gateway routing, it was not working.
So had to comment out the excluded spring-cloud-gateway-server dependency for routing.
But it gave error that Spring Web MVC found on Classpath is incompatible with Spring Cloud Gateway.
Either make application reactive or remove web dependency.
So made the application reactive by adding property in application.properties file to make it reactive.
But now, while doing SSO authentication, i get the following error in the Browser,
type=Unsupported Media Type, status=415
Is there a way in which we could do WEB SSO Authentication in the API Gateway ??

Do i need to discover gateway service in discovery server?

Do i need to discover Spring cloud gateway in Spring cloud service discovery eureka?
Should i request directly to api gateway and then api gateway will redirect to eureka and then to the next servic.
Or
I should request to the eureka service discovery first and service discovery will redirect me to the api gateway and then api gateway will redirect to the next service.

Adding swagger UI for spring cloud gateway service

I need help in adding swagger ui for my spring cloud gateway microservice.
My spring cloud gateway service is routing the request to another microservice which already has swagger ui enabled since it has a controller layer
But since my spring cloud gateway service doesn't have any #Controller class and all the routes are defined in a RouteConfig class which doesn't do much except routing the request to actual service

AWS API Gateway websocket with spring boot backend

I'm building an application using spring boot. I'm planning to add a chat feature to it via websocket. Considering that I'm hosting it on AWS, how can I integrate the websocket properly via api gateway websocket? Do I do my spring controller mapping for websocket via api gateway websocket endpoint?
AWS API Gateway provides you with an option of HTTP integration, so you can keep your application in an ECS container and expose an endpoint that can be ingested by the API gateway side.

Resources