Tomcat Authentication with LDAP


 All you have to do if You want to make Tomcat Authenticat 
 with LDAP for Your WebApplication is.

Follow the following three steps:

1. Copy the ldap.jar:

 copy the ldap jar into 
   /usr/java/tomcat5/common/lib or
   /usr/java/tomcat5/server/lib
 The difference between those two paths is that 
 The First one make the jar accessable to both the webApplication
 and the server.
 The Second one make the jar accessable to the server only.

 Note: 
  the above paths are relative to my tomcat path.

2. Create Realm:

 Add the following Realm to Your context.xml which are located under
 WebApplication/Web Pages/META-INF/context.xml

 <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
  connectionURL="ldap://opencraft.local"
  userPattern="uid={0},ou=People,dc=opencraft,dc=local"
  roleBase="ou=RolesCRX,dc=opencraft,dc=local"

  roleName="cn"
  roleSearch="(member={0})"
 />

3. Create Security Constarint and Login Config:

 Add the following to Your web.xml which are located under
 WebApplication/Web Pages/WEB-INF/web.xml

 <security-constraint>
    <web-resource-collection>
      <web-resource-name>Administration Area</web-resource-name>
      <url-pattern>*.jsf</url-pattern>

    </web-resource-collection>
    <auth-constraint>
      <role-name>OpenCraftUser</role-name>
    </auth-constraint>
  </security-constraint>

 <!-- here I tell it to use BASIC HTTP authentication -->
 <login-config>
   <auth-method>BASIC</auth-method>
 </login-config>
 <!-- and here we are just telling the system that there 
 is an administrator role. You can have 1..n 
 “security-role�s here.-->
  <security-role>
    <role-name>OpenCraftUser</role-name>
  </security-role>

 where OpenCraftUser is the role that your application users must have.
 For additional Information visit this link 
 http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html#Quick%20Start

ecimet

anhygoel Dogfen yn lle Delwedd mynd drwy Rwy'n hoffi yr eitem fodd bynnag y mae ychwanegol diddorol dylech creu ysgrifennwch i fyny am getaway Folks hoffi gyda hyn wefan . Tour Pulau Tidung

agilos

Ke rata ena lihlooho u na le a qapa le hoja ke ka tšepo ea o tla ba khona ho hlahisa posts by mabapi le le phomolong haholo-holo hobane ke thabela ho . Ka mohlala u ka khona ho hlahloba ka tokomane ke kamehla fana ba nnete ba tlotla Paket Pulau Tidung

ofulus

Je aime vraiment ce articles de contenu Vous avez Composé cependant Je l'espère vous êtes en mesure de générer articles concernant faire un voyage simplement parce Je aime je l'adore. A titre d'exemple vous pouvez comprendre mon propre document que je donné le particulier sujet tidung pulau

This codes are really

This codes are really complicated, you have to make them organized so that we can encode in too. - Marla Ahlgrimm

amazing gamis syari murah

amazing

gamis syari murah

www.everydayhijab.com

subject

Hello, this absurde! Hello, this absurde!

Hello

Excellent!!! !

Greetings

Great post !! !

Thank you both I hope it helps

Thank you both I hope it helps

Ali Abdel-Aziz.

Greetings

Great post !! !

Naga7

تعد شركتنا لرش المبيدات هى الافضل لديكم على الاطلاق فلا تطيلو البحث عن شبيه لنا , فالشركة لديها ما يميزها عن البقية فنحن هنا لنتميز وليس فقط لنتواجد!
شركة رش مبيدات بالرياض

Powered by Drupal - Design by artinet