Securing JAX-RS clients by using SSL
You can secure the communications between your Java™ API for RESTful Web Services (JAX-RS) application and clients that call the application by using Secure Sockets Layer (SSL) transport layer security.
Before you begin
- You defined a cell profile to an application server or to an application server that is federated to a network deployment manager. Read about creating cell profiles to learn how to create cell profiles that contain a federated application server node and a deployment manager.
- You installed your JAX-RS application onto the application server.
About this task
If you configured your JAX-RS application to use an SSL channel for transport level security when starting REST resources, your JAX-RS client is required to use the SSL connection to enable the client to interact with a JAX-RS resource that is deployed in the WebSphere® Application Server environment. For example, if your JAX-RS application is configured to use basic authentication, it is a common practice to use SSL so the user credentials are transported over secure connections.
To illustrate this scenario, assume that you have one application server in your cell, and that you deployed JAX-RS resources on this server. The JAX-RS resources on this server require the use of SSL. Suppose that you are using the Thin Client for JAX-RS, a Java-based stand-alone client that is supplied with this product, to call one of these secure resources that requires the use of SSL. The Thin Client for JAX-RS enables running unmanaged JAX-RS RESTful web services client applications in a non-WebSphere environment to call JAX-RS RESTful web services that are hosted by the application server.

Use the following steps to configure SSL with the Thin Client for JAX-RS.
Procedure
Results
You defined a secure connection between the client and the target server by using SSL to enable integrity and confidentiality of the communication between the JAX-RS application and your client.
Example
# keystore information
com.ibm.ssl.keyStoreName=ClientDefaultKeyStore
com.ibm.ssl.keyStore=c:/jaxrs/test/config/keystore.p12
com.ibm.ssl.keyStorePassword=testpasswd
com.ibm.ssl.keyStoreType=PKCS12
com.ibm.ssl.keyStoreProvider=IBMJCE
com.ibm.ssl.keyStoreFileBased=true
# truststore information
com.ibm.ssl.trustStoreName=ClientDefaultTrustStore
com.ibm.ssl.trustStore=c:/jaxrs/test/config/truststore.p12
com.ibm.ssl.trustStorePassword=testpasswd
com.ibm.ssl.trustStoreType=PKCS12
com.ibm.ssl.trustStoreProvider=IBMJCE
com.ibm.ssl.trustStoreFileBased=true
com.ibm.ssl.trustStoreReadOnly=false
# Host name verification information
com.ibm.ssl.performURLHostNameVerification=false
com.ibm.ssl.validationEnabled=false