These are chat archives for spring-cloud/spring-cloud

5th
Apr 2018
Thiago Locatelli
@thiagolocatelli
Apr 05 2018 00:23
spring-cloud-gateway question: Is the endpoint provided in the uri() method (when creating a route) final or it can be changed by a "pre" filter?
Thiago Locatelli
@thiagolocatelli
Apr 05 2018 00:46
I guess its possible, I just found a way.
Thiago Locatelli
@thiagolocatelli
Apr 05 2018 02:11
I tried mutating the request and change the uri but it did not work.
vrustia-owens
@vrustia-owens
Apr 05 2018 06:46
@vrustia-owens
question
do we have OAuth2 relay in spring cloud stream messaging
or any other security session relay
right now we are using oauth2 using zuul
and we have multiple microservices, one microservice will communicate with the other
and we need to relay the security session
any idea will be gladly appreciated, thanks!
Ugur GUNGOR
@gungorugur
Apr 05 2018 07:58
Is there anyone using zuul and keycloack for api gateway authentication
vrustia-owens
@vrustia-owens
Apr 05 2018 08:00
@gungorugur use spring security oauth2 instead
its SSO vendor agnostic
Ugur GUNGOR
@gungorugur
Apr 05 2018 08:04
@vrustia-owens Is there any way to integrate keycloak to spring security ?
vrustia-owens
@vrustia-owens
Apr 05 2018 08:17
you can use any authentication/authorization
if you use spring security oauth2 in zuul
keycloak is just a sso server
zuul use spring security oauth2 ----> connects to ------> keycloak server
did you get my point?
it has a sample project, you can try it
vrustia-owens
@vrustia-owens
Apr 05 2018 08:27
@gungorugur does it help?
Maroua DRISSI
@marouaDrissi
Apr 05 2018 08:48
@ryanjbaxter I want to ask you about spring cloud sleuth and zipkin, I am using spring boot 2.0 when I run my projects , in the console I find the log statements INFO [app-name,traceID,spanID, false]
false means that this trace isn't exported to zipkin
I've just read on DZone article that Zipkin doesn't support Spring Boot 2.
some projects' logs are being exported I don't know how or why
I've added properties in every micro service properties.yml
spring:
sleuth:
sampler:
percentage: 1.0
web:
skipPattern: (^cleanup.*)
zipkin:
base-url: http://localhost:9411
vrustia-owens
@vrustia-owens
Apr 05 2018 08:55
@ryanjbaxter better if you use markdown for formatting
Ugur GUNGOR
@gungorugur
Apr 05 2018 10:09
@vrustia-owens thank you , I'll check it out
Jose Armesto
@fiunchinho
Apr 05 2018 13:21
when an Spring Cloud application receives a SIGTERM signal, does it removes itself from Eureka before exit?
Andre Dörnbrack
@doernbrackandre
Apr 05 2018 13:29
@fiunchinho should be. But I have seen applications which does not send an unregister message to eureka
from what I can tell this is not 100% reliable
Jose Armesto
@fiunchinho
Apr 05 2018 13:31
problem is, clients can take up to 30 seconds to realize that my application is gone from Eureka, due to each client keeping a local cache of eureka info, so is there a way to make my spring cloud application to wait 30 seconds or something like that from receiving the SIGTERM to finally exitting?
Andre Dörnbrack
@doernbrackandre
Apr 05 2018 13:34
you can try to tweak the intervals here and there a bit, but yes, this is something you have to handle with
also, keep in mind that the /apps endpoint on eureka is cached as well
as long as you dont have hight amount of traffic you can lower this cache. this helped us a lot
there is also the eureka health check property. if enabled it sends the local instance status with the heartbeats. it is possible that this property enables the unregister, but Im not sure
Jose Armesto
@fiunchinho
Apr 05 2018 13:50
who should know more about this topic? should I ask a question on StackOverflow maybe?
Andre Dörnbrack
@doernbrackandre
Apr 05 2018 14:20
I've bookmarked this article here which was a huge help for understanding how it works: https://blog.asarkar.org/technical/netflix-eureka/
maybe it will help you as well
there is a discussion regarding the spring-cloud-netflix and deployment on github as well but unfortunatly i did not found the link
however, feel free to ask on stackoverflow
Jose Armesto
@fiunchinho
Apr 05 2018 14:36
If I were to wait 30 secs before exitting, do you know how I'd go about it?
Andre Dörnbrack
@doernbrackandre
Apr 05 2018 14:38
with a lifecycle listener which closes the tomcat connector and waits for the current connections to be closed
closed/handled
on a SIGTERM spring sends an application event