You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Trever M. Shick" <ts...@objectwave.com> on 2001/11/15 17:52:39 UTC

Help with multiple security domains

I'd like to have two different JDBC realms within my server.xml and then I'd
like to reference those within my web.xml file.

I already have one JDBC realm working, I would like to add a second one.
Is there some sort of "name" or "key" that can be set for a JDBC realm and
then referenced by the security constraints within the web.xml?

Thanks for any help.



_________________________________________
Trever Shick
ICQ#:137752693
Current ICQ status:

SMS: (Send an SMS message to my ICQ): +2783142137752693
More ways to contact me:
Yahoo Id:trevershick@yahoo.com
Current Yahoo! Messenger status:


MSN Messenger Id : tshick@hotmail.com

ICQ URL:
http://wwp.icq.com/137752693

E-Mail :
tshick@objectwave.com
trevershick@yahoo.com
tshick@hotmail.com
trevershick@hotmail.com
Web Page: http://www.geocities.com/trevershick


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Help with multiple security domains

Posted by Antony Bowesman <ad...@teamware.com>.
"Trever M. Shick" wrote:
> 
> Thanks.. Do you know if this works with previous versions of tomcat 
> (3.2.3)?
> It's not a requirement, I just don't feel like upgrading now.

It can be done with 3.2.x but you have to modify/extend the JDBC realm
to read parameters from the context.  In the realm authenticate() method
just do something like

    ctx.getInitParameter(namedParameter);

and in your web.xml for the webapp add

    <context-param>
        <param-name>namedParameter</param-name>
        <param-value>YourValue</param-value>
    </context-param>

You can then extend the logic to do what you want for your specific
context.

Rgds
Antony

> 
> Trever
> 
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, November 15, 2001 12:06 PM
> Subject: Re: Help with multiple security domains
> 
> >
> >
> > On Thu, 15 Nov 2001, Trever M. Shick wrote:
> >
> > > Date: Thu, 15 Nov 2001 09:52:39 -0700
> > > From: Trever M. Shick <ts...@objectwave.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Help with multiple security domains
> > >
> > > I'd like to have two different JDBC realms within my server.xml and then
> I'd
> > > like to reference those within my web.xml file.
> > >
> > > I already have one JDBC realm working, I would like to add a second one.
> > > Is there some sort of "name" or "key" that can be set for a JDBC realm
> and
> > > then referenced by the security constraints within the web.xml?
> > >
> >
> > For Tomcat 4, you can use a different realm per webapp by nesting the
> > <Realm> element inside a <Context> element for that webapp in server.xml.
> > That way, you don't need any special key or anything like that.
> >
> > > Thanks for any help.
> > >
> >
> > Craig

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Help with multiple security domains

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 15 Nov 2001, Trever M. Shick wrote:

> Date: Thu, 15 Nov 2001 12:38:31 -0700
> From: Trever M. Shick <ts...@objectwave.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: Help with multiple security domains
>
> Thanks.. Do you know if this works with previous versions of tomcat (3.2.3)?
> It's not a requirement, I just don't feel like upgrading now.

No it doesn't.  Tomcat 3.2 only supports a single realm.

>
>
> Trever
>

Craig


>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, November 15, 2001 12:06 PM
> Subject: Re: Help with multiple security domains
>
>
> >
> >
> > On Thu, 15 Nov 2001, Trever M. Shick wrote:
> >
> > > Date: Thu, 15 Nov 2001 09:52:39 -0700
> > > From: Trever M. Shick <ts...@objectwave.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Help with multiple security domains
> > >
> > > I'd like to have two different JDBC realms within my server.xml and then
> I'd
> > > like to reference those within my web.xml file.
> > >
> > > I already have one JDBC realm working, I would like to add a second one.
> > > Is there some sort of "name" or "key" that can be set for a JDBC realm
> and
> > > then referenced by the security constraints within the web.xml?
> > >
> >
> > For Tomcat 4, you can use a different realm per webapp by nesting the
> > <Realm> element inside a <Context> element for that webapp in server.xml.
> > That way, you don't need any special key or anything like that.
> >
> > > Thanks for any help.
> > >
> >
> > Craig
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Help with multiple security domains

Posted by "Trever M. Shick" <ts...@objectwave.com>.
Thanks.. Do you know if this works with previous versions of tomcat (3.2.3)?
It's not a requirement, I just don't feel like upgrading now.


Trever


----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 15, 2001 12:06 PM
Subject: Re: Help with multiple security domains


>
>
> On Thu, 15 Nov 2001, Trever M. Shick wrote:
>
> > Date: Thu, 15 Nov 2001 09:52:39 -0700
> > From: Trever M. Shick <ts...@objectwave.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: tomcat-user@jakarta.apache.org
> > Subject: Help with multiple security domains
> >
> > I'd like to have two different JDBC realms within my server.xml and then
I'd
> > like to reference those within my web.xml file.
> >
> > I already have one JDBC realm working, I would like to add a second one.
> > Is there some sort of "name" or "key" that can be set for a JDBC realm
and
> > then referenced by the security constraints within the web.xml?
> >
>
> For Tomcat 4, you can use a different realm per webapp by nesting the
> <Realm> element inside a <Context> element for that webapp in server.xml.
> That way, you don't need any special key or anything like that.
>
> > Thanks for any help.
> >
>
> Craig
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Help with multiple security domains

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 15 Nov 2001, Trever M. Shick wrote:

> Date: Thu, 15 Nov 2001 09:52:39 -0700
> From: Trever M. Shick <ts...@objectwave.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Help with multiple security domains
>
> I'd like to have two different JDBC realms within my server.xml and then I'd
> like to reference those within my web.xml file.
>
> I already have one JDBC realm working, I would like to add a second one.
> Is there some sort of "name" or "key" that can be set for a JDBC realm and
> then referenced by the security constraints within the web.xml?
>

For Tomcat 4, you can use a different realm per webapp by nesting the
<Realm> element inside a <Context> element for that webapp in server.xml.
That way, you don't need any special key or anything like that.

> Thanks for any help.
>

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>