Securing MBeans Operations

I have some MBean operations that I need to secure. I would like users to be required to be logged in as server admin, and I would like this to be configured programmatically or preferably in a config file in the WAR when the application is deployed. I want the admin not to set this as a deployment step.

We use glass fish, but a neutral platform is preferred. However, the config files in the glass box will be fine.

+1


source to share


1 answer


By default, the Sun JDK allows access control by placing credentials on a filesystem that will live outside of your jar. For details, see the management guide .

However, since you want to control things from your application, you can use JAAS to replace the file-based configuration with your own. See the java docs at com.sun.jmx.remote.security.JMXPluggableAuthenticator for details .



You can programmatically enter your JAAS provider and then manage the authentication data however you like.

+1


source







All Articles