kakawait / uaa-behind-zuul-sample

Spring AuthorizationServer load balanced behind Zuul
322 stars 156 forks source link

dear kakawait,special thanks #8

Closed damozhiying closed 7 years ago

damozhiying commented 7 years ago

dear kakawait,special thanks from your post ,i benefit more,but now i have two problem to resolve first ,i use ui gateway to offer one point endpoint services ,at the same time ,the backends service machine can't be access by the Internet, when users open the browser the ui server route to the sso system,when login success,the sso server redirect to the ui gateway ,the ui gateway according to the session id get user info from redis ,now the requirements is according to the userID, the ui gateway route to different pc get ui pages. the first problem is how i get zuul route config info from database the second is how ui gateway according to userid to route to diff pc,(because some service such as http://192.168.1.22, there not the context, at the same time can't use http Re-direct 302, ) ,dynamic add the zuul route and bypass to the diff pc get ui page

damozhiying commented 7 years ago

1: after login success ,the sso server popup the confirm access page, but i don't want this page,i wish redirect to the ui gateway 2: how the sso server use spring session to share the session info to redis. 3: spring cloud config get config into from database

kakawait commented 7 years ago

Good to know that this project help you 👍

1: after login success ,the sso server popup the confirm access page, but i don't want this page,i wish redirect to the ui gateway

Do you mean approve form? If you do you try to add .autoApprove(false) on ClientDetailsServiceConfigurer (https://github.com/kakawait/uaa-behind-zuul-sample/blob/master/uaa-service/src/main/java/com/kakawait/UaaServiceApplication.java#L85)

2: how the sso server use spring session to share the session info to redis.

Actually the POC is currently not using Spring Session project, so that can't work out of the box. But I think you can simply add Spring Session deps on pom.xml and add configuration like any other Spring Boot app.

3: spring cloud config get config into from database

Hum if I think is out of scope of this project. I can't help you about Spring Cloud Config sorry. You may write your own backend as git Spring Cloud Config backend.

the first problem is how i get zuul route config info from database

If you succeed to work Spring Cloud Config with database you will solve your issue. Otherwise there is no built-in feature for such case. But feel free to ask more support on https://gitter.im/spring-cloud/spring-cloud (gitter is chatting service where you can ping Spring Cloud lead dev and community).

the second is how ui gateway according to userid to route to diff pc

Actually the simplest (and maybe only) way to do that is to write your own ZuulFilter to handle your custom routing policies

damozhiying commented 7 years ago

@kakawait special thanks ,you are a good person

kakawait commented 7 years ago

I will close issue feel free to open other one if needed