Spring boot reactive (webflux) support with #EnableResourceServer - spring-boot

I am trying to migrate my existing spring boot 1.5 resource server (oauth2) to spring boot 2.x, while do so i am facing difficulties in providing reactive support for the same. It looks like i can not use reactive webflux when i use pring-cloud-starter-oauth2, i have few questions:
does spring boot 2.0.3 supports webflux + oauth2 resource servers using #EnableResourceServer, is yes then what is right way to implement it?
If it does not support, what are other possible options? Spring 5 security documentations says that it does not support authorization server and resource server at this moment.
Thank you in advance

Short answer: no.
There's no support to implement your own Authorization nor Resource server using webflux.

Related

Is it possible to support both REST & SOAP APIs on a single spring boot application?

We have a spring boot application which exposes REST endpoints. There is a requirement to support SOAP endpoints in the same application.
Can someone help out on the below questions as there is very little to no documentation on this part,
Can spring boot support both REST & SOAP endpoints, on the same port ?
If yes to the above questions, any good documentation or sample project will be really helpful.
Is it advisable to have spring boot application configured in this manner ? If no, what are the cons ?

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.

Implement Spring Cloud Sleuth's TracingWebFillter in Spring WebFlux

I have a Spring Boot Reactive application using Functional Endpoints ( Kotlin) that uses Spring Cloud Sleuth. I want to customize the response headers to include the trace id. I looked at the manual and saw the section on using the TraceFilter : 1
I tried to do the same using a TraceWebFilter, but it doesn't expose the constructors. Is there a way to implement this customization when using the Reactive Web Framework.
I am using version 2.0.0.M5 for Spring Cloud Sleuth
Thanks in advance!
Please check out the latest master - we've migrated to Brave. You can write your WebFilter that will delegate to TraceWebFilter. Or you can just copy our TraceWebFilter and alter it in the way you need to.

how to implement the oauth2 serverconfiguration in spring boot 2.0 M7?

how to implement the oauth2 server using jwt to get clients from database in spring boot 2.0 M7 ? there is any example, I just found an example with spring boot 2.0. M4 but seems it is not compatible with M7 , could someone please provide me a example ?
Support for the spring-security-oauth2 dependency was removed from Spring Boot 2.0 in favor of Spring Security 5’s first class OAuth support. Functionality from the Spring Security OAuth project is still being migrated to core Spring Security. For Authorization server and Resource server support which has not been migrated yet, you will need to add a dependency on an additional jar. See this documentation for more details.

How to configure TLS for Netty in a Spring Boot app?

My microservices are using the latest releases of Spring Boot, Spring WebFlux (Undertow), Spring Data MongoDB, Spring Cloud Netflix, and Kotlin...
Now I've setup a demo project to use the new functional interface instead of the annotations in Spring WebFlux. Using Netty with HTTP works fine. However, I cannot find any information how to configure Netty with TLS resp. HTTPS. Any hint is appreciated!
At the time of writing, configuration of TLS with Netty hasn't been implemented. The work is being tracked by this issue.

Resources