Spring Boot - Force All Traffic to Come Through Gateway Service

萝らか妹 提交于 2019-12-11 07:03:42

问题


In our domain, we have a number of Spring Boot applications and a Gateway Service (we are using Netflix Zuul). Our Gateway Service is handling our authentication and security. We expect all of our consumers to be coming in through our Gateway Service.

Because the security is being handled by the Gateway Service, we'd like to disable direct access to our Spring Boot applications. Any requests made that didn't originate from our Gateway Service should be rejected.

How can we accomplish this in Spring Boot? Are there any best practices around this?


回答1:


I would prefer to restrict this on the network level. Put all internal services on a private subnet which only accepts HTTP requests from the gateway service host(s).



来源:https://stackoverflow.com/questions/45045466/spring-boot-force-all-traffic-to-come-through-gateway-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!