DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10120>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10120

Custom realm and shared instalation.

           Summary: Custom realm and shared instalation.
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I have created a custom realm, and I install it in tomcat by copying a jar file
inside $CATALINA_HOME/server/lib. 
But I have some issues about this: 

I can not have two application with similar realm classes but not exactly the same.
I can not have a shared installation of tomcat for multiple users. Each one of
them may require a different custom realm, and the only way to do this is by
giving them write access to the $CATALINA_HOME/server/lib directory, or at least
some files inside of it.

Now I understand the realm is not part of the servlet specification or the jsp
specification, and should not be part of the web application. 

What I propose is simple: in the realm tag in server.xml, add an extra parameter
which will tell tomcat in which directory or jar file to get the realm. for example:

 <Realm  
    className="MyCustomRealmClass" 
    classpath="/home/paul/CustomRealm.jar"
    ...
 />

That way, each user could configure his own realm in his own catalina
configuration directories.

Another option would be to search the classes that are available to the context
the realm is defined in. 

For example if my web application has the realm classes inside
SOMEDIR/WEB-INF/classes/MyCustomRealmClass.class
and I put this inside server.xml:

<Context path="/myapp" docBase="/SOMEDIR">
  <Realm  
     className="MyCustomRealmClass" 
     ...
   />
...
/>

it will find the class and use it.

Note this would not break any specification, it would be just tomcat's way of
configuring the realm. Other application servers are not currently following
current tomcat's way anyway.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to