You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by deepak suldhal <de...@yahoo.com> on 2005/02/27 22:47:54 UTC

JDBC

Hi,
   I followed the JDBC document posted on Tomcat site.
and it works fine. I am able to access the database
and see the results.

My question is.

I have different users who will be using my
application
and I need to validate these users before I provide
them acesss to database.

How would I do this ?. Since tomcat has the user name
and password already in the context, How would know
which user is accessing.

Thanks
D



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: JDBC

Posted by "Richard Mixon (qwest)" <rn...@qwest.net>.
Sounds like you need application logic to do this - probably in
conjunction with using Tomcat's Container Managed Authentication (CMA).

Tomcat can validate the username against a database (see JDBCRealm at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#JDBCRea
lm ).

However after being authenticated you can issue
  request.getRemoteUser();
to determine which user logged in. Then you can control how their
database queries are issued.

HTH - Richard

deepak suldhal wrote:
> Hi,
>   This does not solved the problem, with this I can
> restrict access to user group or allow access.
>
> Once the user has access I need to know who he or she
> is so that I can query the database with respect to
> his or her user_id.
>
> And So how would I do this.
>
> Thanks
> D
> --- Hiroshi Iwatani <HG...@nifty.ne.jp> wrote:
>
>> Write <tomcat-users> element in the tomcat-users.xml file.
>>
>> deepak suldhal wrote:
>>> Hi,
>>>    I followed the JDBC document posted on Tomcat site.
>>> and it works fine. I am able to access the database and see the
>>> results.
>>>
>>> My question is.
>>>
>>> I have different users who will be using my
>>> application
>>> and I need to validate these users before I provide them acesss to
>>> database.
>>>
>>> How would I do this ?. Since tomcat has the user name
>>> and password already in the context, How would know which user is
>>> accessing.
>>>
>>> Thanks
>>> D
>>>
>>>
>>>
>>>
>>>
>>> __________________________________
>>> Do you Yahoo!?
>>> Yahoo! Mail - You care about security. So do we.
>>> http://promotions.yahoo.com/new_mail
>>>
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>> tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>> --
>> Hiroshi Iwatani
>>
>> *stop cruelty* Annual number of institutionally
>> euthanized cats and dogs
>> including kittens and puppies: US 5 million, JP 500 thousand. How
>> about your country? *for our better karma*
>> ---------------------
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: JDBC

Posted by deepak suldhal <de...@yahoo.com>.
Hi,
  This does not solved the problem, with this I can
restrict access to user group or allow access.

Once the user has access I need to know who he or she
is so that I can query the database with respect to
his or her user_id.

And So how would I do this.

Thanks
D






--- Hiroshi Iwatani <HG...@nifty.ne.jp> wrote:

> Write <tomcat-users> element in the tomcat-users.xml
> file.
> 
> deepak suldhal wrote:
> > Hi,
> >    I followed the JDBC document posted on Tomcat
> site.
> > and it works fine. I am able to access the
> database
> > and see the results.
> > 
> > My question is.
> > 
> > I have different users who will be using my
> > application
> > and I need to validate these users before I
> provide
> > them acesss to database.
> > 
> > How would I do this ?. Since tomcat has the user
> name
> > and password already in the context, How would
> know
> > which user is accessing.
> > 
> > Thanks
> > D
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________ 
> > Do you Yahoo!? 
> > Yahoo! Mail - You care about security. So do we. 
> > http://promotions.yahoo.com/new_mail
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> -- 
> Hiroshi Iwatani
> 
> *stop cruelty* Annual number of institutionally
> euthanized cats and dogs
> including kittens and puppies: US 5 million, JP 500
> thousand. How about
> your country? *for our better karma*
> ---------------------
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: JDBC

Posted by Hiroshi Iwatani <HG...@nifty.ne.jp>.
Write <tomcat-users> element in the tomcat-users.xml file.

deepak suldhal wrote:
> Hi,
>    I followed the JDBC document posted on Tomcat site.
> and it works fine. I am able to access the database
> and see the results.
> 
> My question is.
> 
> I have different users who will be using my
> application
> and I need to validate these users before I provide
> them acesss to database.
> 
> How would I do this ?. Since tomcat has the user name
> and password already in the context, How would know
> which user is accessing.
> 
> Thanks
> D
> 
> 
> 
> 	
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - You care about security. So do we. 
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

-- 
Hiroshi Iwatani

*stop cruelty* Annual number of institutionally euthanized cats and dogs
including kittens and puppies: US 5 million, JP 500 thousand. How about
your country? *for our better karma*
---------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org