Java 飞行记录器 : Does it need JMX readwrite access or is readonly enough?

标签 java jmx jmc

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.

..权限。

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

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

最佳答案

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

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

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

关于Java 飞行记录器 : Does it need JMX readwrite access or is readonly enough?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28189529/

相关文章:

Java Mission Control 中的空格是什么意思?

java - 用于 Java 任务控制的基于命令行的守护进程?备择方案?

java - 使用Java + JNA调用WinInet函数

authentication - JMX认证

jakarta-ee - jmx 无法连接到本地主机

java - 如何在没有 SSL 的情况下远程使用 jmap?

java - 查看 Java Mission Control 中垃圾收集器的类型

java - Mint Linux - 将 Java 降级到 1.5

java - Map ->Reduce ->Reduce(顺序调用两个reducer)-如何配置驱动程序

jvm - (java)找不到主类