Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Commit 0f76016

Browse files
committed
Explicitly configure allowed credential types
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc8.0.x/trunk@1767656 13f79535-47bb-0310-9956-ffa450edef68
1 parent 779d5d3 commit 0f76016

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
@@ -71,6 +71,10 @@
7171
Correctly test for control characters when reading the provided shutdown
7272
password. (markt)
7373
</fix>
74+
<fix>
75+
When configuring the JMX remote listener, specify the allowed types for
76+
the credentials. (markt)
77+
</fix>
7478
</changelog>
7579
</subsection>
7680
<subsection name="Coyote">

0 commit comments

Comments
 (0)