简体   繁体   English

Bluemix CF应用程序和容器之间的安全网关

[英]Secure gateway between Bluemix CF apps and containers

Can I use Secure-Gateway between my Cloud Foundry apps on Bluemix and my Bluemix docker container database (mongo)? 我可以在Bluemix上的Cloud Foundry应用程序和Bluemix Docker容器数据库(mongo)之间使用Secure-Gateway吗? It does not work for me. 它对我不起作用。 Here the steps I have followed: 在这里,我遵循的步骤:

upload secure gw client docker image on bluemix 在bluemix上上传安全的gw客户端docker映像

docker push registry.ng.bluemix.net/NAMESPACE/secure-gateway-client:latest 码头工人推注册表。ng.bluemix.net/NAMESPACE/secure-gateway-client:latest

run the image with token as a parameter 使用令牌作为参数运行图像

cf ic run registry.ng.bluemix.net/edevregille/secure-gateway-client:latest GW-ID cf ic运行Registry.ng.bluemix.net/edevregille/secure-gateway-client:最新的GW-ID

when i look at the logs of the container secure-gateway, I get the following: 当我查看容器安全网关的日志时,得到以下信息:

[INFO] (Client PID 1) Setting log level to INFO [INFO](客户端PID 1)将日志级别设置为INFO
[INFO] (Client PID 1) There are no Access Control List entries, the ACL Deny All flag is set to: true [INFO] (Client PID 1) The Secure Gateway tunnel is connected [INFO](客户端PID 1)没有访问控制列表条目,“ ACL拒绝所有”标志设置为:true [INFO](客户端PID 1)已连接安全网关隧道

and the secure-gateway dashboard interface shows that it is connected too. 安全网关仪表板界面也表明它也已连接。

But then, when I try to add the MongoDB database (running also on my Bluemix at 134.168.18.50:27017->27017/tcp) as a destination from the service secure-gateway dashboard, nothing happened: the destination is not created (does not appear). 但是然后,当我尝试将MongoDB数据库(也在我的Bluemix上以134.168.18.50:27017->27017/tcp运行)从服务安全网关仪表板作为目标添加时,什么也没发生:未创建目标(确实没有出现)。

I am doing something wrong? 我做错了吗? Or is it just that this not a supported use case? 还是仅仅是这不是受支持的用例?

1) The Secure Gateway is a service used to integrate resources from a remote (company) data center into Bluemix. 1)Secure Gateway是一项服务,用于将来自远程(公司)数据中心的资源集成到Bluemix中。 Why do you want to use the SG to access your docker container on Bluemix? 您为什么要使用SG访问Bluemix上的Docker容器?

2) From a technical point of view the scenario described in the question should work. 2)从技术角度来看,问题中描述的场景应该有效。 However, you need to add rule to the access control list (ACL) to allow access to the docker container with your MongoDB. 但是,您需要将规则添加到访问控制列表(ACL)中,以允许使用MongoDB访问Docker容器。 When you are running the SG it has a console to type in commands. 当您运行SG时,它有一个控制台可以键入命令。 You could use something like allow 134.168.18.50:27017 as command to add the rule. 您可以使用诸如allow 134.168.18.50:27017类的命令作为添加规则的命令。

BTW: There is a demo using the Secure Gateway to connect to a MySQL running in a VM on Bluemix. 顺便说一句:有一个使用安全网关连接到在Bluemix上的VM中运行的MySQL的演示。 It shows how to install the SG and add a ACL rule. 它显示了如何安装SG和添加ACL规则。

Added: If you are looking into how to secure traffic to your Bluemix app, then just use https instead of http. 补充:如果您正在研究如何确保Bluemix应用程序的流量安全,请仅使用https而不是http。 It is turned on automatically. 它会自动打开。

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

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