java - Using JMX with Jaas for jconsole authentication -
i have following scenario:
i have application uses jmx expose methods, sat on server. @ present users can connect via command line using jconsole. there no access restrictions.
users logging machine , have access rights stored in form of active directory.
i looking add authentication , authorisation jmx process when user types command line:
jconsole <processname>
it check ad user group , determine if have authorisation either read or read , write managed resource.
i have solution retrieving ad groups, not in how pass jmx process. can set hard coded passwords file on jmx process have no way of calling user automatically determine access rights.
is possible current jmx process execute callback determine given users access rights when try connect it? if not, there existing tools , frameworks (for example jboss) allow me this?
this solved using jaas custom login module, bouncing , relaunching jmx process following in command line:
-dcom.sun.management.jmxremote.login.config=sample -djava.security.auth.login.config=sample_jaas.config
where sample_jaas.config has setting this:
sample { sample.module.sampleloginmodule required; };
and sampleloginmodule implements loginmodule interface, , in login() method has callback authorization logic module.
Comments
Post a Comment