Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public void setUpPorts() {

@Before
public void setUpFilterPattern() {
openMBeanFilterPattern = new OpenMBeanFilterPattern().pattern();
openMBeanFilterPattern = new SanctionedSerializablesFilterPattern()
.append("javax.security.auth.Subject")
.pattern();
}

SystemManagementService getSystemManagementService() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public void setUpPorts() {

@Before
public void setUpFilterPattern() {
openMBeanFilterPattern = new OpenMBeanFilterPattern().pattern();
openMBeanFilterPattern = new SanctionedSerializablesFilterPattern()
.append("javax.security.auth.Subject")
.pattern();
}

SystemManagementService getSystemManagementService() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,14 @@ private void configureAndStart() throws IOException {
String[].class.getName(),
String.class.getName()});

// Carry the connector options that are configured as system properties into the
// environment of this manually constructed connector server, so that they take
// effect here as they would for a connector server created by the platform.
String configuredPattern = System.getProperty(RMIConnectorServer.SERIAL_FILTER_PATTERN);
if (configuredPattern != null) {
env.put(RMIConnectorServer.SERIAL_FILTER_PATTERN, configuredPattern);
}

// Manually creates and binds a JMX RMI Connector Server stub with the
// registry created above: the port we pass here is the port that can
// be specified in "service:jmx:rmi://"+hostname+":"+port - where the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public class SystemPropertyJmxSerialFilterConfigurationFactory
public SystemPropertyJmxSerialFilterConfigurationFactory() {
// JmxSerialFilter requires Java 9 or greater
this(isJavaVersionAtLeast(JAVA_9) && isBlank(System.getProperty(PROPERTY_NAME)),
new OpenMBeanFilterPattern().pattern());
// The RMI connector protocol conveys a delegation subject with every operation, so the
// connector's pattern must accept it in addition to the shared dependencies.
new SanctionedSerializablesFilterPattern()
.append("javax.security.auth.Subject")
.pattern());
}

@VisibleForTesting
Expand Down
Loading