Changing Keystore/Truststore using a CLI procedure

This procedure describes steps to follow to configure IBM® Connect:Direct® Web Service to use a different Keystore using a command line procedure.
Note: This procedure overrides the Web Services' default Keystore/Truststore settings.
  1. Navigate to following directory:
     $CDWS_installation_directory/mftws/BOOT-INF/classes
  2. Run the CDWS_installation_directory/jre/bin/java -jar ChangeKeystoreTruststoreAndUpdatePassword.jar and enter the following details:
    
    Enter Admin Password:
    Please Select from below options:
    1. Type K and Enter to Change Keystore OR Sync Keystore Password with CDWS.
    2. Type T and Enter to Change Truststore OR Sync Truststore Password with CDWS.
    3. Type C and Enter to Sync Key Certificate Password with CDWS.
    4. Type Q and Enter to Exit.
    Enter your Choice: K
    Enter the complete path of Keystore: (including fileName(.jks)):
    Enter Keystore Password:
    Confirm Password:
    Keystore details updated successfully
    Press Y to Continue OR Q to Exit:Q
    Exiting the Utility.
    
    To check version of utility run java -jar utilityname.jar -version command. For example,
    CDWS_installation_directory/jre/bin/java -jar
    ChangeKeystoreTruststoreAndUpdatePassword.jar -version
    Note:
    • Ensure that you have CDWS admin password ready and the database service is up before running the ChangeKeystoreTruststoreAndUpdatePassword.jar utility.
    • If changed keystore contains key certificate with different password, you must sync the new password with CDWS using this utility.
  3. To update the application.properties file navigate to following directory:
    % cd $Installation_directory/mftws/BOOT-INF/classes
  4. Edit application.properties file and replace the value server.ssl.key-alias with <Label of Certificate> to be used by Connect:Direct Web Services.
  5. Issue the following commands for changes to take effect.
    • In Windows environment, stop and start MFTWebservices from the Task manager for changes to take effect.
    • In UNIX environment, issue the following command to stop and start MFTWebServices.
    % ./$CDWS_INSTALLATION_DIR$/bin/stopWebservice.sh
    % ./$CDWS_INSTALLATION_DIR$/bin/startWebservice.sh