1

JMX 允许您在一个名为的文件中为用户设置访问权限jmxremote.access(您可以在 中找到模板<JAVA INSTALL>/jre/lib/management)。在那里你可以为每个用户指定如果用户有..

   "readonly" grants access to read attributes of MBeans.
               For monitoring, this means that a remote client in this
               role can read measurements but cannot perform any action
               that changes the environment of the running program.

或者..

   "readwrite" grants access to read and write attributes of MBeans,
               to invoke operations on them, and optionally
               to create or remove them. This access should be granted
               only to trusted clients, since they can potentially
               interfere with the smooth operation of a running program.

...权限。

现在,我想为 JXM 用户激活此访问控制功能,我通过 JMC 使用它来访问飞行记录器数据——按照默认安全标准,为该用户提供尽可能少的权限。

--> 给用户readonly权限就足够了,还是Java Flight Recorder还需要在某处写东西?

4

1 回答 1

3

JFR 需要一些特定的读写权限:

your-role-name-goes-here readwrite \
  create com.sun.management.*,com.oracle.jrockit.* \
  unregister

答案来自: https ://community.oracle.com/thread/2588377

于 2015-01-28T11:26:24.873 回答