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 :
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-param | property name | description | default value |
|---|
| openfire-connection-conf |
| | host | IP address or hostname for the openfire server | 127.0.0.1 |
| | port | port to connect to on the openfire server. Should be the same that set in openfire configuration "Client to Server" | 5222 |
| send-file |
| | timeout | timeout before aborting attempt to establish a file transfer | openfire 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>
| Name | Value | Meaning |
|---|
| showMailLink | true | true or false value to let user can see the application icon or not |
| showCalendarLink | true | true or false value to let user can see the application icon or not |
| showContactlLink | true | true or false value to let user can see the application icon or not |
| mailUrl | portal/private/intranet/contact | page 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 |
| calendarUrl | portal/private/intranet/contact | page 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 |
| contactUrl | portal/private/intranet/contact | page 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 |