Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Webapp client EUID

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic