Skip to main content link. Accesskey S
  • Translate Page ▼
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • Lotus Expeditor wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.2.1
  • 6.2.2
  • 6.2.3
  • access services
  • accounts
  • administer
  • application
  • applications
  • broker
  • client
  • client connectivity
  • cluster
  • collecting data
  • configuration
  • configure
  • data integrity check tools
  • database
  • db2
  • db2e
  • deleting log entries automatically
  • demo
  • demonstration
  • desktop overview
  • develop
  • device
  • device client
  • diagnosis of problems. See troubleshooting
  • diagnostic data
  • diagnostic tool
  • documentation
  • download
  • environment variables
  • error messages
  • expeditor
  • expeditor server
  • expeditor toolkit
  • files
  • fix pack
  • gettingstarted
  • Help
  • how-to
  • IBM Support
  • install
  • installation
  • integration
  • integrator
  • interaction services
  • Interrogation Windows Tab
  • introduce
  • introduction
  • knowledge bases
  • log files
  • lotus
  • micro
  • mqe
  • nci
  • OpenSpan
  • OpenSpan Scripting Container
  • OpenSpan Windows Container
  • overview
  • platform
  • portlet
  • prerequisites
  • presentation
  • problems with synchronization. See troubleshooting.
  • purging log entries automatically
  • Release Notes
  • replication
  • resources on the Web
  • rich client application
  • samples
  • scripts
  • security
  • server
  • servlet
  • software
  • software prerequisites
  • support
  • support troubleshooting
  • Sync Client
  • Sync Server
  • synchronization
  • synchronization problems
  • tool
  • toolkit
  • tools
  • trace files
  • trace level
  • troubleshoot
  • troubleshooting
  • ui
  • UNIX
  • use
  • user interface
  • user-exit interface for error handling
  • was
  • web services
  • What's New
  • xcm
  • xpdt
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Redbooks Wiki: Messaging from the Edge in an SOA environment using Lotus Expeditor 6.2 > 3.10 SSL scenarios and configuration
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

3.10 SSL scenarios and configuration 

expanded Abstract
collapsed Abstract
No abstract provided.
Table of Contents | Previous | Next

There are three primary scenarios for how to configure and use an SSL connection:

  • Server authentication - When a client connects to the micro broker, the client verifies the micro broker's identity. When using this mode, a client can be sure that is talking to a trusted server, but the server does not know the identity of the client. In this scenario, the micro broker will present a X509 certificate (kept in a keystore) to the client during the SSL handshake, and the client will verify the certificate according to its trusted material (kept in a truststore).
  • Mutual authentication - Similar to server authentication, but the micro broker also authenticates the client's identity, so that both parties know who they are communicating with. Both client and the micro broker will keep their certificates and trusted material in their respective keystores and truststores.
  • Using no authentication at all - This scenario is vulnerable to "man in the middle" attacks, as neither the client or the micro broker knows the identity of the other party. This mode is inherently less secure than the other methods, and is not recommended for production use.                  

It is important to note the the term "authentication" relates specifically to the authentication of the client and/or the micro broker to establish an encrypted network connection, that is, authentication on the wire. It should not be confused with the authentication at the messaging level, which is used to determine whether or not a particular client is who they claim to be and whether they are allowed to make use of  broker’s facilities, such as to publish or subscribe to topics.

The command line tool 'keytool' is a key and certificate management utility that can be used for the administration of key and trust stores.

SSL configuration in the micro broker


There are two entities that support SSL configuration in the micro broker:

  • Listener:  A TCP socket where the micro broker listens to incoming client connections.
  • Pipe:  In the bridge, it represents the owning entity of a connection between the micro broker and a remote end point (another micro broker, for instance).
    SSL can be configured for the micro broker in one of several ways.  The micro broker uses these configuration options in the following order:

    • Listener- or Pipe-specific settings - the specific listener or bridge pipe can be configured via SSLDefinition interface.
    • Broker-specific settings - broker-wide settings can be configured with an SSLDefinition.
    • LotusĀ® Expeditor settings - if an Expeditor platform key store is available, it will be used.
    • Use JVM settings - There are a number of standard Java™ system properties that can be used to configure key and trust stores.


Please refer to IBM Lotus Expeditor InfoCenter for further information about the list of SSL configuration settings in the micro broker.

For SSL to work a key store must be specified. DesktopEE supports a limited set of key store types.  It is important to note that DesktopEE and Java SE are incompatible regarding keystore formats:   keystore files that are created by the Java 2 SE 5.0 VM are not compatible with DesktopEE. Likewise, keystore files created with DesktopEE are not compatible with Java 2 SE 5.0. For this reason, IBM Lotus Expeditor will maintain one keystore file per VM. Because of this, when switching VMs, you must reset all the passwords that were stored in the keystore and the keystore password itself. None of the data stored in one VM's keystore file will be transferred to the other VM's keystore file. It is important to note that it is possible to have two completely different sets of stored credentials; one accessible only to DesktopEE and one accessible only to Java 2 SE 5.0.

Next we will show how to configure SSL listeners and bridge pipes in the micro broker using the API offered by SSLDefinition interface in a server authentication scenario. In that scenario, the micro broker will configure a keystore for the listeners, and bridge pipes will configure a truststore with trusted material of the remote server (for example, certificate of the remote micro broker).

Listeners


The micro broker can accept incoming encrypted connections using SSL protocol. Once the connection is established, all the data stream between the client application and the micro broker will flow securely (encrypted) over the network.

It is important to note that a SSL listener needs a keystore to start up. The following sample code creates a broker with a default SSL listener (if not specified, default SSL port is 8883):


import com.ibm.micro.admin.BrokerDefinition;
import com.ibm.micro.admin.BrokerFactory;
import com.ibm.micro.admin.LocalBroker;
import com.ibm.micro.admin.ServerSSLDefinition;

BrokerFactory factory = BrokerFactory.INSTANCE;
String brokerName = "FirstBroker";
String dataDirectory = ("path_to_broker_data_directory");


if (!factory.exists(brokerName)) {
BrokerDefinition brokerDef= factory.createBrokerDefinition(brokerName);
brokerDef.setDataDirectory( dataDirectory );
ServerSSLDefinition sslDef = brokerDef.createSSLDefinition();
sslDef.setKeyStore("path_to_keystore");
sslDef.setKeyStorePassword("123456".toCharArray());
brokerDef.setDefaultListenerSSLDefinition(sslDef);
brokerDef.setDefaultListenerSecure(true);
LocalBroker broker = factory.create(brokerDef);
broker.start();
} else {
LocalBroker broker = factory.getByName(brokerName);
broker.start();
}


If no keystore is configured explicitly in the API, the micro broker will use the keystore provided by the Lotus Expeditor platform:

 
if (!factory.exists(brokerName)) {
BrokerDefinition brokerDef= factory.createBrokerDefinition(brokerName);
brokerDef.setDataDirectory( dataDirectory );
brokerDef.setDefaultListenerSecure(true);
LocalBroker broker = factory.create(brokerDef);
broker.start();
} else {
LocalBroker broker = factory.getByName(brokerName);
broker.start();
}

It is also possible to define broker-wide SSL settings when a broker is created and they can be used any time a SSL listener or pipe is created afterwards. The following sample code creates a broker with a default non-secure listener and defines broker-wide SSL settings:


BrokerFactory factory = BrokerFactory.INSTANCE;
String brokerName = "FirstBroker";
String dataDirectory = ("path_to_broker_data_directory");


if (!factory.exists(brokerName)) {
BrokerDefinition brokerDef= factory.createBrokerDefinition(brokerName);
brokerDef.setDataDirectory( dataDirectory );
ServerSSLDefinition sslDef = brokerDef.createSSLDefinition();
sslDef.setKeyStore("path_to_keystore");
sslDef.setKeyStorePassword("123456".toCharArray());
sslDef.setTrustStore("path_to_truststore");
sslDef.setTrustStorePassword("123456".toCharArray());
LocalBroker broker = factory.create(brokerDef);
broker.start();
} else {
LocalBroker broker = factory.getByName(brokerName);
broker.start();
}


The micro broker will start up listening on the default non-secure port number 1883. Now a SSL listener could be added by either using specific SSL settings or broker-wide settings:

  1. Using listener-specific SSL settings
                      
    
    Communications comms = broker.getCommunications();
    MQTTTCPListenerDefinition listDef = comms.createMQTTTCPListenerDefinition(8884);
    ServerSSLDefinition sslDef = listDef.createSSLDefinition();
    sslDef.setKeyStore("path_to_listener_keystore");
    sslDef.setKeyStorePassword("123456".toCharArray());
    listDef.setSSLDefinition(sslDef);
    listDef.setSecure(true);
    MQTTTCPListener list = comms.addTCPListener(listDef);
    list.start();

  2. Broker-wide SSL settings    

    Communications comms = broker.getCommunications();
    MQTTTCPListenerDefinition listDef = comms.createMQTTTCPListenerDefinition(8884);
    listDef.setSecure(true);
    MQTTTCPListener list = comms.addTCPListener(listDef);
    list.start();


Bridge pipes: MQTT and WebSphere MQ connector


The code below shows how to create a SSL connector for a MQTT (either V3 or V5) bridge pipe and therefore connect securely to a remote end supporting MQTT protocol:

  1. Uusing pipe-specific SSL settings

    Obtain a handle to the broker's bridge
    Bridge bridge = broker.getBridge();
             
    Create a pipe definition -- this is the root of all bridge links
    PipeDefinition pipe = bridge.createPipeDefinition("samplePipe");
    Create the connector for the pipe
    MQTTConnectionDefinition connector = bridge.createMQTTConnectionDefinition("samplePipeConnector");
                     
    MQTT: Set the specifics of the endpoint
    connector.setHost("localhost");
    connector.setPort(8883);
    SSLDefinition sslDef = connector.createSSLDefinition();
    sslDef.setTrustStore("path_to_pipe_truststore");
    sslDef.setTrustStorePassword("123456".toCharArray());
    connector.setSSLDefinition(sslDef);
    connector.setSecure(true);

    Attach the connector to the pipe
    pipe.setConnection(connector);
    …

  2. Using broker-wide SSL settings

    Obtain a handle to the broker's bridge
    Bridge bridge = broker.getBridge();
             
    Create a pipe definition -- this is the root of all bridge links
    PipeDefinition pipe = bridge.createPipeDefinition("samplePipe");
    Create the connector for the pipe
    MQTTConnectionDefinition connector = bridge.createMQTTConnectionDefinition("samplePipeConnector");
                     
    MQTT: Set the specifics of the endpoint
    connector.setHost("localhost");
    connector.setPort(8883);
    connector.setSecure(true);

    Attach the connector to the pipe
    pipe.setConnection(connector);
    …


For a bridge connection to WebSphere MQ, let’s assume that  a secure channel has been set up in the remote MQ server. A cipher suite must be specified in the SSLDefinition attached to the bridge connector and must be equivalent to the CipherSpec configured in the MQ server. Micro broker’s MQ pipes set FIPS flag to false. Please refer to the IBM WebSphere MQ InfoCenter for further details about CipherSpec and FIPS support.

Obtain a handle to the broker's bridge
Bridge bridge = broker.getBridge();
         
Create a pipe definition -- this is the root of all bridge links
PipeDefinition pipe = bridge.createPipeDefinition("samplePipe");
Create the connector for the pipe
MQJMSConnectionDefinition connector = bridge.createMQJMSConnectionDefinition("samplePipeConnector");
                 
connector.setHost("MQ_server_address");
connector.setPort(1414);
connector.setChannel("SECURE.CHANNEL");
connector.setQueueManager("queue_manager_name");
                 
SSLDefinition sslDef = connector.createSSLDefinition();
sslDef.setTrustStore("path_to_MQ_pipe_truststore");
sslDef.setTrustStorePassword("123456".toCharArray());
sslDef.setEnabledCipherSuites(new String[] {"SSL_RSA_WITH_RC4_128_SHA"});
connector.setSSLDefinition(sslDef);
connector.setSecure(true);
                 
Attach the connector to the pipe
pipe.setConnection(connector);

The sample above makes use of the MQJMS bridge connection, and not the JNDI bridge connection, as the MQJMS connection can use the MQ client APIs directly to configure SSL.  It is feasible to use the JNDI bridge connection, although the MQ client's SSL settings need to be pre-configured in JNDI, as the micro broker will see the client as a generic JMS client.

SSL configuration in the client applications


SSL can be configured for clients in one of several ways, which the client will use in the following order:

  • Supplying an SSLSocketFactory - applications can supply their own SocketFactory with the appropriate SSL settings. Only supported by MQTT V5 client in Lotus Expeditor 6.2.
  • Properties object - applications can supply a Properties object containing the SSL settings.
  • LotusĀ® Expeditor settings - if an Expeditor platform key store is available, it will be used.
  • Use JVM settings - There are a number of standard Java™ system properties that can be used to configure key and trust stores.

If  sslClientProps is a Java Properties object containing the SSL settings for a particular application, the API for the different clients look like:

MQTTv3
:    properties.setSSLProperties(sslClientProps);   properties is a MqttProperties object

JMS client
:   ((JmsConnectionFactory) cf).setObjectProperty(MQTTConstants.MQTT_SSL_PROPERTIES, sslClientProps);

MQTTv5
:    options.setSSLProperties(sslClientProps);  
options is a MqttConnectOptions object

For instance, in a server authentication scenario, the content of the sslClientProps object could be:


com.ibm.ssl.trustStore=path_to_truststore
com.ibm.ssl.trustStorePassword=123456

And the truststore will contain the certificate of the micro broker, so that the identity of the micro broker can be verified by the client during the SSL handshake.

Table of Contents | Previous | Next


expanded Article information
collapsed Article information
Category:
Redbooks Wiki: Messaging from the Edge in an SOA environment using Lotus Expeditor 6.2
Tags:

This Version: Version 27 January 2, 2009 12:59:53 PM by Bart Jacob  IBMer
   
expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (27)
collapsed Versions (27)
expanded Version Comparison
collapsed Version Comparison
     
Version Date Changed by               Summary of changes
This version (27) Jan 2, 2009 12:59:53 PM Bart Jacob  
26 Dec 31, 2008 5:06:32 AM Enrique Gil Garcia  
25 Dec 24, 2008 2:08:31 PM Bart Jacob  
24 Dec 13, 2008 8:21:58 PM Bart Jacob  
23 Dec 13, 2008 8:20:03 PM Bart Jacob  
22 Dec 13, 2008 7:51:05 PM Bart Jacob  
21 Dec 13, 2008 2:52:12 PM Bart Jacob  
20 Dec 13, 2008 2:51:33 PM Bart Jacob  
19 Dec 13, 2008 2:50:10 PM Bart Jacob  
18 Dec 3, 2008 9:13:05 PM Bart Jacob  
17 Nov 28, 2008 1:21:21 PM Bart Jacob  
16 Nov 28, 2008 1:20:28 PM Bart Jacob  
15 Nov 25, 2008 9:38:36 AM Enrique Gil Garcia  
14 Nov 25, 2008 9:34:37 AM Enrique Gil Garcia  
13 Nov 25, 2008 7:52:09 AM Enrique Gil Garcia  
12 Nov 25, 2008 7:50:24 AM Enrique Gil Garcia  
11 Nov 25, 2008 7:37:40 AM Enrique Gil Garcia  
10 Nov 25, 2008 6:33:15 AM Enrique Gil Garcia  
9 Nov 25, 2008 6:26:52 AM Enrique Gil Garcia  
8 Nov 24, 2008 6:24:13 AM Gill Spencer  
7 Nov 21, 2008 3:44:08 PM Enrique Gil Garcia  
6 Nov 21, 2008 3:35:20 PM Enrique Gil Garcia  
5 Nov 21, 2008 2:56:06 PM Enrique Gil Garcia  
4 Nov 21, 2008 11:45:57 AM Enrique Gil Garcia  
3 Nov 19, 2008 10:00:30 PM Bart Jacob  
2 Nov 18, 2008 12:16:54 PM Enrique Gil Garcia  
1 Nov 18, 2008 12:08:00 PM Enrique Gil Garcia  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Tip: When linking to articles use the original title, not the edited title. The alias for the link can be the edited title.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • Lotus Technical Information and Education Team Blog
  • Lotus Tech Info on Twitter
  • Lotus Tech Info on Facebook
  • Lotus product forums
  • Lotus Tech Info blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use
Return to English
Arabic
Chinese Simplified
Chinese Traditional
French
German
Italian
Japanese
Korean
Portuguese
Russian
Spanish