Security Considerations:

HTTPS configuration for Liberty Server

To configure https in liberty server, user must create a SSL Certificate. Follow below steps to create SSL certificate and using it in the docker file.

  1. Open terminal at Liberty Server bin directory as administrator.

  2. Enter the below command to create SSL certificate:

    securityUtility createSSLCertificate --server=servername --password=anypassword --validity=365 

    Example:

    securityUtility createSSLCertificate --server=defaultServer --password=password --validity=365 
  3. Add keystore generated in the terminal after executing previous step:

    <keyStore id="defaultKeyStore" password="{xor}Lz4sLCgwLTs=" /> 
  4. Now, open server.xml, add below feature details to the existing features under

    <feature>transportSecurity-1.0</feature> 
  5. Copy the server.xml to the Docker file directory location.

  6. Refer to the below docker file command to copy the server.xml to the server location in the container.

    Example:

    COPY server.xml /liberty/wlp/usr/servers/defaultServer/ 
  7. Build and deploy the docker file as container.