简体   繁体   English

如何从Bluemix通过SSL调用外部REST服务

[英]How to call external REST service over SSL from Bluemix

We have developed a web application using angularjs and html5 and Node.js. 我们已经使用angularjs和html5和Node.js开发了一个Web应用程序。 This web application is hosted on Bluemix using the Node.js runtime. 该Web应用程序使用Node.js运行时托管在Bluemix上。 This web application calls an external RESTfull service (we are invoking the REST service using angularjs) which was developed by a third party. 该Web应用程序调用由第三方开发的外部RESTfull服务(我们正在使用angularjs调用REST服务)。 This REST API requires an HTTPS connection to call the service. 此REST API需要HTTPS连接才能调用该服务。 The SSL certificate and certificate password are provided by the API development team. API开发团队提供了SSL证书和证书密码。 Our problem is how to configure the SSL certificate on Bluemix to call the external REST service over SSL from the web application. 我们的问题是如何在Bluemix上配置SSL证书,以从Web应用程序通过SSL调用外部REST服务。 Can anyone please help us? 谁能帮我们吗? Thanks in advance for your help. 在此先感谢您的帮助。

To do this properly I would advice to create an API Management Service, where you add your external service as an API together with the SSL settings. 为了正确执行此操作,我建议您创建一个API管理服务,在其中您将外部服务与SSL设置一起添加为API。 You then call this API (proxy) without SSL from your node.js bluemix app. 然后,您可以从node.js bluemix应用程序调用没有SSL的此API(代理)。

The proxy will care for SSL, forward the request to the actual service implementation, and provide you also with debugging and analytics capabilities. 代理将负责SSL,将请求转发到实际的服务实现,并为您提供调试和分析功能。 With having API Management in place, you also benefit from a central place that manages your SSL certificates. 通过使用API​​管理,您还可以从管理SSL证书的中央位置中受益。

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

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