Skip to content

Commit 0e83ad3

Browse files
committed
Explicitly configure allowed credential types
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1767644 13f79535-47bb-0310-9956-ffa450edef68
1 parent b0715ef commit 0e83ad3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ public void lifecycleEvent(LifecycleEvent event) {
264264
serverCsf = new RmiClientLocalhostSocketFactory(serverCsf);
265265
}
266266

267+
env.put("jmx.remote.rmi.server.credential.types", new String[] {
268+
String[].class.getName(),
269+
String.class.getName() });
270+
267271
// Populate the env properties used to create the server
268272
if (serverCsf != null) {
269273
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, serverCsf);
@@ -328,7 +332,7 @@ private JMXConnectorServer createServer(String serverName,
328332
cs = new RMIConnectorServer(serviceUrl, theEnv, server,
329333
ManagementFactory.getPlatformMBeanServer());
330334
cs.start();
331-
registry.bind("jmxrmi", server);
335+
registry.bind("jmxrmi", server.toStub());
332336
log.info(sm.getString("jmxRemoteLifecycleListener.start",
333337
Integer.toString(theRmiRegistryPort),
334338
Integer.toString(theRmiServerPort), serverName));

webapps/docs/changelog.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
StoreConfig component includes the executor name when writing the
9898
Connector configuration. (markt)
9999
</fix>
100+
<fix>
101+
When configuring the JMX remote listener, specify the allowed types for
102+
the credentials. (markt)
103+
</fix>
100104
</changelog>
101105
</subsection>
102106
<subsection name="Coyote">

0 commit comments

Comments
 (0)