Forum Discussion

deldrum's avatar
deldrum
New Contributor
2 years ago
Solved

SSL for mock service

Hi,

Posting this as I was struggling for a while - however I resolved the issue, and posting in case it helps someone else.

I was trying to set up a mock SOAP service with SSL (legacy code) following the guide Securing MockServices with SSL | SOAP Mocking (soapui.org)

 

When I start the mock service I get the error "java.io.IOException: Keystore was tampered with, or password was incorrect"

or When starting the service I get "org.mortbay.util.MultiException[java.net.BindException: Address already in use: bind, java.net.BindException: Address already in use: bind]"

 

The Answer for me was

1. Use keytool from the SoapUI installation at Program Files\SmartBear\SoapUI-5.6.0\jre\bin

2. Use a simple mock keystore password (no non-ASCII characters)

3. Stick with port 8088 for the mock service

4. Call the mock service with https on port 8443

 

The SSL layer appears to be a man-in-the middle component running on the SSL port, so the request needs to come in on the SSL port e.g. 8443.

This also means that the SSL port is now taken (hence the already in use bind error when trying to use it for the mock service)

 

However the mock service itself continues to run on the standard port e.g. 8088

 

It makes sense, but I found it confusing.

 

  • I found the answer myself before posting and so I have also included it with the question.

    The Answer for me was

    1. Use keytool from the SoapUI installation at Program Files\SmartBear\SoapUI-5.6.0\jre\bin

    2. Use a simple mock keystore password (no non-ASCII characters)

    3. Stick with port 8088 for the mock service

    4. Call the mock service with https on port 8443

     

    The SSL layer appears to be a man-in-the middle component running on the SSL port, so the request needs to come in on the SSL port e.g. 8443.

    This also means that the SSL port is now taken (hence the already in use bind error when trying to use it for the mock service)

     

     

    However the mock service itself continues to run on the standard port e.g. 8088

     

     

1 Reply

  • deldrum's avatar
    deldrum
    New Contributor

    I found the answer myself before posting and so I have also included it with the question.

    The Answer for me was

    1. Use keytool from the SoapUI installation at Program Files\SmartBear\SoapUI-5.6.0\jre\bin

    2. Use a simple mock keystore password (no non-ASCII characters)

    3. Stick with port 8088 for the mock service

    4. Call the mock service with https on port 8443

     

    The SSL layer appears to be a man-in-the middle component running on the SSL port, so the request needs to come in on the SSL port e.g. 8443.

    This also means that the SSL port is now taken (hence the already in use bind error when trying to use it for the mock service)

     

     

    However the mock service itself continues to run on the standard port e.g. 8088