src/java.management/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java

Print this page




  49 import com.sun.jmx.remote.util.EnvHelp;
  50 
  51 /**
  52  * <p>This class represents a
  53  * <a href="{@docRoot}/../guide/security/jaas/JAASRefGuide.html">JAAS</a>
  54  * based implementation of the {@link JMXAuthenticator} interface.</p>
  55  *
  56  * <p>Authentication is performed by passing the supplied user's credentials
  57  * to one or more authentication mechanisms ({@link LoginModule}) for
  58  * verification. An authentication mechanism acquires the user's credentials
  59  * by calling {@link NameCallback} and/or {@link PasswordCallback}.
  60  * If authentication is successful then an authenticated {@link Subject}
  61  * filled in with a {@link Principal} is returned.  Authorization checks
  62  * will then be performed based on this <code>Subject</code>.</p>
  63  *
  64  * <p>By default, a single file-based authentication mechanism
  65  * {@link FileLoginModule} is configured (<code>FileLoginConfig</code>).</p>
  66  *
  67  * <p>To override the default configuration use the
  68  * <code>com.sun.management.jmxremote.login.config</code> management property
  69  * described in the JRE/lib/management/management.properties file.
  70  * Set this property to the name of a JAAS configuration entry and ensure that
  71  * the entry is loaded by the installed {@link Configuration}. In addition,
  72  * ensure that the authentication mechanisms specified in the entry acquire
  73  * the user's credentials by calling {@link NameCallback} and
  74  * {@link PasswordCallback} and that they return a {@link Subject} filled-in
  75  * with a {@link Principal}, for those users that are successfully
  76  * authenticated.</p>
  77  */
  78 public final class JMXPluggableAuthenticator implements JMXAuthenticator {
  79 
  80     /**
  81      * Creates an instance of <code>JMXPluggableAuthenticator</code>
  82      * and initializes it with a {@link LoginContext}.
  83      *
  84      * @param env the environment containing configuration properties for the
  85      *            authenticator. Can be null, which is equivalent to an empty
  86      *            Map.
  87      * @exception SecurityException if the authentication mechanism cannot be
  88      *            initialized.
  89      */




  49 import com.sun.jmx.remote.util.EnvHelp;
  50 
  51 /**
  52  * <p>This class represents a
  53  * <a href="{@docRoot}/../guide/security/jaas/JAASRefGuide.html">JAAS</a>
  54  * based implementation of the {@link JMXAuthenticator} interface.</p>
  55  *
  56  * <p>Authentication is performed by passing the supplied user's credentials
  57  * to one or more authentication mechanisms ({@link LoginModule}) for
  58  * verification. An authentication mechanism acquires the user's credentials
  59  * by calling {@link NameCallback} and/or {@link PasswordCallback}.
  60  * If authentication is successful then an authenticated {@link Subject}
  61  * filled in with a {@link Principal} is returned.  Authorization checks
  62  * will then be performed based on this <code>Subject</code>.</p>
  63  *
  64  * <p>By default, a single file-based authentication mechanism
  65  * {@link FileLoginModule} is configured (<code>FileLoginConfig</code>).</p>
  66  *
  67  * <p>To override the default configuration use the
  68  * <code>com.sun.management.jmxremote.login.config</code> management property
  69  * described in the JRE/conf/management/management.properties file.
  70  * Set this property to the name of a JAAS configuration entry and ensure that
  71  * the entry is loaded by the installed {@link Configuration}. In addition,
  72  * ensure that the authentication mechanisms specified in the entry acquire
  73  * the user's credentials by calling {@link NameCallback} and
  74  * {@link PasswordCallback} and that they return a {@link Subject} filled-in
  75  * with a {@link Principal}, for those users that are successfully
  76  * authenticated.</p>
  77  */
  78 public final class JMXPluggableAuthenticator implements JMXAuthenticator {
  79 
  80     /**
  81      * Creates an instance of <code>JMXPluggableAuthenticator</code>
  82      * and initializes it with a {@link LoginContext}.
  83      *
  84      * @param env the environment containing configuration properties for the
  85      *            authenticator. Can be null, which is equivalent to an empty
  86      *            Map.
  87      * @exception SecurityException if the authentication mechanism cannot be
  88      *            initialized.
  89      */