Skip to content

Setting up Development Environment on Windows

rahatjaan edited this page Apr 12, 2015 · 16 revisions

Requirements

  1. IDE (Eclipse or Idea)
  2. JDK (JDK 1.6 plus, 7 is preffered)
  3. Opendj 2.6
  4. maven 3
  5. lombok plugin and jar file
  6. oxauth

Setting up Open DJ

Open DJ is the primary data source for oxTrust. It is very important to note that oxTrust strongly depends on oxauth for authentication and session management.

When you download open dj zip file. Just extract opendj.verion.zip to your local hard disk and then have a look at the content of the directory. Three folders are more important for us in opendj distribution

  1. /bat
  2. /db
  3. /config
  4. /setup.bat

double click on setup.bat file it will open setup wizard which walks you through setting up opendj. Three things are important while setting up.

  • baseDNs=o=gluu
  • bindDN=cn=directory manager
  • bindPassword=password

It is important to understand that oxTrust expect a specific schema present in open dj to run properly. Although there is a configuration to build required configuration in open dj if not found

createLdapConfigurationEntryIfNotExist=true

but it did not work for me so far.

So I would recommend to copy a pre-configured open DJ from any installation. I would propose that we should have one copy of preconfigured open dj zip file inside our git repository so that we can just mention in the wiki to download the opendj zip file, extract and run it. We would mention what configuration it carries. so no need to setup manually.

When you have a configured opendj instance then go to /bat folder and double click on control-panel.bat. This will open swing based interface for opendj content management. It is ldap browser and you can see all the entries in your opendj instance by clicking Manage Entries. You will see glu/appliance/appliance instance id.../configuration

I will upload preconfigured opendj zip file and will provide link here.

Setting up Maven

you can download maven zip file from http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz and configure your IDE e.g. Eclipse Luna with maven 3

Setting up Tomcat

You can use tomcat 7+ . I am using tomcat apache-tomcat-7.0.55.

For configuring you tomcat correctly you need to copy Gluu configuration files to tomcat_home/conf directory. Most important files are oxTrustLdap.properties and oxauth-ldap.properties files. I am writing the content of these two property files here. Please note you can download gluu encryptor from http://ox.gluu.org/lib/exe/fetch.php?media=oxauth:gluu-encryptor.zip and use

java -jar Gluu-Encryptor.jar anypassword

oxauth-ldap.properties

baseDNs=o=gluu
bindDN=cn=directory manager
#rahat
#bindPassword=kfvfGc2MiFQ=
#047QJv6PycHh
bindPassword=wKjKcvjQIHH8rzbp0NJS2g==
#servers=localhost:1636
servers=localhost:1389
#useSSL=true
useSSL=false
maxconnections=3
configurationEntryDN=ou=oxauth,ou=configuration,inum=@!4FA4.2257.A70F.C81E!0002!501D.EAD0,ou=appliances,o=gluu
createLdapConfigurationEntryIfNotExist=false
certsDir=C:\\Users\\T867439\\Desktop\\gluu-server\\gluu-server\\apache-tomcat-7.0.55\\conf\\certs

oxTrustLdap.properties

baseDNs=o=gluu
bindDN=cn=directory manager
#rahat
bindPassword=kfvfGc2MiFQ=
#servers=localhost:1636
servers=localhost:1389
useSSL=false
#useSSL: true
maxconnections=3
baseConfigurationDN=ou=oxtrust,ou=configuration,inum=@!4FA4.2257.A70F.C81E!0002!501D.EAD0,ou=appliances,o=gluu
createLdapConfigurationEntryIfNotExist=false
#createLdapConfigurationEntryIfNotExist=false

You oxTrust depends on oxauth so you need to deploy oxauth war file along with your oxtrust war file. You can configure your local tomcat to run on http only but in order to do so you have to change the configurations accordingly. You can find these configuration files here https://github.com/GluuFederation/oxTrust/tree/master/configuration

Once your tomcat is configured in your eclipse environment then you can start opendj instance and then start your tomcat server. If you don't see any LdapConnection exception on startup it means you are almost DONE with it. Now try to access your web application through browser htt://localhost:8080/identity and it will take you to oxauth login page for authentication. Provide user name as admin and password as your directory admin and if the login is successful you will see gluu home page with top menu displayed. Now you are all set.

cont...