All-

server.xml should contain this JNDIRealm specification defined globally
    <Realm className="org.apache.catalina.realm.JNDIRealm"  
      
            <!-- The LDAP Address of your DC -->  
            connectionURL="ldap://dc1.domain.local:389";  
            <!-- Account information to access the Directory -->  
            connectionName="tom...@domain"  
            connectionPassword="AReallyLongPassword"  
      
            <!-- Where should Tomcat look for users -->  
           userBase="OU=users,OU=mydomain,DC=DOMAIN,DC=local"  
           userSearch="(sAMAccountName={0})"  
           userSubtree="true"  
           userRoleName="memberOf"  
     
           <!-- Where should tomcat look for groups -->  
           roleBase="OU=groups,OU=mydomain,DC=DOMAIN,DC=local"  
           roleSubtree="true"  
           roleName="cn"  
           roleSearch="(member={0})"  
           <!-- Debug Level -->  
           debug="99"  
       />  

web.xml would contain Basic authentication for tomcat-users as specified here
       <security-constraint>
               <web-resource-collection>
                   <web-resource-name>Entire Application</web-resource-name>
                   <url-pattern>/*</url-pattern>
               </web-resource-collection>
       
               <!-- The name of the AD security groups users must be a member 
of to login -->
               <auth-constraint>
                   <role-name>Tomcat Users</role-name>
               </auth-constraint>
               </security-constraint>
       
               <!-- Basic Authentication using a JNDIRealm -->
               <login-config>
                   <auth-method>BASIC</auth-method>
                   <realm-name>JNDIRealm</realm-name>
        </login-config>


Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: mgai...@hotmail.com
> To: users@tomcat.apache.org
> Subject: RE: How to define a Realm as a global resource and use it as a 
> ResourceLink?
> Date: Fri, 7 Aug 2009 16:57:35 -0400
> 
> 
> understood
> documentation at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 
> states
> 
> The Document Base (also known as the Context
>         Root) directory for this web application, or the pathname
>         to the web application archive file (if this web application is
>         being executed directly from the WAR file).    You may specify
>         an absolute pathname for this directory or WAR file, or a pathname
>         that is relative to the appBase directory of the
>         owning Host.
> 
> so my manager Context (which manager will access but other webapps will not 
> access)
>         <Context path="/manager" debug="9" privileged="true" 
>            docBase="%CATALINA_HOME%/shared/server/webapps/manager">
>         </Context>
> 
> if we want global access:
> option1)
> then it would be logical to assume that backing docBase to parent folder e.g. 
> webapps
> would allow ALL webapps ability to reach this folder ?
> 
> option2)
> the other option is for all webapps to access using the dreaded dot dot
> ..?
> 
> another option to access JNDIRealm information for all webapps?
> Martin
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> > From: chuck.caldar...@unisys.com
> > To: users@tomcat.apache.org
> > Date: Fri, 7 Aug 2009 15:20:21 -0500
> > Subject: RE: How to define a Realm as a global resource and use it as a 
> > ResourceLink?
> > 
> > > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > > Subject: RE: How to define a Realm as a global resource and use it as a
> > > ResourceLink?
> > > 
> > > unsure why docBase for <Context is set to webapps/admin instead 
> > > of webapps
> > 
> > The docBase attribute must *never* point to webapps; it's the <Host> 
> > appBase that points to webapps.
> > 
> >  - Chuck
> > 
> > 
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> > MATERIAL and is thus for use only by the intended recipient. If you 
> > received this in error, please contact the sender and delete the e-mail and 
> > its attachments from all computers.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> 
> _________________________________________________________________
> Express your personality in color! Preview and select themes for Hotmail®. 
> http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009

_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009

Reply via email to