This chapter presents the topics related to security configuration in eXo Platform:

eXo Platform relies on JAAS for propagating the user identity and roles to the different applications deployed on the server.

The JAAS realm is used by all eXo Platform applications and even propagated to the JCR for Access Control.

By default, eXo Platform uses the JAAS realm named "gatein-domain". If your IT operation rules require you to use another JAAS realm, you will need to modify several files so that eXo Platform can work on your JAAS realm.

Since the security configuration is highly dependent of the app server, each application sever is represented separately.

Tomcat

In the Tomcat bundle, the JAAS configuration is controled by the $PLATFORM_TOMCAT_HOME/conf/jaas.conf:

Replace gatein-domain with your own domain name.

For JBoss, you need to edit the default JAAS security domain in the portal.war!WEB-INF/jboss-web.xml file.


<jboss-web>
  <security-domain>java:/jaas/gatein-domain</security-domain>
</jboss-web>

Additionally, you need to edit the application-policy to match the security-domain in the gatein.ear!META-INF/gatein-jboss-beans.xml.


<deployment xmlns="urn:jboss:bean-deployer:2.0">
  <application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain">
    <authentication>
      <login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
        <module-option name="portalContainerName">portal</module-option>
        <module-option name="realmName">gatein-domain</module-option>
      </login-module>
      <login-module code="org.exoplatform.services.security.jaas.SharedStateLoginModule" flag="required">
        <module-option name="portalContainerName">portal</module-option>
        <module-option name="realmName">gatein-domain</module-option>
      </login-module>
      <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required">
        <module-option name="portalContainerName">portal</module-option>
        <module-option name="realmName">gatein-domain</module-option>
      </login-module>
    </authentication>
  </application-policy>
</deployment> 

Tip

To learn more about the JBoss security configuration, refer to JBoss Web Docs.

Common changes

Finally, you need to do some common changes on both app servers as follows:

configuration.properties

First, change the JAAS realm to match your own security constraints and then identify the entry named exo.security.domain inside the configuration.properties file.

portal.war

Inside portal.war, you should declare the Realm name in the web.xml file:

rest.war

You also need to modify rest.war to provide secured REST services properly.

See also

In eXo Platform, you could allow gadgets to load remote resources. However, this could be a potential security risk, as it will make the Gadget deployed as an open web proxy. So, you can set up the anonymous proxy to accept or deny certain hosts via configuring the ProxyFilterService.

Configure the ProxyFilterServie

By default, the proxy is closed to any host except the domain on which the gadget server is installed.

To modify the filtering of domain names, modify the portal.war/WEB-INF/conf/common/common-configuration.xml file.

The default configuration is set as below:

How does it work?

The proxy service will deny access to any domain that is in the blacklist. If the domain name does not match any of the blacklist, the proxy filter will verify if the domain name is on the white list. If the domain name is not defined in either the white list or black list, access will be denied. Multiple values can be added for each list and wildcards can also be used.

The following is an example of a valid configuration:

See also

By default, eXo Platform runs in the HTTP mode. However, for the security purposes, you can configure it to run in the HTTPS mode. This section explains how to configure HTTPS mode.

1. Generate your key.

If you do not have an X.509 certificate, you can make a simple certificate using the keytool command.

i. Change the variables in the following command to suit your circumstances, then run it a terminal:

Your key will be stored in server.keystore.

ii. Import your key into the Sun JDK keystore (this is required to help running gadget features) with the following command:

2. Set up the Jboss configuration to use your new key.

i. Comment the following lines in PLATFORM_JBOSS_HOME/server/<PROFILE>/deploy/jbossweb.sar/server.xml:

ii. Uncomment the following line:

Then, change the values of keystoreFile and keystorePass to values of your key.

3. Restart your server. You can now access the portal via https://<ServerAddress>:8443/portal.

See also

Copyright © 2009-2012. All rights reserved. eXo Platform SAS