Skip to content

Commit

Permalink
Explicitly configure allowed credential types
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk@1767646 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Nov 2, 2016
1 parent f96f575 commit 292d6cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ public void lifecycleEvent(LifecycleEvent event) {
serverCsf = new RmiClientLocalhostSocketFactory(serverCsf);
}

env.put("jmx.remote.rmi.server.credential.types", new String[] {
String[].class.getName(),
String.class.getName() });

// Populate the env properties used to create the server
if (serverCsf != null) {
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, serverCsf);
Expand Down Expand Up @@ -328,7 +332,7 @@ private JMXConnectorServer createServer(String serverName,
cs = new RMIConnectorServer(serviceUrl, theEnv, server,
ManagementFactory.getPlatformMBeanServer());
cs.start();
registry.bind("jmxrmi", server);
registry.bind("jmxrmi", server.toStub());
log.info(sm.getString("jmxRemoteLifecycleListener.start",
Integer.toString(theRmiRegistryPort),
Integer.toString(theRmiServerPort), serverName));
Expand Down
4 changes: 4 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
<code>o.a.catalina.connector.CoyoteInputStream</code>/
<code>o.a.catalina.connector.CoyoteOutputStream</code>. (violetagg)
</add>
<fix>
When configuring the JMX remote listener, specify the allowed types for
the credentials. (markt)
</fix>
</changelog>
</subsection>
<subsection name="Coyote">
Expand Down

0 comments on commit 292d6cc

Please sign in to comment.