Академический Документы
Профессиональный Документы
Культура Документы
Integration of JBoss Portal with OpenDS LDAP Server Step by Step HowTo
By Kefa Rabah, krabah@globalopenversity.org April 9, 2009
Part 1:
The goal of this article is to provide step by step instructions on how to integrate and
configure JBoss Portal with LDAP support. The OpenDS LDAP server is used as a user store.
You will learn the basic configuration that needs to be done to leverage a directory server in
your portal deployment. Before we start you will need to get the following packages:
$ svn co http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_6_0/
jboss-portal-2.6
You need to download the .zip version and simply unpack it somewhere on your disk.
Before you proceed, the 'JBOSS_HOME' environment variable should be set to point to
directory containing unpacked archive. Under Linux you can use:
$ export JBOSS_HOME=/usr/JBoss/jboss-4.2.3.GA
For complete JBoss setup HowTo, check out our blog URL www.serengetisys.com/blog
or else within scrbd.com by the same author.
$ cd $JBOSS_HOME/bin
[bin]$ ./run.sh
Part 2: Preparing the LDAP directory. And Provision LDAP with sample data.
1. OpenDS Setup
1. In this tutorial we'll use OpenDS directory server. Download the QuickSetup.jnlp
version to your temp directory.
2. Locate the package and double-click it to start the installation process and follow the
installation Wizard the instruction.
3. I use port 10389, use "password" as password, Directory Base DNS:
"dc=example,dc=com";
4. Do not pre-populate with random use. Instead "Import Data from LDIF file"
option. You will find ldif containing sample LDAP tree in portal sources (jboss-
portal-2.6/identity/src/resources/example/portal-sample-local.ldif), see
figure below.
1
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
5. The final setup page should look like the figure shown below:
6. Click "Launch Control-Panel" to startup your OpenDS server listening on port 10389,
or via cmd type:
/usr/OpenDS/bin/control-panel
from the OpenDS Control Pane > Server Status click Start to start the OpendDS
server, and enter your credentials to logon.
2. Install LDAPBROWSER
1. At the moment you should have an instance of the OpenDS LDAP server listening on
port 10389.
2. To be able to use it with portal we need to provision it with sample data. To do this
we'll use simple LDAP tool with GUI written in Java – the LDAP Browser/Editor. It's
a very lightweight tool that runs on many environments. Follow installation notes
specified here: http://www.openchannelsoftware.com/projects/LDAP_Browser_Editor
3. You will simply need to download the archive, unpack it and run the lbe.sh or
lbe.bat script (assuming that you have the java command in your operating system
path).
2
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
4. My standard setup puts the unarchived app code into a directory called
/usr/ldapbrowser, which I normally create by simply copying Browser282b2.tar.gz
to /usr and doing a tar xvzf on it right there
5. Next cd to the installed directory, and run the ./lbe.sh on Linux or double-click
lbe.bat on windows script to start the ldapbrowser
6. If you are using Fedora Linux you can also find 'lbe' rpm package in Dries repository.
7. Run LDAP Browser/Editor, and choose menu File > Connect
3
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
$ cd $JBOSS_HOME/bin
[bin]$ ./shutdown.sh -S
[jboss-portal-2.6] $ ./build/build.sh
This may take a while as all necessary libraries have to be downloaded from a library
repository. During this tutorial we'll assume that you’re using Linux. But you will also
find proper '.bat' scripts for Windows operating system as well.
this will copy necessary files into the JBoss AS pointed by 'JBOSS_HOME'
environment variable.
4
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
JBoss is preconfigured to work with a locally deployed OpenDS. To enable LDAP support only
tiny modification is needed:
'conf/identity/identity-config.xml'
to
'conf/identity/ldap_identity-config.xml'
$ cd $JBOSS_HOME/bin
[bin] $ ./run.sh
5. Basic Testing.
1. At the moment JBoss Portal should store identity related data in LDAP store. Let's
check it out.
5
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
3. Login as user 'jduke' with password 'theduke'. This is the user account we added
into LDAP in previous steps.
4. On the bottom left hand side of the page, click on the 'Edit your profile' link.
6
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
5. In the 'Real e-mail' field enter 'testemail@email.com' and click 'Save changes'
button at the bottom.
6. Refresh the view in LDAP Browser and check that new email address was updated
in proper user entry
7. Logout from portal and login back as user 'admin' with password 'admin'.
8. Click on the 'Admin' link in the top right corner and go into 'Members' tab.
9. Click on the 'Create User Account' link.
7
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
10. Fill in the form with sample data and click 'New user registration'
11. Verify in LDAP Browser that new user entry was added to the directory
12. Try to login with username and password you specified for the new account, logout.
13. Log back with admin account and again click the 'Members' tab – from here you can
also list and manage all the users that are present in LDAP, e.g., from user role click
members link.
8
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada
14. It’s also possible to assign specific roles to them. For example, we can assign user
krabah an Admin role. Try it out!
Summary
Once you have your integrated JBoss Portal and OpenDS LDAP running – you can extend it
to implement Single-Sign-On (SSO) and other network access and related users provisioning
solutions. And also integrate it with CRM like SugarCRM the most powerful open source CRM
systems.
-----------------------
Kefa Rabah is the Founder and CIO, of Serengeti Systems Group Inc. Kefa is knowledgeable in
several fields of Science & Technology, IT Security Compliance and Project Management, and
Renewable Energy Systems. He is also the founder of Global Open Versity, a Center of Excellence
in online eLearning.
9
© September 2008, Kefa Rabah, Ph.D. Global Open Versity, Vancouver Canada