How connect Spring Cloud Gateway + Spring Cloud Security + Keycloak - spring

He has been trying to connect s-c-gateway and s-c-security with Keycloak for a couple of days. I want the modules that are located behind the gateway not to have a keycloak configuration.
Is Spring Cloud Gateway not supported by Spring Cloud Security?

There's an issue on the spring cloud gateway github about this - a short summary is that there's currently no official support but I'd suggest reading the full github comments

You could use #EnableWebFluxSecurity in cloud gateway, since it's reactive project.

I know this is an old question with an answer but now it is possible and very common to integrate Spring cloud Gateway, Spring cloud Security and Keycloak. You can find a good tutorial here:
https://kunkkali.blogspot.com/2020/10/build-j2ee-micro-services-architecture.html
Source code: https://github.com/liqili/spring-microservice-oauth2-keycloak-starter

Related

I am trying to connect my spring boot application with Azure service bus. Should I be using JMS or azure spring cloud stream binder?

I found these two docs in Spring Azure Documentation
https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-with-service-bus
https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-service-bus
What is the difference between them? If there are other options, please suggest them!

Spring Cloud Gateway with SAML

I want to use Spring Cloud Gateway with SAML. Is this possible?
It seems that the Saml extension for spring security is based on the old Spring Stack and won't work with Gateway.
Has anybody got any experience on this?
I'm afraid SAML is not supported as of time of writing. Spring Cloud Gateway has been redeveloped using Reactive programming and is now based on Spring WebFlux. Only the following authentication methods are currently supported :
OAuth 2.0 or OpenID Connect 1.0
x509 authentication
This is stated on SCG page:
Spring Cloud Gateway is built on Spring Boot 2.x, Spring WebFlux, and
Project Reactor. As a consequence, many of the familiar synchronous
libraries (Spring Data and Spring Security, for example) and patterns
you know may not apply when you use Spring Cloud Gateway. If you are
unfamiliar with these projects, we suggest you begin by reading their
documentation to familiarize yourself with some of the new concepts
before working with Spring Cloud Gateway.
The previous gateway spring-cloud-netflix-zuul, based on Servlets and which supported SAML, has been removed from Spring Cloud 2020.
Here is an open issue on GitHub, SAML2 for reactive environment, where we can vote for asking for this to be implemented.

How we can integrate Springboot 2.x with Zuul 2

We have a springboot application which is currently having gateway as Zuul 1. Our application is running in Springboot 2.0.0.M2. We are trying to upgrade our Zuul gateway to Zuul 2. We created a springboot application with Zuul 2 dependency and added webflux dependency to get Netty server. The server starts fine, but we are still unclear that how the springboot application will understand that this is a gateway and filters needs to be executed. Although we have created Routes filter, but the same is not getting invoked.
Thanks in advance,
Ron
if you go through the video "https://www.youtube.com/watch?v=9wocKqF15B8" at 18:00 from spring developers. They clearly stated that zuul2 is not going to be supported by the spring ecosystem. Also, the replacement of zuul2 (non-blocking calls) is a spring cloud gateway which is also non-blocking calls.

Secure Rest Apis Using Okta + Oauth

currently am Creating Rest Apis in Spring Boot I want to secure Those Apis Using Okta Wit Oauth.
Can Any one Help On this....
You can use Okta's Spring Boot Starter for this. https://github.com/okta/okta-spring-boot
Warning: there is an issue where you can't use devtools with this starter.

Interaction between api gateway (Zuul) and UAA server (Spring OAuth2) with Spring Boot 2.0

I'm trying to build a system with an gateway server (Zuul), and UAA server (Spring OAuth2)
There's lots of examples but they are all used with Spring Boot 1 (1.5.X?). When I tried to migrate to Spring Boot 2, lots of things got moved or removed (in the auto-configure package).
My current understanding is that the gateway server will acts as an oauth2 client with sso. Hope someone can point me to the right direction.
Thanks.

Resources