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

2nd
Jul 2018
Marcos Barbero
@marcosbarbero
Jul 02 2018 11:13
@ofabricio can’t you stick on *.RELEASE version instead of BUILD-SNAPSHOT?
Enrico Hofmann
@gigo1980_gitlab
Jul 02 2018 12:24
hi together, i am using spring cloud feign (openfeign) is it also possible to use in with contract driven testing ?
Jason Yarn
@GreedyPirate
Jul 02 2018 12:36
hi, i am trying to custom ribbon server list without eureka , i create a ServerList bean to overwriter ServerList in RibbonClientConfiguration, but I catch a error : Could not resolve placeholder 'ribbon.client.name' in value "${ribbon.client.name}"
i am sure that it's because of @RibbonClientName
Spencer Gibb
@spencergibb
Jul 02 2018 15:45
@ofabricio we haven't started working on boot 2.1.0 and reactor-netty 0.8 compatibility yet
@GreedyPirate you have misconfigured you server list bean
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 15:53
Hi, I'm using spring cloud oauth2 and gateway, but can't seem to get the gateway to forward the auth header downstream. We're using JWT in the header and would like to be able to access them in the downstream services. Is there a way I can configure the gateway, or a reason why we shouldn't be forwarding it?
chetz3
@chetz3
Jul 02 2018 16:07

Hey, i am using gateway to route to other service, when i use eureka service id for routing the routing is failing coz of this below reason, it would be really great if some one can help here :)

Mon Jul 02 21:31:06 IST 2018
There was an unexpected error (type=Internal Server Error, status=500).
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 485454502f312e3120343030200d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a446174653a204d6f6e2c203032204a756c20323031382031363a30313a303620474d540d0a436f6e6e656374696f6e3a20636c6f73650d0a0d0a300d0a0d0a

Randy Aldrich
@randyaa
Jul 02 2018 17:24
why does the current symlink for spring cloud stream docs point to Ditmars SR2 (not even SR4) instead of Elmhurst (which is actually the most recent major release) ?
https://docs.spring.io/spring-cloud-stream/docs/current/
vs
https://docs.spring.io/spring-cloud-stream/docs/Elmhurst.RELEASE/
Spencer Gibb
@spencergibb
Jul 02 2018 17:53
@mvanderlugt is the client sending the header to the gateway?
@chetz3 likely a mismatch between https/http?
@randyaa we haven't updated it
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 17:58
Yes, the browser could send the JWT to the gateway, check it, then I would like it to be forwarded downstream
would send*
Spencer Gibb
@spencergibb
Jul 02 2018 18:00
and what is happening?
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 18:01
As far as I can tell the authorization header is forwarded, its possible there is another problem, but when I call the service directly my calls work fine, but through the gateway I get a 401.
A simple route like this
```
    routes:
    - id: 'authorization'
      uri: 'http://localhost:8380'
      predicates:
      - 'Path=/authorization/**'
Sorry for the typos, hands aren't working today.... I don't believe the header is forwarded
This last line in the docs make me think the auth header is specifically removed from being sent downstream
First class support is provided for "sensitive" headers ("cookie" and "authorization" by default) which are not passed downstream, and for "proxy" headers (x-forwarded-*).
Spencer Gibb
@spencergibb
Jul 02 2018 18:06
That's for using the ProxyExchange object, in the -mvc or -webflux modules, not the core gateway
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 18:27
Ok, I'll turn on some more debug logging and see if I can't narrow down the issue a little more
KaijuDeluxe
@KaijuDeluxe
Jul 02 2018 18:42
hi i have a service which call a extern API. This API give me back „ Products“ which i need to persist. Should i create a seperate service which do the saving?
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 18:45
@spencergibb thanks for you help, I'm not sure what I was smoking, but it was routing to the wrong URL...simple enough fix
Spencer Gibb
@spencergibb
Jul 02 2018 18:46
:+1:
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 22:03
@spencergibb do you know if/how spring cloud gateway can become an oauth2 resource server? If I add the dependency for spring-cloud-starter-oauth2, the service won't start up.
**********************************************************

Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.

**********************************************************

Description:

Parameter 0 of method hystrixGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration$HystrixConfiguration required a bean of type 'org.springframework.web.reactive.DispatcherHandler' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.web.reactive.DispatcherHandler' in your configuration.
Spencer Gibb
@spencergibb
Jul 02 2018 22:06
there's work that needs to be done there
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 22:08
That's cool, I can probably live without it for a while. Do you have any idea when/how much work is involved?
Spencer Gibb
@spencergibb
Jul 02 2018 22:12
Shouldn't be a lot of work, just time to do it.
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 22:17
How much prior knowledge would one need to "do it", I may be able to carve out some time to take a look
I've never contributed to a spring project before
Spencer Gibb
@spencergibb
Jul 02 2018 22:31
there's precedent with zuul, so it would be porting the fucntionality to gateway
Mark Vander Lugt
@mvanderlugt
Jul 02 2018 22:32
Maybe tomorrow night I can take a look at some of it, thanks for all your help today