简体   繁体   English

保护 Eureka 客户端服务端点

[英]Secure Eureka Client Service Endpoints

I want to communicate between several microservices.我想在几个微服务之间进行通信。 Better said: I only want to trigger a function in different microservices.更好的说法是:我只想在不同的微服务中触发一个 function。 Therefore I have to call some functions in that.因此我必须在其中调用一些函数。 So I found eureka.所以我找到了尤里卡。 My question is: Is there a way to only let eureka communcate to the microservice(s)?我的问题是:有没有办法只让尤里卡与微服务通信? Because I know the microservices need rest endpoints and I dont want any other people or mashcines to communicate to them except eureka.因为我知道微服务需要 rest 端点,我不希望任何其他人或 mashcines 与他们通信,除了 eureka。 Can anyone help?任何人都可以帮忙吗? Another question ist: I want to have the eureka server insde a docker container and all my other microservices, which register to it are also in a docker container.另一个问题是:我想让尤里卡服务器安装在 docker 容器中,我所有其他注册到它的微服务也在 docker 容器中。 The microservices are registering, but on status, the URL (actuator) shows http://:: instead of the right url to get the status info.微服务正在注册,但在状态上,URL(执行器)显示 http://:: 而不是正确的 url 以获取状态信息。 when I click on it.当我点击它时。 of course this is not working.当然这是行不通的。 How to solve this?如何解决这个问题?

  1. put micro-serives and eureka behind a firewall so that outsides can not access them without permission.将微服务和 eureka 放在防火墙后面,这样外部未经许可就无法访问它们。

  2. Do you expose your microservices in dockerFile to be accessed?您是否在 dockerFile 中公开您的微服务以供访问? if not, please use EXPOSE command in dockerFile to a port and make it to be accessed.如果没有,请使用 dockerFile 中的 EXPOSE 命令到一个端口并使其可以访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM