将证书添加到信任库以启用 SSL 通信
Add certificate to truststore to enable SSL communication
当应用程序在 bluemix 中 运行 时,如何将证书添加到信任库。有没有办法以编程方式或使用 cli 更新 cacert?
任何文档或link将不胜感激。
您可以将打包的服务器推送到 Liberty buildpack。使用打包服务器,您可以打包证书并相应地配置 server.xml(参见 https://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_sec_keystores.html)。 server.xml 将成为打包服务器的一部分。
如果您需要更新证书,Bluemix Cloud Foundry 运行时中的标准方法是重新推送应用程序。
您可以尝试使用 spring-boot-ssl-truststore-gen 将证书添加到 buikdpack 中的系统信任库:
首先你需要在你的pom.xml(或替代)中使用这个:
<repositories>
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com </url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
和
<dependency>
<groupId>com.orange.clara.cloud.boot.ssl-truststore-gen</groupId>
<artifactId>spring-boot-ssl-truststore-gen</artifactId>
<version>2.0.21</version>
</dependency>
接下来在您的 manifest.yml 中声明证书:
env:
TRUSTED_CA_CERTIFICATE: |-
-----BEGIN CERTIFICATE-----
changeme
-----END CERTIFICATE-----
就是这样。当您 cf push
您的应用程序时,证书将被添加到信任库中。
当应用程序在 bluemix 中 运行 时,如何将证书添加到信任库。有没有办法以编程方式或使用 cli 更新 cacert?
任何文档或link将不胜感激。
您可以将打包的服务器推送到 Liberty buildpack。使用打包服务器,您可以打包证书并相应地配置 server.xml(参见 https://www-01.ibm.com/support/knowledgecenter/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_sec_keystores.html)。 server.xml 将成为打包服务器的一部分。
如果您需要更新证书,Bluemix Cloud Foundry 运行时中的标准方法是重新推送应用程序。
您可以尝试使用 spring-boot-ssl-truststore-gen 将证书添加到 buikdpack 中的系统信任库:
首先你需要在你的pom.xml(或替代)中使用这个:
<repositories>
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com </url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
和
<dependency>
<groupId>com.orange.clara.cloud.boot.ssl-truststore-gen</groupId>
<artifactId>spring-boot-ssl-truststore-gen</artifactId>
<version>2.0.21</version>
</dependency>
接下来在您的 manifest.yml 中声明证书:
env:
TRUSTED_CA_CERTIFICATE: |-
-----BEGIN CERTIFICATE-----
changeme
-----END CERTIFICATE-----
就是这样。当您 cf push
您的应用程序时,证书将被添加到信任库中。