Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-17 Thread Kevin Walls
On Fri, 14 Jun 2024 14:48:14 GMT, Weijun Wang wrote: > > Does noPermissionsACC add anything? > > I don't know. My principal for this code change is that nothing is changed > for the SM-is-allowed case. I've put back the noPermissionsACC for this change, it does not have to be removed in this

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Kevin Walls
On Fri, 14 Jun 2024 14:51:53 GMT, Weijun Wang wrote: >> It needs to recognise and throw RuntimeException so that a SecurityException >> isn't wrapped in a PrivilegedActionException (which gets caught by those >> blocks of code which call extractException(pe) and look at what Exception >> it c

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Weijun Wang
On Fri, 14 Jun 2024 14:00:58 GMT, Kevin Walls wrote: >> src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java >> line 1461: >> >>> 1459: throw rte; >>> 1460: } else { >>> 1461: throw new PrivilegedActionException(e);

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Weijun Wang
On Fri, 14 Jun 2024 12:41:20 GMT, Kevin Walls wrote: > Does noPermissionsACC add anything? I don't know. My principal for this code change is that nothing is changed for the SM-is-allowed case. - PR Comment: https://git.openjdk.org/jdk/pull/19624#issuecomment-2168203868

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Kevin Walls
On Fri, 14 Jun 2024 12:03:07 GMT, Weijun Wang wrote: >> Kevin Walls has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Separate SM allowed and not allowed cases > > src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnec

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Kevin Walls
On Fri, 14 Jun 2024 12:44:17 GMT, Kevin Walls wrote: >> src/java.management/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java >> line 353: >> >>> 351: } else { >>> 352: return Subject.getSubject(AccessController.getContext()); >>> 353: } >> >> `Sub

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Kevin Walls
On Fri, 14 Jun 2024 12:04:06 GMT, Weijun Wang wrote: >> Kevin Walls has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Separate SM allowed and not allowed cases > > src/java.management/share/classes/com/sun/jmx/remote/internal/ServerNotifFo

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Kevin Walls
On Fri, 14 Jun 2024 12:09:46 GMT, Weijun Wang wrote: > I don't quite understand why there is no more `noPermissionsACC` in > `Monotor.java`. This looks like the only behavior change when SM is allowed. > The other source change looks fine to me. Does noPermissionsACC add anything? Maybe I'm r

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-14 Thread Weijun Wang
On Thu, 13 Jun 2024 20:54:25 GMT, Kevin Walls wrote: >> JMX uses APIs related to the Security Mananger which are deprecated. Use of >> AccessControlContext will be removed when Security Manager is removed. >> >> Until then, updates are needed to not require setting >> -Djava.security.manager

Re: RFR: 8333344: JMX attaching of Subject does not work when security manager not allowed [v10]

2024-06-13 Thread Kevin Walls
> JMX uses APIs related to the Security Mananger which are deprecated. Use of > AccessControlContext will be removed when Security Manager is removed. > > Until then, updates are needed to not require setting > -Djava.security.manager=allow to use JMX authentication. Kevin Walls has updated t