Reputation: 133
We use Spring Cloud Gateway for Authentication. Spring Security OAuth2LoginAuthenticationWebFilter use Netty HTTP Client to send request to Identity provider. Netty has connection pool which is messed up by load balancing server between Netty and Identity Provider which disconnect the idle connection in the pool. Is there any way to disable Netty HTTP client connection pool in Spring Security?
I tried configure Spring Cloud Gateway HTTP Client parameters but it does not affect the Netty HTTP Client which is used by Spring Security.
Upvotes: 2
Views: 1750
Reputation: 663
You can do this by simply adding below lines in your application.yml file
spring:
cloud:
gateway:
httpclient:
pool:
type: disabled
Upvotes: 2