Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 4 Apache Module for TIBCO API Exchange Gateway : Configuring SSL Communications

Configuring SSL Communications
This section explains the configuration setup required for SSL communications between the client requestor and Apache HTTP server.
Before you can set up the configuration for SSL, you should install the Apache server with SSL enabled. See Configuring Mutual SSL Authentication.
Configuring One-Way SSL Authentication
To enable one-way SSL authentication, follow these steps:
1.
Ensure that mod_ssl module is available in the Apache HTTP server installation.
2.
Enable the mod_ssl module as follows:
a.
Open the APACHE_HOME/conf/httpd.conf file for editing.
b.
Uncomment the following directive in the httpd.conf file, if commented. If this directive does not exist, add it in the file:
   LoadModule ssl_module APACHE_ROOT/modules/mod_ssl.so
where APACHE_ROOT is the actual path of the Apache HTTP server installation which must be SSL enabled.
c.
#Include conf/extra/httpd-ssl.conf
d.
3.
Open the APACHE_HOME/conf/extra/httpd-ssl.conf file for editing.
a.
SSLEngine on
SSLCertificateFile "Name_of_Server_public_certificate"
SSLCertificateKeyFile "Name_of_Server_private_key"
SSLCACertificateFile Name_of_CA_Certificate
SSLVerifyClient none
b.
Set the Listen directive if you want to change the default port value for SSL requests:
   Listen listening_port_value
c.
Save the changes made to the APACHE_HOME/conf/extra/httpd-ssl.conf file.
4.
Import the CA certificate as specified in the SSLCACertificateFile directive of the Apache Server configuration.
5.
a.
b.
      http://machine_name:listening_port_value
For example,
http://<machine-name>:8443
6.
Configuring Mutual SSL Authentication
To enable authentication and X.509-based authorization, you must configure both the Apache HTTP server and the Module for the Apache HTTP Server in TIBCO API Exchange Gateway.
Before you start configuring mutual authentication and authorization, see Prerequisites for Mutual SSL Setup.
Prerequisites for Mutual SSL Setup
Apache HTTP server with mod_ssl module. Refer to the TIBCO API Exchange Gateway readme for the Apache server version information. Verify that you have set it up as specified in Installing Apache HTTP Server.
Configuring Mutual SSL on Apache HTTP Server
To use the mod_ssl module with Apache HTTP server, you must ensure the following:
OpenSSL is installed on the Apache server's host computer.
To configure mutual SSL on the Apache HTTP server:
1.
Ensure that the mod_ssl module is available and enabled on the Apache HTTP server installation. To enable the mod_ssl module, follow theser steps:
a.
Open the APACHE_HOME/conf/httpd.conf file for editing.
b.
Uncomment the following directive in the httpd.conf file, if commented. If this directive does not exist, add it in the file:
   LoadModule ssl_module APACHE_ROOT/modules/mod_ssl.so
where APACHE_ROOT is the actual path of the Apache HTTP server installation which must be SSL enabled.
c.
#Include conf/extra/httpd-ssl.conf
d.
2.
Open the APACHE_HOME/conf/extra/httpd-ssl.conf file for editing.
a.
SSLEngine on
SSLCertificateFile "Name_of_Server_public_certificate"
SSLCertificateKeyFile "Name_of_Server_private_key"
SSLCACertificateFile Name_of_CA_Certificate
SSLVerifyClient require
SSLVerifyDepth 1
For example, the following are the example values:
SSLCertificateFile "C:\apache2\conf\server.crt"
SSLCertificateKeyFile "C:\apache2\conf\server.key"
SSLCACertificateFile "C:\apache2\certs\myrootca.crt"
The value of SSLVerifyDepth is set to 1 as you are doing only one level of authentication. You have configured only one CA which is the root CA.
b.
Set the Listen directive if you want to change the default port value for the SSL requests:
Listen listening_port_value
You can access the machine using the http://<machine-name>:443/../..when the default port as 443 is used.
If the port is changed to 8443, the access link is: http://<machine-name>:8443/..
Ensure that the firewall is open to listening_port_value specified in the Listen directive.
c.
      LoadModule ssl_module C:/apache2/modules/mod_ssl.so
      SSLRandomSeed startup builtin
      SSLRandomSeed connect builtin
 
      AddType application/x-x509-ca-cert .crt
      AddType application/x-pkcs7-crl .crl
      SSLPassPhraseDialog builtin
      SSLSessionCache "shmcb:c:/apache2/logs/ssl_scache(512000)"
      SSLSessionCacheTimeout 300
 
      SSLMutex default
d.
      SSLEngine on
      SSLProtocol all -SSLv2
 
      SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
      SSLCertificateFile "Name_of_Server_public_certificate"
      SSLCertificateKeyFile "Name_of_Server_private_key"
3.
Save the changes made to the APACHE_HOME/conf/extra/httpd-ssl.conf file.
4.
Import the CA certificate as specified in the SSLCACertificateFile directive of the Apache Server configuration.
5.
a.
b.
      http://machine_name:listening_port_value
For example,
http://<machine-name>:8443
c.
Configuring Client Authentication with Digital Certificates on Apache HTTP Server
Configure the client authentication with digital certificates on the Apache HTTP server as follows:
1.
Open the APACHE_HOME/conf/extra/httpd-ssl.conf file in a text editor.
2.
Table 17: SSL Directives
For example, /etc/apache2/ssl.crt
For example, /etc/apache2/ssl.crt/cacert-bundle.pem
1
3.
4.
5.
6.
Using Firefox
a.
b.
Navigate to Tools > Options on the browser menu.
c.
Select Advanced tab in the new window.
d.
Select Security tab in the new dialog.
e.
Click the View Certificates button.
f.
Click Import and follow the wizard to import the file.
Using Internet Explorer
g.
h.
Navigate to Tools > Internet Options on the browser menu.
i.
Select Content tab in the new dialog window.
j.
Go to Certificates section and click Certificates tab.
k.
Click Import and follow the wizard to import the file.
7.
8.
   http://machine_name:listening_port_value
For example,
http://<machine-name>:8443
9.
Forwarding Client Certificate Identification Details on Apache HTTP Server to Core Engine
To configure the setup so that the Apache HTTP server forwards the client identification details to the Core Engine,
1.
Open the ASG_HOME/modules/http_server/apache/mod_ASG.conf file in a text editor.
2.
   LoadModule headers_module APACHE_HOME/modules/mod_headers.so
   SSLOptions +StdEnvVars
3.
Set RequestHeader directives as follows:
   RequestHeader add X-SSL_PROTOCOL "%{SSL_PROTOCOL}s"
   RequestHeader add CAissuer "%{SSL_CLIENT_I_DN}e"
   RequestHeader add SerialNumber "%{SSL_CLIENT_S_DN}e"
4.
5.
6.
7.
8.
   http://machine_name:listening_port_value/ping
If you have configured everything on the Apache HTTP server but have not registered the partner in the TIBCO API Exchange Gateway yet, you should receive the response from TIBCO API Exchange Gateway on the web browser as follows:
   <asg:Error> <asg:ErrorCode> 2001 </asg:ErrorCode>
   <asg:ErrorMessage> Partner null not identified    </asg:ErrorMessage> </asg:Error>
Registering Partners On Config UI
Register the partner with the identity information as follows:
1.
2.
3.
Click the PARTNER tab.
4.
5.
Specifies the client’s identity that the Apache HTTP server forwards in the SerialNumber HTTP header of requests that are submitted by this partner. This can either be the certificate’s serial number or the subject distinguished name as used for the digital certificate.
Partner Serial Number: /C=US/ST=California/L=Palo Alto/O=Cloud Software Group, Inc./OU=ActiveMatrix Service Gateway/CN=ASG Demo Client01/emailAddress=asgclient01@tibasg.co.pd
Partner Issuer CA: /C=US/ST=California/O=Cloud Software Group, Inc./OU=ActiveMatrix Service Gateway/CN=TIBCO ASG Certificate Authority/emailAddress=admin@tibasg.co.pd
 
Partner Serial Number and Partner Issuer CA fields contain distinguished names as defined by the X.509 standard. The X.509 standard defines the fields, field names, and abbreviations used to refer to the fields.
6.
Click the Partner Operations tab.
7.
Define a ping operation (internal_ping) for new partner. See Facade Access for details.
8.
9.
10.
a.
b.
      http://machine_name:listening_port_value/ping
c.
Verify that you receive ASG is alive response from TIBCO API Exchange Gateway on the web browser.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved