Configuring client certificates for server connections
Before you begin
zosConnect-2.0 Applies to zosConnect-2.0.
If SSL is enabled on the z/OS Connect Server, and a trusted client certificate is not sent in for authentication, an HTTP 403 Forbidden error is returned when connecting to the server.
To connect to the server from the API toolkit, generate a client certificate first and import it into the truststore on the server.
- Generate your client certificate. This certificate is sent to the server for authentication. Use a tool such as keytool to create a keystore and then export the client certificate from the keystore. The following example shows the keytool command to create a keystore called myclient.keystore.p12:
keytool -genkey -alias myclient.cert -dname "CN=API editor client Keystore, OU=IBM Systems z, O=IBM, C=US" -keyalg RSA -keypass mypassword -storepass mypassword -storetype PKCS12 -keystore <path_to>/myclient.keystore.p12Then, export the client certificate, myclient.cert.cer from the client keystore:keytool -export -alias myclient.cert -storepass mypassword -storetype PKCS12 -file <path_to>/myclient.cert.cer -keystore <path_to>/myclient.keystore.p12 - Transfer the client certificate to a location accessible to the z/OS Connect Server.
- On the z/OS Connect Server, import the client
certificate into the server truststore.
The following example shows the keytool command to import the client certificate into the server truststore.
keytool -import -v -trustclientcerts -alias apieditor.client -file myclient.cert.cer -keystore "<path_to>\server.truststore.p12" -keypass mypassword -storepass mypassword -storetype PKCS12 - Modify the server.xml file to ensure that the following information is
specified.
- If the z/OS Connect Server is configured to
require client certificate authentication and TLS client authentication to provide confidentiality
and integrity on the connection, then ensure that the
allowFailOverToBasicAuthattribute of thewebAppSecurityelement is set to false.For more information about configuring a z/OS Connect Server to use TLS, see API provider confidentiality and integrity for zosConnect-2.0. For more information about using client-certificate authentication, see API provider authentication and identification.
Note: When you create an IMS service in IMS Explorer, theallowFailOverToBasicAuthattribute must be set to true. - If the z/OS Connect Server is configured to
require client certificate authentication and TLS client authentication to provide confidentiality
and integrity on the connection, then ensure that the
Procedure
Configure the API toolkit with the client certificate.