Single-Sign-On (SSO)

When logging into the portal, you can gain access to many systems through portlets using a single identity. However, in many cases, the portal infrastructure must be integrated with other SSO-enabled systems. There are many different Identity Management solutions available. The GateIn documentation gives detailed configuration for different SSO implementation. For more details, see SSO - Single Sign On.

Central Authentication Service (CAS)

Central Authentication Service (CAS) is a Web Single-Sign-On (WebSSO), developed by JA-SIG as an open source project. CAS enables you to work on different applications to log in only once and to be recognized and authenticated by all applications. Details about CAS can be found here.

The CAS integration consists of two steps:

  • Installing or configuring the CAS server.

  • Setting up the portal to use the CAS server.

For more information on CAS configuration, see here.

Kerberos SSO on Active Directory

eXo Portal 3.5 supports the Kerberos authentication on a Microsoft Active Directory. You will need to configure both your Active Directory server and the application server.

The implementation makes possible to use SPNEGO or NTLM. The client will get two authentication headers, including Negotiate and NTLM and will use whichever supported by the browser. In Firefox, it is possible to manage authentication types, but it is not in Internet Explorer; therefore, SPNEGO will be used.

To learn more about how to configure Kerberos SSO, see here.

See also

Organization Service

To specify the initial Organization configuration, the content of your extension.war in /WEB-INF/conf/organization/organization-configuration.xml should be edited. This file uses the portal XML configuration schema. It lists several configuration plugins.

The plugin of org.exoplatform.services.organization.OrganizationDatabaseInitializer type is used to specify a list of membership types, groups and users to be created.

Memberships, Groups and Users

The predefined membership types are specified in the membershipType field of the OrganizationConfig plugin parameter.

The predefined groups are specified in the group field of the OrganizationConfig plugin parameter.

The predefined users are specified in the membershipType field of the OrganizationConfig plugin parameter.


<field name="user">
  <collection type="java.util.ArrayList">
    <value>
      <object type="org.exoplatform.services.organization.OrganizationConfig$User">
        <field name="userName">
          <string>root</string>
        </field>
        <field name="password">
          <string>exo</string>
        </field>
        <field name="firstName">
          <string>root</string>
        </field>
        <field name="lastName">
          <string>root</string>
        </field>
        <field name="email">
          <string>exoadmin@localhost</string>
        </field>
        <field name="groups">
          <string>member:/admin,member:/user,owner:/portal/admin</string>
        </field>
      </object>
    </value>
    <value>
      <object type="org.exoplatform.services.organization.OrganizationConfig$User">
        <field name="userName">
          <string>exo</string>
        </field>
        <field name="password">
          <string>exo</string>
        </field>
        <field name="firstName">
          <string>site</string>
        </field>
        <field name="lastName">
          <string>site</string>
        </field>
        <field name="email">
          <string>exo@localhost</string>
        </field>
        <field name="groups">
          <string>member:/user</string>
        </field>
      </object>
    </value>
    ...
  </collection>
</field>

Organization API

The exo.platform.services.organization package has five main components: user, user profile, group, membership type and membership. There is an additional component that serves as an entry point into Organization API - OrganizationService component which provides handling functionality for five components. For more details, see the Organization API section.

See also

  • Connection Settings

    Description of parameters used in the connection settings.

  • Organization Service Configuration

    Required information for configuring Organization Service that shows how the directory is structured and how to interact with it.

  • Active Directory sample configuration

    Introduction to an alternative configuration for active directory, and steps to use the LDAPs protocol with the Active Directory.

  • Picketlink IDM

    Information about the PicketLink IDM component which eXo Platform currently uses for keeping the necessary identity information, such as users, groups, memberships.

Note

If you have an existing LDAP server, the eXo predefined settings will likely not match your directory structure. eXo LDAP organization service implementation was written with flexibility in mind and can certainly be configured to meet your requirements.

The configuration is done in the ldap-configuration.xml file which contains numerous parameters.

See also

First, start by connection settings which will tell eXo how to connect to your directory server. These settings are very close to the JNDI API context parameters. This configuration is activated by the init-param ldap.config of service LDAPServiceImpl.


<component>
  <key>org.exoplatform.services.ldap.LDAPService</key>
  <type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
  <init-params>
    <object-param>
      <name>ldap.config</name>
      <description>Default ldap config</description>
      <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">
        <field name="providerURL">
          <string>ldap://127.0.0.1:389,10.0.0.1:389</string>
        </field>
        <field name="rootdn">
          <string>CN=Manager,DC=exoplatform,DC=org</string>
        </field>
        <field name="password">
          <string>secret</string>
        </field>
        <!-- field name="authenticationType"><string>simple</string></field -->
        <field name="version">
          <string>3</string>
        </field>
        <field name="referralMode">
          <string>follow</string>
        </field>
        <!-- field name="serverName"><string>active.directory</string></field -->
      </object>
    </object-param>
  </init-params>
</component>
  • providerURL: LDAP server URL (see PROVIDER URL). For multiple LDAP servers, use comma separated list of host:port (For example, ldap://127.0.0.1:389,10.0.0.1:389).

  • rootdn: distinguished name of user that will be used by the service to authenticate on the server (see SECURITY PRINCIPAL).

  • password: password for user rootdn (see SECURITY CREDENTIALS).

  • authenticationType: type of authentication to be used (see SECURITY AUTHENTICATION). Use one of none, simple, strong. Default is simple.

  • version: LDAP protocol version (see java.naming.ldap.version). Set to 3 if your server supports LDAP V3.

  • referralMode: one of follow, ignore, throw (see REFERRAL).

  • serverName: you will need to set this to active.directory to work with Active Directory servers. Any other value will be ignored and the service will act as on a standard LDAP.

Next, you need to configure the eXo OrganizationService to show how the directory is structured and how to interact with it. This is managed by a couple of init-params: ldap.userDN.key and ldap.attribute.mapping in the ldap-configuration.xml file (by default located at portal.war/WEB-INF/conf/organization)

ldap.attribute.mapping maps your LDAP to eXo. At first, there are two main parameters to configure in it:

Main parameters

Here are the main parameters to map eXo users to your directory:

For example:

However, if users exist deeply under userURL, eXo will be able to retrieve them.

Example:

Example: john and tom will be recognized as valid eXo users but EMEA and France entries will be ignored in the following subtree:

For example, adding the user Marry Simons could produce:

User mapping

The following parameters maps LDAP attributes to eXo User Java objects attributes.

In the example above, the user Marry Simons could produce:

eXo Platform groups can be mapped to organizational or applicative groups defined in your directory.

For example, adding the human-resources group could produce:

Membership types are the possible roles that can be assigned to users in groups.

For example, adding the membership type validator would produce:

Memberships are used to assign a role within a group. They are entries that are placed under the group entry of their scope group. Users in this role are defined as attributes of the membership entry.

The parameters to configure memberships are:

Example: james and root, who have admin role within the group human-resources, would give:

The cn attribute is used to designate the manager membership type. In other words, the name of role is given by the 'cn' attribute.

Here is an alternative configuration for active directory that you can find in activedirectory-configuration.xml.


[...]
<component>
  <key>org.exoplatform.services.ldap.LDAPService</key>
  [..]
  <object type="org.exoplatform.services.ldap.impl.LDAPConnectionConfig">         
  <!-- for multiple ldap servers, use comma separated list of host:port (Ex. ldap://127.0.0.1:389,10.0.0.1:389) -->
  <!-- whether or not to enable ssl, if ssl is used ensure that the javax.net.ssl.keyStore & java.net.ssl.keyStorePassword properties are set -->
  <!-- exo portal default installed javax.net.ssl.trustStore with file is java.home/lib/security/cacerts-->
  <!-- ldap service will check protocol, if protocol is ldaps, ssl is enable (Ex. for enable ssl: ldaps://10.0.0.3:636 ;for disable ssl: ldap://10.0.0.3:389 ) -->
  <!-- when enable ssl, ensure server name is *.directory and port (Ex. active.directory) -->            
    <field name="providerURL"><string>ldaps://10.0.0.3:636</string></field>
    <field name="rootdn"><string>CN=Administrator,CN=Users, DC=exoplatform,DC=org</string></field>
    <field name="password"><string>site</string></field>        
    <field name="version"><string>3</string></field>                
    <field name="referralMode"><string>ignore</string></field>                     
    <field name="serverName"><string>active.directory</string></field>                
  </object>
  [..]
</component>
<component>
  <key>org.exoplatform.services.organization.OrganizationService</key>
  [...]
  <object type="org.exoplatform.services.organization.ldap.LDAPAttributeMapping">                
    [...]
    <field name="userAuthenticationAttr"><string>mail</string></field>
    <field name="userUsernameAttr"><string>sAMAccountName</string></field>
    <field name="userPassword"><string>unicodePwd</string></field> 
    <field name="userLastNameAttr"><string>sn</string></field>
    <field name="userDisplayNameAttr"><string>displayName</string></field>
    <field name="userMailAttr"><string>mail</string></field>
    [..]
    <field name="membershipTypeLDAPClasses"><string>top,group</string></field>
    <field name="membershipTypeObjectClassFilter"><string>objectClass=group</string></field>
    [..]
    <field name="membershipLDAPClasses"><string>top,group</string></field>
    <field name="membershipObjectClassFilter"><string>objectClass=group</string></field>
  </object>
  [...]  
</component>

Here is how to use the LDAPs protocol with the Active Directory:

1. Set up AD to use SSL:

i. Add the Active Directory Certificate Services role.

ii. Install the right certificate for the DC machine.

2. Enable Java VM to use the certificate from AD:

i. Import the root CA used in AD, to keystore, such as: keytool importcert file 2008.cer keypass changeit keystore /home/user/java/jdk1.6/jre/lib/security/cacerts.

ii. Set the Java options as below:

JAVA_OPTS="${JAVA_OPTS} -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStore=/home/user/java/jdk1.6/jre/lib/security/ca"

eXo Platform uses the PicketLink IDM component to keep the necessary identity information, such as users, groups, memberships. While the legacy interfaces are still used (org.exoplatform.services.organization) for the identity management, there is a wrapper implementation that delegates to the PicketLink IDM framework. For further information, visit here.

The project exo.core defines the API for Organization Service and the eXo Platform implementation of API. For the Organization Service plugged in the eXo Platform product, you are flexible in switching between: eXo Organization Service, PicketLink and your own implementation. The configuration to switch between various Organization Service implementations can be found in portal.war/WEB-INF/conf/configuration.xml:


<!--PicketLink IDM integration -->
<import>war:/conf/organization/idm-configuration.xml</import>

<!--Former exo implementations -->
<!--<import>war:/conf/organization/exo/hibernate-configuration.xml</import> -->
<!-- <import>war:/conf/organization/exo/jdbc-configuration.xml</import> -->
<!--for organization service used active directory which is user lookup server -->
<!-- <import>war:/conf/organization/exoactivedirectory-configuration.xml</import> -->
<!--for organization service used ldap server which is user lookup server -->
<!-- <import>war:/conf/ldap-configuration.xml</import> -->

If you want to switch between different implementations, you just need to uncomment the corresponding <import> and leave others commented:


<!--PicketLink IDM integration -->
<import>war:/conf/ldap-configuration.xml</import>
<!-- <import>war:/conf/organization/idm-configuration.xml</import> -->
<!--Former exo implementations -->
<!--<import>war:/conf/organization/exo/hibernate-configuration.xml</import> -->
<!-- <import>war:/conf/organization/exo/jdbc-configuration.xml</import> -->
<!--for organization service used active directory which is user lookup server -->
<!-- <import>war:/conf/organization/exoactivedirectory-configuration.xml</import> -->
<!--for organization service used ldap server which is user lookup server -->
Copyright © 2009-2012. All rights reserved. eXo Platform SAS