jbonofre commented on code in PR #2214:
URL: https://github.com/apache/karaf/pull/2214#discussion_r4599760138
##########
assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties:
##########
@@ -122,208 +121,7 @@ jre-base= \
# - mandatory "partial" attribute is added to javax.transaction.xa export (all
JDKs) to satisfy DBCP2
#
-jre-1.8= \
- ${jre-base}, \
- javax.accessibility, \
- javax.activity, \
- javax.annotation;version="1.0", \
- javax.annotation.processing;version="1.0", \
- javax.crypto, \
- javax.crypto.interfaces, \
- javax.crypto.spec, \
- javax.imageio, \
- javax.imageio.event, \
- javax.imageio.metadata, \
- javax.imageio.plugins.bmp, \
- javax.imageio.plugins.jpeg, \
- javax.imageio.spi, \
- javax.imageio.stream, \
- javax.jws, \
- javax.jws.soap, \
- javax.lang.model, \
- javax.lang.model.element, \
- javax.lang.model.type, \
- javax.lang.model.util, \
- javax.management, \
- javax.management.loading, \
- javax.management.modelmbean, \
- javax.management.monitor, \
- javax.management.openmbean, \
- javax.management.relation, \
- javax.management.remote, \
- javax.management.remote.rmi, \
- javax.management.timer, \
- javax.naming, \
- javax.naming.directory, \
- javax.naming.event, \
- javax.naming.ldap, \
- javax.naming.spi, \
- javax.net, \
- javax.net.ssl, \
- javax.print, \
- javax.print.attribute, \
- javax.print.attribute.standard, \
- javax.print.event, \
- javax.rmi, \
- javax.rmi.CORBA, \
- javax.rmi.ssl, \
- javax.script, \
- javax.security.auth, \
- javax.security.auth.callback, \
- javax.security.auth.kerberos, \
- javax.security.auth.login, \
- javax.security.auth.spi, \
- javax.security.auth.x500, \
- javax.security.cert, \
- javax.security.sasl, \
- javax.sound.midi, \
- javax.sound.midi.spi, \
- javax.sound.sampled, \
- javax.sound.sampled.spi, \
- javax.sql, \
- javax.sql.rowset, \
- javax.sql.rowset.serial, \
- javax.sql.rowset.spi, \
- javax.swing, \
- javax.swing.border, \
- javax.swing.colorchooser, \
- javax.swing.event, \
- javax.swing.filechooser, \
- javax.swing.plaf, \
- javax.swing.plaf.basic, \
- javax.swing.plaf.metal, \
- javax.swing.plaf.multi, \
- javax.swing.plaf.synth, \
- javax.swing.table, \
- javax.swing.text, \
- javax.swing.text.html, \
- javax.swing.text.html.parser, \
- javax.swing.text.rtf, \
- javax.swing.tree, \
- javax.swing.undo, \
- javax.tools, \
- javax.transaction;partial=true;mandatory:=partial, \
- javax.transaction.xa;version="1.1";partial=true;mandatory:=partial, \
- javax.transaction.xa;version="1.1", \
- javax.transaction.xa;version="1.2", \
- javax.transaction.xa;version="1.3", \
- javax.xml, \
- javax.xml.bind;version="2.2.8", \
- javax.xml.bind.annotation;version="2.2.8", \
- javax.xml.bind.annotation.adapters;version="2.2.8", \
- javax.xml.bind.attachment;version="2.2.8", \
- javax.xml.bind.helpers;version="2.2.8", \
- javax.xml.bind.util;version="2.2.8", \
- javax.xml.crypto, \
- javax.xml.crypto.dom, \
- javax.xml.crypto.dsig, \
- javax.xml.crypto.dsig.dom, \
- javax.xml.crypto.dsig.keyinfo, \
- javax.xml.crypto.dsig.spec, \
- javax.xml.datatype, \
- javax.xml.namespace, \
- javax.xml.parsers, \
- javax.xml.stream;version="1.2", \
- javax.xml.stream.events;version="1.2", \
- javax.xml.stream.util;version="1.2", \
- javax.xml.transform, \
- javax.xml.transform.dom, \
- javax.xml.transform.sax, \
- javax.xml.transform.stax, \
- javax.xml.transform.stream, \
- javax.xml.validation, \
- javax.xml.ws;version="2.2", \
- javax.xml.ws.handler;version="2.2", \
- javax.xml.ws.handler.soap;version="2.2", \
- javax.xml.ws.http;version="2.2", \
- javax.xml.ws.soap;version="2.2", \
- javax.xml.ws.spi;version="2.2", \
- javax.xml.ws.wsaddressing;version="2.2", \
- javax.xml.ws.spi.http;version="2.2", \
- javax.xml.xpath, \
- javafx.animation, \
- javafx.application, \
- javafx.beans, \
- javafx.beans.binding, \
- javafx.beans.property, \
- javafx.beans.property.adapter, \
- javafx.beans.value, \
- javafx.collections, \
- javafx.collections.transform, \
- javafx.concurrent, \
- javafx.css, \
- javafx.embed.swing, \
- javafx.embed.swt, \
- javafx.event, \
- javafx.fxml, \
- javafx.geometry, \
- javafx.print, \
- javafx.scene, \
- javafx.scene.canvas, \
- javafx.scene.chart, \
- javafx.scene.control, \
- javafx.scene.control.cell, \
- javafx.scene.effect, \
- javafx.scene.image, \
- javafx.scene.input, \
- javafx.scene.layout, \
- javafx.scene.media, \
- javafx.scene.paint, \
- javafx.scene.shape, \
- javafx.scene.text, \
- javafx.scene.transform, \
- javafx.scene.web, \
- javafx.stage, \
- javafx.util, \
- javafx.util.converter, \
- netscape.javascript, \
- org.ietf.jgss, \
- org.omg.CORBA, \
- org.omg.CORBA_2_3, \
- org.omg.CORBA_2_3.portable, \
- org.omg.CORBA.DynAnyPackage, \
- org.omg.CORBA.ORBPackage, \
- org.omg.CORBA.portable, \
- org.omg.CORBA.TypeCodePackage, \
- org.omg.CosNaming, \
- org.omg.CosNaming.NamingContextExtPackage, \
- org.omg.CosNaming.NamingContextPackage, \
- org.omg.Dynamic, \
- org.omg.DynamicAny, \
- org.omg.DynamicAny.DynAnyFactoryPackage, \
- org.omg.DynamicAny.DynAnyPackage, \
- org.omg.IOP, \
- org.omg.IOP.CodecFactoryPackage, \
- org.omg.IOP.CodecPackage, \
- org.omg.Messaging, \
- org.omg.PortableInterceptor, \
- org.omg.PortableInterceptor.ORBInitInfoPackage, \
- org.omg.PortableServer, \
- org.omg.PortableServer.CurrentPackage, \
- org.omg.PortableServer.POAManagerPackage, \
- org.omg.PortableServer.POAPackage, \
- org.omg.PortableServer.portable, \
- org.omg.PortableServer.ServantLocatorPackage, \
- org.omg.SendingContext, \
- org.omg.stub.java.rmi, \
- org.omg.stub.javax.management.remote.rmi, \
- org.w3c.dom, \
- org.w3c.dom.bootstrap, \
- org.w3c.dom.css, \
- org.w3c.dom.events, \
- org.w3c.dom.html, \
- org.w3c.dom.ls, \
- org.w3c.dom.ranges, \
- org.w3c.dom.stylesheets, \
- org.w3c.dom.traversal, \
- org.w3c.dom.views, \
- org.w3c.dom.xpath, \
- org.xml.sax, \
- org.xml.sax.ext, \
- org.xml.sax.helpers, \
- com.sun.nio.sctp
-
-jre-9= \
Review Comment:
Since `jre-1.8`..`20` and `eecap-1.8`..`20` are removed here, we also need
to update the defaults in `AssemblyMojo` (`@Parameter(defaultValue = "11")` ->
`"21"`) and `Builder` (`JavaVersion javase = JavaVersion.Java8;` ->
`JavaVersion.Java21`), otherwise any assembly build that omit `<javase>` will
resolve `java.specification.version=11` and fail in `Builder.getSystemBundle()`
with empty system packages.
Also, `Builder.JavaVersion` currently stops at `Java26("26")`, so we should
add `Java27("27")` to match `jre-27` and `eecap-27`.
##########
tooling/karaf-maven-plugin/pom.xml:
##########
@@ -382,8 +382,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.8</source>
- <target>1.8</target>
+ <release>21</release>
Review Comment:
I suggest to use `<release>${javaVersion}</release>` instead of hardcoding
`21`, so overriding `-DjavaVersion=25` applies here too.
##########
itests/test/src/test/java/org/apache/karaf/itests/JavaSecurityTest.java:
##########
@@ -63,7 +62,8 @@ public Option[] config() {
// Add some extra options used by this test...
options.addAll(Arrays.asList(
editConfigurationFilePut("etc/system.properties",
"java.security.policy", "${karaf.etc}/all.policy"),
- editConfigurationFilePut("etc/system.properties",
"org.osgi.framework.security", "osgi"),
+ // This is no longer allowed as felix framework 7.0.5 calls
System.getSecurityManager() in case it is there, see Felix.java
Review Comment:
With `org.osgi.framework.security=osgi` commented out and the
`System.getSecurityManager()` assertion removed, `testJavaSecurity()` only
checks that the bundles start without OSGi security enabled. Should we remove
or `@Ignore` this test (with a note/issue ref) rather than keeping a test that
no longer exercises Java security?
##########
main/src/test/resources/test-karaf-home/etc/config.properties:
##########
@@ -76,68 +76,46 @@ org.osgi.framework.system.packages= \
org.osgi.framework.system.capabilities= \
${eecap-${java.specification.version}}
-eecap-18 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0",
\
+eecap-27 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0"
-eecap-17 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0"
+eecap-26 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0"
-eecap-16 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0"
+eecap-25 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0"
-eecap-15= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0"
+eecap-24 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0"
-eecap-14= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0"
+eecap-23 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0"
-eecap-13= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0"
+eecap-22 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0",
\
osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
- osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0", \
- osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0", \
- osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0"
-eecap-11= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact1";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact2";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0",
\
+ osgi.ee; osgi.ee="JavaSE/compact3";
version:List<Version>="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0"
+eecap-21 = osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE";
version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0",
\
Review Comment:
Could we also update the companion
`main/src/test/resources/test-karaf-home/etc/jre.properties` to match? It still
defines `jre-1.8`..`jre-26` (missing `jre-27`, and `jre-26` still exports
`java.applet` and `netscape.javascript`).
##########
examples/karaf-docker-example/karaf-docker-example-dynamic-dist/pom.xml:
##########
@@ -139,7 +139,7 @@
</bootFeatures>
<libraries>
</libraries>
- <javase>17</javase>
+ <javase>${javaVersion}</javase>
Review Comment:
Note that line 104 above (as well as
`karaf-docker-example-static-dist/pom.xml`, `assemblies/docker/Dockerfile`, and
`DockerfileMojo.DEFAULT_IMAGE`) still uses `eclipse-temurin:17-jre` / `11-jre`,
which won't boot Karaf now that `bin/inc` and `bin/karaf.bat` requires Java 21+.
##########
shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/secured/SecuredCommand.java:
##########
@@ -64,8 +69,24 @@ public Parser getParser() {
@Override
public Object execute(Session session, List<Object> arguments) throws
Exception {
- factory.checkSecurity(getScope(), getName(), arguments);
- return command.execute(session, arguments);
+ // Gogo runs commands on its session's pool threads. Those threads
either have no
+ // subject bound (JDK 24+: Subject.callAs() uses a ScopedValue, which
does not cross
+ // an ExecutorService task boundary) or one inherited from whatever
thread created
+ // them (JDK 21: AccessControlContext inheritance, possibly from an
earlier
+ // jaas:sudo). So the session's subject is authoritative; jaas:sudo
switches it while
+ // its command runs. Subject.current() is only a fallback for sessions
without one.
+ Subject subject = (Subject) session.get(Subject.class.getName());
Review Comment:
Good catch on Gogo `ExecutorService` thread boundaries. Note that
`SecuredSessionFactoryImpl.invoke(...)` and
`SecuredSessionFactoryImpl.redirect(...)` also call `checkSecurity(...)` ->
`Subject.current()` directly without re-binding
`session.get(Subject.class.getName())`.
If a reflective invocation or redirect runs on a Gogo pipeline thread when
shell ACLs or compulsory roles are configured, `Subject.current()` will be
`null` on JDK 25-might be worth applying the same session-subject fallback
there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]