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

25th
Aug 2017
borgato tommaso
@tommasoborgato_twitter
Aug 25 2017 07:13
Hi all .... I want to setup SSO with an Edge service (Zuul), and Authorization service that issues JWT Tockens and Clients (hosting th gui) that relay the JWT token to downstream resource services .... I was wondering if some document or some recent document exists that illustrates in detail how to setup such an infrastructure
marekdominiak
@marekdominiak
Aug 25 2017 08:49
Hi everyone, I would like to start two nodes of the same application (e.g. user-app) locally. I use eureka and config server. In user-app I use bootstrap.properties, which defines service name and url to config server. Now when running one instance I the application.properties fro user-app are loaded and the app runs on a port 8080. However I can't find simple solution to either
  1. Pass the bootsrap properties to the second instance (with different name) and which would point to another application.properties with e.g. port set to 7070. Jvm params for server.port, or spring.application.name doesn't override what is in the bootstrap. How to work around this issue?
James Howe
@OrangeDog
Aug 25 2017 09:17
@andersonkyle it appears to be, on Windows, reproducibly, the /refresh endpoint never returns. After ~a minute the thread is still in various loops reading inside jars, a bit later it's parked on that lock I indicated.
borgato tommaso
@tommasoborgato_twitter
Aug 25 2017 10:07
@marekdominiak are you using port: ${SERVICE_PORT:808} sintax?
marekdominiak
@marekdominiak
Aug 25 2017 10:23
@tommasoborgato_twitter I have solved the issue with use of spring.profiles.active and adding a separate bootstrap-profile.properties. where I set the eureka.instance.instanceId=${spring.application.name}:${vcap.application.instance_id:${spring.application.instance_id:${random.value}}} and with another application-node2.properties on the config server with set different port
Amin Abu-Taleb
@aabutaleb
Aug 25 2017 10:26
Hi, I upgraded my services to Dalston.SR1 and suddenly my /env endpoint returns 401 unauthorized, is it protected with spring security now by default?
James Howe
@OrangeDog
Aug 25 2017 10:36
Why not SR3?
And /env has always defaulted to sensitive
Amin Abu-Taleb
@aabutaleb
Aug 25 2017 10:46
Well, nothing changed and before that I was using Camden and that never had any password :S
I just wanted to understand what changed, I agree that enpoint is not to be publicly exposed
James Howe
@OrangeDog
Aug 25 2017 10:48
IIRC Camden is for Boot 1.4 and Dalston is for 1.5
Matthew Planchant
@mplanchant
Aug 25 2017 12:44
Hello all. Is there a way I can disable all feign client or a single feign client in a test class?
I tried
@WebMvcTest(controllers = MyControllerImpl.class,
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = MyFeignClient.class)})
Matthew Planchant
@mplanchant
Aug 25 2017 12:49
but no joy
James Howe
@OrangeDog
Aug 25 2017 12:50
Presumably that just disables your one, so you get the auto-configured one instead
Also, if you're using RestTemplate you can use MockRestServiceServer, bypassing all client implementations
Matthew Planchant
@mplanchant
Aug 25 2017 12:52
I'm using MockMVC
James Howe
@OrangeDog
Aug 25 2017 12:52
yes... that's completely separate
Matthew Planchant
@mplanchant
Aug 25 2017 12:53
So is there a way to completely disable feign?
James Howe
@OrangeDog
Aug 25 2017 12:53
here's one: if you're using RestTemplate you can use MockRestServiceServer, bypassing all client implementations
Jyothi Swaroop Reddy
@sjswaroop_twitter
Aug 25 2017 15:14
@OrangeDog Thanks