1 Reply Latest reply on Feb 7, 2004 7:21 PM by starksm64

    Starting mbeans as a different user

    jlward4

       

      "jlward4" wrote:
      One thing I have been thinking about in regards to the whole JMX / microkernel / Middleware stuff is the idea of having different MBeans (or threads) run as different users. I know that the JDK does not support this and custom JNI code would be needed to make this happen, but I really feel that we need this. Here's why from a Unix perspective... I really don't want to run everything as root or any single user. As we pile more services on JMX stack, we will need a way to provide OS level security for those services. For example, I would really love it if somehow JBoss could do the Apache style thing and have a simple small process which runs as root and binds to port 80; Then have everything else run as a different user. This provides good OS level security making remote root exploits in Apache very unlikley. Sure we can do the port forwarding thing, or mod_jk, or proxying... But I think we shouldn't have to. This becomes more of an issue when we start talking about building Java mail servers which run inside of a JMX microkernel. (I saw this mentioned somewhere by a JBoss guy.) So, what do you all think? Is this really nessecary? What are other possible solutions?


        • 1. Re: Starting mbeans as a different user
          starksm64

          This does not fit the current Java model and I'm not interested in doing OS specific integration to provide this. JDK 1.5 is supposed to try to provide better integration with the OS, but its not clear integration down to the process user id is supported.

          The closes thing Java supports is the JAAS subject based permission where you can run a process as a given Subject. This does not map to OS level permission like being able to open priviledged ports however.