Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51119
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 4 May 2011 20:22:08 +0000 (20:22 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 4 May 2011 20:22:08 +0000 (20:22 +0000)
Add JAAS authentication support to the JmxRemoteLifecycleListener
Patch provided by Neil Laurance

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1099586 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
webapps/docs/changelog.xml

index b8226df..2abcb56 100644 (file)
@@ -69,6 +69,7 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
     protected boolean clientAuth = true;
     protected boolean authenticate = true;
     protected String passwordFile = null;
+    protected String loginModuleName = null;
     protected String accessFile = null;
     protected boolean useLocalPorts = false;
 
@@ -164,6 +165,9 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
         accessFile = System.getProperty(
                 "com.sun.management.jmxremote.access.file",
                 "jmxremote.access");
+        
+        loginModuleName = System.getProperty(
+                "com.sun.management.jmxremote.login.config");
     }
     
 
@@ -209,6 +213,7 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
             if (authenticate) {
                 env.put("jmx.remote.x.password.file", passwordFile);
                 env.put("jmx.remote.x.access.file", accessFile);
+                env.put("jmx.remote.x.login.config", loginModuleName);
             }
 
 
index 3b3281b..c446855 100644 (file)
         e.g. on authentication. (markt)
       </add>
       <add>
+        <bug>51119</bug>: Add JAAS authentication support to the
+        JMXRemoteLifecycleListener. Patch provided by Neil Laurance. (markt) 
+      </add>
+      <add>
         <bug>51136</bug>: Provide methods that enable the name of a Context on
         Context creation when using Tomcat in an embedded scenario. Based on a
         patch provided by David Calavera. (markt)