Hi Mark, Please find below my exact requirement.
I have Oracle Database where my objects are installed and I have also a Linux instance where i installed Tomcat. I am currently creating connection to the Oracle database from Tomcat using 'apps' user as this schema is having all permissions. One of my client want to monitor the connections that are created from my application. For this i want to pass my Linux user information (userid) while creating the connection from my application or in context.xml file. Please suggest the approaches? If SPENGO can you redirect me any doc/post how to achieve this? Regards, Vijay G On Thu, May 28, 2015 at 2:47 PM, Mark Thomas <ma...@apache.org> wrote: > On 28/05/2015 09:59, André Warnier wrote: > > Mark Thomas wrote: > >> On 28/05/2015 08:26, Vijay Kumar wrote: > >>> Hi, > >>> > >>> Is it possible to pass OS username when making connection to any > >>> Database > >>> from Tomcat context.xml? > >> > >> In theory this should be possible if you are using SPNEGO > authentication. > >> > >> Testing this to figure out what is required to make it work is on the > >> TODO list. It is likely that some combination of configuration, Tomcat > >> code changes and application changes will be required. > >> > > > > I think that the term "OS username" should be carefully defined here, > > along with the precise circumstances in which this would apply. > > Agreed. My definition is "user authenticated via SPNEGO" > > > Also, connecting to a database using the user-id kind of defeats any > > kind of db connection persistence/pooling/sharing at the container level. > > You can have per user pools. Depending on the app and the usage pattern > of the DB there can still be some benefits. > > > If this kind of thing is desired anyway, should it then not be done at > > the application level, where you can retrieve the UserPrincipal anyway ? > > There are certainly different approaches available to solve this > problem. The best approach depends on the actual requirement. I've used > a range of approaches to this type of problem in the past. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >