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

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.0.x/trunk@1767656 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Nov 2, 2016
1 parent 779d5d3 commit 0f76016
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 @@ -71,6 +71,10 @@
Correctly test for control characters when reading the provided shutdown
password. (markt)
</fix>
<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 0f76016

Please sign in to comment.