Search code examples
sslibm-mobilefirst

Worklight 6.2 SSL configuration


I'm trying to configure SSL on my local development machine so my adapters will be able to connect to the Bank-end service.

Our Back-end service team provided us with the following information:

  1. ssl.keystore.path=conf/mobile.p12
  2. ssl.keystore.type=PKCS12
  3. ssl.keystore.password=PASSA
  4. SSL ALias = AlIAS
  5. SSL Password = PASSA

They send to use the "mobile.p12" file.

I added those configuration to my worklight.propeties:

#    Worklight SSL keystore 
#######################################################################################################################
ssl.keystore.path=conf/mobile.p12
#SSL certificate keystore type (jks or PKCS12)
ssl.keystore.type=PKCS12
#SSL certificate keystore password.
ssl.keystore.password= PASSA

In my Adapter.xml I added the following:

<sslCertificateAlias> AlIAS </sslCertificateAlias>
<sslCertificatePassword> PASSA </sslCertificatePassword>

When I deploy the project on my local Machine and try to login in the app through one of our adapters, I'm getting this error:

[ERROR   ] FWLSE0152E: Unable to find certificate chain with alias: 'AlIAS' [project MobileBanking]

I tried to import the certificate to the default.keystore inside server > config by:

keytool -importkeystore -srckeystore mobile.p12 -destkeystore default.keystore -srcstoretype PKCS12

the result is :

Import command completed:  0 entries successfully imported, 0 entries failed or cancelled

which indicated it didn't work since 0 entries.

after running the keytool command, the error changed when I click login in our application to be :

Http request failed: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

which indicated that my configuration is wrong.

What am I missing?

thanks.


Solution

  • Based on the type of your certificate (un-signed, self-signed, CA-issued), make sure you are following the instructions from: Configuring Worklight Server

    Specifically: