ssl - 当客户端在 bluemix 中时,通过 HTTPS 调用安全的 RESTful Web 服务

标签 ssl ibm-cloud

我的应用程序在 BlueMix 中运行,它必须通过 SSL 对另一个应用程序进行静态调用。我想知道在哪里以及如何添加这些信息

> trustStoreType, trustStore and trustStorePassword

那么在 bluemix 中运行的应用程序可以使用它吗?当我从本地进行测试时,我修改了服务器类路径,我可以在运行客户端应用程序的 bluemix liberty 服务器中做一些类似的事情吗?还是有更简单更好的方法?

最佳答案

你应该能够在 eclipse 中编辑 server.xml 并设置类似的东西

<server description="new server">


    <!-- Enable features -->
    <featureManager>
        <feature>websocket-1.0</feature>    
        <feature>localConnector-1.0</feature>
      <feature>jndi-1.0</feature>
        <feature>jsp-2.2</feature>
        <feature>jdbc-4.0</feature>
        <feature>ejbLite-3.1</feature>
        <feature>ssl-1.0</feature>
        <feature>jaxb-2.2</feature>
    </featureManager>

    <ssl clientAuthenticationSupported="true" id="defaultSSLConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore"/>

  <keyStore id="defaultKeyStore"location="${server.config.dir}/resources/security/keystore.jks" password="passw0rd" type="JKS"/>
  <keyStore id="defaultTrustStore" location="${server.config.dir}/resources/security/trustStore.jks" password="passw0rd" type="JKS"/>

  <ssl clientAuthenticationSupported="true" id="defaultSSLConfig" keyStoreRef="serverKeyStore" trustStoreRef="serverTrustStore"/> 
  <keyStore id="serverKeyStore" location="${server.config.dir}/resources/security/serverKey.jks" password="passw0rd" type="JKS"/> 
  <keyStore id="serverTrustStore" location="${server.config.dir}/resources/security/serverTrust.jks"> password="passw0rd" type="JKS"/> 

  <!-- customize SSL configuration -->

  <ssl id="customizeSSLConfig" keyStoreRef="clientKeyStore" trustStoreRef="clientTrustStore"/> 

  <keyStore id="clientKeyStore" location="${server.config.dir}/resources/security/clientKey.jks" password="passw0rd" type="JKS"/> 
  <keyStore id="clientTrustStore" location="${server.config.dir}/resources/security/clientTrust.jks" password="passw0rd" type="JKS"/>

    <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
    <httpEndpoint httpPort="8080" httpsPort="9443" id="defaultHttpEndpoint"/>

    <applicationMonitor updateTrigger="mbean"/>
</server>

最简单的方法是使用用于 eclipse 的 Bluemix 插件和使用 Websphere Libery Profile Server

enter image description here

关于ssl - 当客户端在 bluemix 中时,通过 HTTPS 调用安全的 RESTful Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32173375/

相关文章:

node.js - 我可以将 session 缓存服务用于 Node.js 应用程序吗?

wordpress - 如何使用 Ubuntu 16.04 克服 Wordpress 中的错误 "Unable to connect to the filesystem"并尝试使用 FTPS SSL

java - 通过来自 Java 客户端的 SSL channel 与 IBM MQ 的 SSL 连接

docker - 如何指定 IBM Containers 的 IP 进行注册

authentication - BlueMix 注册错误

docker - 以非root用户身份对IBM Containers Volume的写许可权

ssl - gevent SSL with godaddy error : ssl. SSLError : [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl. c:1051)

c# - 如何在 UWP 应用程序中为 StreamSocket.UpgradeToSslAsync 设置超时?

spring-boot - 无法与启用了 kerberos 和 SASL 的 kafka 生产者建立连接

java - IBM Bluemix Liberty for Java 公共(public)可访问目录