eXo Chat Server Configuration

1 Openfire Configuration

eXo CS 1.3 chat services is a Jabber engine powered by Openfire. eXo will delegate the actual Jabber protocol communication to Openfire.

Warning: CS 1.3 has been tested only with Openfire 3.4.5. Should you try to upgrade yourself, this would be at your own risks

You have full latitude to configure Openfire. There are two possible ways do it :

Warning: CS 2.0 has been updated with Openfire 3.6.4. You need to notice more about configuration in openfire.xml file, refer here for more information

1.1 Configuring openfire.xml

The Openfire server has a single configuration file called openfire.xml and located under exo-openfire/conf directory. Configuration is based on properties expressed in an XML syntax. For example, to set property prop.name.is.blah=value, you would write this xml snippet :

<prop><name><is><blah>value</blah></is></name></prop>

Openfire has an extensive list of configuration properties. You can read a list of all properties on this page : http://www.igniterealtime.org/community/docs/DOC-1061

1.2 eXo specific configuration

eXo CS bundles comes with a pre-configured openfire server. It is bundled with some eXo plugins and configurations that allow connectivity to eXo. The key properties for integration are :

  • provider.auth.className : An implementation of the AuthProvider interface for authentication of users on the chat server
  • provider.users.className : An implementation of the UserProvider interface to which openfire will delegate users management
  • provider.groups.className : An implementation of the GroupProvider interfact to which openfire will delegate groups management
eXo provides implementations for these 3 interfaces with ExoAuthProvider, ExoUserProvider, ExoGroupProvider. These implementations use eXo hosted REST services and let you configure the endpoints within the openfire.xml file with additional properties :

PropertyDescriptiondefault value
provider.authorizedUser.nameusername to authenticate against the HTTP REST serviceroot
provider.authorizedUser.passwordpassword matching with provider.authorizeduser.namepassword
exoAuthProvider.authenticationURLURL to authenticate usershttp://127.0.0.1:8080/rest/organization/authenticate/
exoAuthProvider.authenticationMethodHTTP method used to pass parametersPOST
exoUserProvider.findUsersURLURL to find all usershttp://127.0.0.1:8080/rest/organization/xml/user/find-all/
exoUserProvider.findUsersMethodHTTP method for user/find-allGET
exoUserProvider.getUsersURLURL to retrieve a range of usershttp://127.0.0.1:8080/rest/organization/xml/user/view-range/
exoUserProvider.getUsersMethodHTTP method for user/view-rangeGET
exoUserProvider.usersCountURLURL to count usershttp://127.0.0.1:8080/rest/organization/xml/user/count/
exoUserProvider.usersCountMethodHTTP method for user/countGET
exoUserProvider.userInfoURLURL to get user infohttp://127.0.0.1:8080/rest/organization/xml/user/info/
exoUserProvider.userInfoMethodHTTP method for user/infoGET
exoGroupProvider.groupInfoURLURL to get group infohttp://127.0.0.1:8080/rest/organization/xml/group/info/
exoGroupProvider.groupInfoMethodHTTP method for infoGET
exoGroupProvider.getGroupsAllURLURL to view all groupshttp://127.0.0.1:8080/rest/organization/xml/group/view-all/
exoGroupProvider.getGroupsAllMethodHTTP method for group/view-allGET
exoGroupProvider.getGroupsRangeURLURL to view a group rangehttp://127.0.0.1:8080/rest/organization/xml/group/view-from-to/
exoGroupProvider.getGroupsRangeMethodHTTP method for group/view-from-toGET
exoGroupProvider.getGroupsForUserURLURL to get groups for a userhttp://127.0.0.1:8080/rest/organization/xml/group/groups-for-user/
exoGroupProvider.getGroupsForUserMethodHTTP method for groups-for-userGET
exoGroupProvider.groupsCountURLURL to count groupshttp://127.0.0.1:8080/rest/organization/xml/group/count
exoGroupProvider.groupsCountMethodHTTP method for group/countGET

As you can see, the default settings will work for a case where eXo is is deployed on the same host as openfire, on port 8080 and bound to 127.0.0.1 IP address. This is actually the case for the quick steps given in the Install Guide. However, you will need to change them to accommodate your own server deployment.

1.3 eXo addition configuration

<env>
      <serverBaseURL>http://localhost:8080/</serverBaseURL>
      <!--
          "restContextName" is used to specify Openfire server is dedicated for which portal. 
          If "eXo.env.restContextName" system property exists, it will override this value.
          "eXo.env.restContextName" system property can be set by specifying the -D option 
          to the java command when running Openfire. Example: If Openfire server is dedicated for "portal" portal 
          the command will have following format : java -DeXo.env.restContextName=rest -jar ../lib/startup.jar .
          If Openfire server is dedicated for "csdemo" portal, the command will have following format: 
          java -DeXo.env.restContextName=rest-csdemo -jar ../lib/startup.jar .
          By default, Openfire server is dedicated to "portal" portal.
       -->
      <restContextName>rest</restContextName>
</env>

2 eXo Service Configuration

2.1 You will need to tell eXo how to connect to the openfire instance.

This is achieved by configuration of the XMPPMessenger component found in exo.cs.eXoApplication.chat.service.

<component>
    <type>org.exoplatform.services.xmpp.connection.impl.XMPPMessenger</type>
    <init-params>
      <properties-param>
        <name>openfire-connection-conf</name>
        <property name="host" value="127.0.0.1" />
        <property name="port" value="5222" />
      </properties-param>
...

Beside openfire-connection-conf, other properties can be configured on the XMPPMessenger. Below is the full list :

properties-paramproperty namedescriptiondefault value
openfire-connection-conf
 hostIP address or hostname for the openfire server127.0.0.1
 portport to connect to on the openfire server. Should be the same that set in openfire configuration "Client to Server"5222
send-file
 timeouttimeout before aborting attempt to establish a file transferopenfire defaults

2.2 History Period Job

his is achieved by configuration of the JobSchedulerService component found in exo.cs.eXoApplication.chat.service.

<external-component-plugins>
    <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
    <component-plugin>
      <name>ChatRecordsJob</name>
      <set-method>addPeriodJob</set-method>
      <type>org.exoplatform.services.xmpp.connection.impl.HistoryPeriodJob</type>
      <description>add chat messages from Openfire Server to History</description>
      <init-params>
        <properties-param>
          <name>job.info</name>
          <description>save the monitor data  periodically</description>
          <property name="jobName" value="messageToHistoricalMessageJob"/>
          <property name="groupName" value="CollaborationSuite"/>
          <property name="job" value="org.exoplatform.services.xmpp.connection.impl.HistoryJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="3000"/>     
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>               
        </properties-param>
        <properties-param>
          <name>history.info</name>
          <description>save the monitor data  periodically</description>
          <property name="portalName" value="portal"/>
          <property name="logBatchSize" value="50"/>         
        </properties-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

3 System Configuration

Openfire makes use of several ports for communication.

Interface Port Type Description
All addresses 5222 Client to Server The standard port for clients is to connect to the server. Connections may or may not be encrypted. You can update the security settings for this port.
All addresses 9090 && 9091 Admin Console The port used for respectively the unsecured and secured Openfire Admin Console access.
All addresses 7777 File Transfer Proxy The port used for the proxy service that allows file transfers to occur between two entities on the XMPP network.
All addresses 3478 & 3479 STUN Service The port used for the service that ensures connectivity between entities when behind a NAT.

You can view above table in http://hostname:9090/index.jsp after you are logged in to openfire's web console and also customize those ports by yourself.

4 AS configuration

To unable propagation of identity across the chat webapp, it is required that you enable the SSO valve on omcat-based ASes

  • For jboss server, edit jboss/server/default/deploy/jboss-web.deployer/server.xml
  • For tomcat server edit tomcat/conf/server.xml
The valve should already be there, you just need to uncomment it if not already done..
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />

In clustered deployment, you may want to use ClusteredSingleSignOn instead.

<Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />

5 Application link in chatbar configuration

Since CS 2.1 whe have new feature is application link on chatbar
This will help user quick access to calendar, mail,contact anywhere when thay area see the application in chatbar, the link for now configuration in portlet.xml

<portlet-preferences>
    
            
			<preference>
				<name>showMailLink</name>
				<value>true</value> <!--true/false -->
				<read-only>false</read-only>
			</preference>

			<preference>
				<name>showCalendarLink</name>
				<value>true</value> <!--true/false -->
				<read-only>false</read-only>
			</preference>

			<preference>
				<name>showContactLink</name>
				<value>true</value> <!--true/false -->
				<read-only>false</read-only>
			</preference>
			
			<preference>
				<name>mailUrl</name>
				<value>portal/private/intranet/mail</value> <!--String page name-->
				<read-only>false</read-only>
			</preference>
			
			<preference>
				<name>calendarUrl</name>
				<value>portal/private/intranet/calendar</value> <!--String page name -->
				<read-only>false</read-only>
			</preference>
			
			<preference>
				<name>contactUrl</name>
				<value>portal/private/intranet/contact</value> <!--String page name-->
				<read-only>false</read-only>
			</preference>
			
			<preference>
				<name>info</name>
				<value>info</value> <!--this is only the key to get the resource bundle the full key : UIConfigForm.label.info -->
				<read-only>true</read-only>
			</preference>
	</portlet-preferences>

NameValueMeaning
showMailLinktruetrue or false value to let user can see the application icon or not
showCalendarLinktruetrue or false value to let user can see the application icon or not
showContactlLinktruetrue or false value to let user can see the application icon or not
mailUrlportal/private/intranet/contactpage url to application page it come when you configuration page.xml and navigation.xml in portal no need to combine with %domain name : port% chatbar will resolve it from server
calendarUrlportal/private/intranet/contactpage url to application page it come when you configuration page.xml and navigation.xml in portal no need to combine with %domain name : port% chatbar will resolve it from server
contactUrlportal/private/intranet/contactpage url to application page it come when you configuration page.xml and navigation.xml in portal no need to combine with %domain name : port% chatbar will resolve it from server

Tags:
Created by Patrice Lamarque on 08/26/2008
Last modified by pham tuan on 08/11/2010

Products

generated on Thu Sep 02 23:28:55 UTC 2010

eXo Optional Modules

eXo Core Foundations


Copyright (c) 2000-2010. All Rights Reserved - eXo platform SAS
2.4.30451