File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change user of thread/process outside container

 
V Black
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I writing to find out what the practice when your webapp makes a call to a library outside the container and where that call needs to be made as a particular user, and not as the container.

For example - I have a web application where a user logs in. The webapp makes a request of resources on the system on the user's behalf - but unfortunately, it actually makes the request as the container which does not have privileges. What is the practice for getting the request to be made as the user that logged in.

I'm not sure if this is a java question, a tomcat (the container I'm using) question, a solaris question or a mixture of all three.

Anyway - any ideas from this forum could be helpful to me.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The webapp makes a request of resources ...


How is this request made?

If we are talking about the webapp emulating a client browser or other process using HTTP, then the Apache HttpClient toolkit can probably help.

Bill
 
V Black
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the user clicks a button on the page that is interpreted to mean a request to make a change to the solaris system. The request is made down through a JNI layer to a c library that actually executes the change to the system. By the time the request is made to the c library - I need the thread to be of the user that logged in and not of the tomcat container.


Is that clearer?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic