This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Webapp client EUID Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Webapp client EUID" Watch "Webapp client EUID" New topic
Author

Webapp client EUID

Bruce Evans
Greenhorn

Joined: Nov 28, 2004
Posts: 14
Hi,
I'm trying to find out if it is possible to find out the EUID (Effective
User ID) of a webappl client, from the other side of a socket connection.

On the same system, a 'C' program is running as a socket server, waiting for
client connections.

On the same system, is a webcontainer (tomcat, SUN application server, etc).
A client (either on the same system or a remote system) uses a browser to
access a login page for a webappl served by the webcontainer.

The loginModule uses PAM to authenticate the user, and the user starts
interacting with the webappl. The backend code for the webappl creates a
socket and connects to the 'C' socket server.

Now, the socket server wants to obtain the user credentials (EUID) of the
connecting client. It does so using a couple library functions and gets
back an EUID for the client on the other end of the socket.

However, the EUID coming back is for the user that the webcontainer is
running as. For instance, 0 for 'root' or 60002 for 'noaccess'. What the
socket server really wants is the EUID for the client user who was
authenticated, Joe Bar (EUID 12345).

It there anything that can be done on the webappl side so that when the
socket connection is made, it appears to the 'C' socket server that it
is Joe Bar instead of 'root' or 'noaccess'.

I have tested this with tomcat and Sun Java webserver and do not get
the client user EUID, but instead root or noaccess.

Thanks
-Bruce
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webapp client EUID