Steps to configure Bluemix Liberty application to add a certificate to the Liberty trust store using a cf CLI workflow?

北城以北 提交于 2019-12-11 04:45:57

问题


I'm using the cf CLI to deploy a spring boot application to Bluemix. I'm getting an error 'RSA premaster secret error' as can be seen here: RSA premaster secret error when using webHDFS from BigInsights on cloud

I'm deploying my application like this:

# Create a Liberty application in Blumemix.  
# Set APPNAME (below) to the name of the application.
APPNAME=<<theappname>>
cf login -u cf_username -p cf_password
cf push    $APPNAME -p build/libs/myapp.jar

It seems that I need to add a certificate to the truststore - what are the additional steps for doing this? From what I can tell I need to repackage the liberty server to do this.

The above code snippet encapsulates my entire knowledge about liberty, please take that into account when providing an answer. For instance, I have seen some answers suggesting that I need to edit server.xml, but I don't have this file, so presumably I need to create it from scratch, or generate it some how?

I have seen similar questions, but the workflow I'm specifically asking about to add a certificate is when I'm using the cf CLI tools.


回答1:


There's no one thing to do to accomplish this task, it will require several steps:

1) Ensure Liberty & Spring app works locally. The data below will guide you through ensuring Liberty & Spring are setup correctly:

How to use Websphere liberty in spring boot application

http://www.adeveloperdiary.com/java/spring-boot/deploy-spring-boot-application-ibm-liberty-8-5/

2) Configure security for your app in Liberty:

https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/tsec_7add_signercert.html

3) Deploy a packaged server to Bluemix from the CF command line:

https://console.ng.bluemix.net/docs/runtimes/liberty/optionsForPushing.html



来源:https://stackoverflow.com/questions/38920473/steps-to-configure-bluemix-liberty-application-to-add-a-certificate-to-the-liber

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!