public final class

JMXPluggableAuthenticator

extends Object
implements JMXAuthenticator
java.lang.Object
   ↳ com.sun.jmx.remote.security.JMXPluggableAuthenticator

Class Overview

This class represents a JAAS based implementation of the JMXAuthenticator interface.

Authentication is performed by passing the supplied user's credentials to one or more authentication mechanisms (LoginModule) for verification. An authentication mechanism acquires the user's credentials by calling NameCallback and/or PasswordCallback. If authentication is successful then an authenticated Subject filled in with a Principal is returned. Authorization checks will then be performed based on this Subject.

By default, a single file-based authentication mechanism FileLoginModule is configured (FileLoginConfig).

To override the default configuration use the com.sun.management.jmxremote.login.config management property described in the JRE/lib/management/management.properties file. Set this property to the name of a JAAS configuration entry and ensure that the entry is loaded by the installed Configuration. In addition, ensure that the authentication mechanisms specified in the entry acquire the user's credentials by calling NameCallback and PasswordCallback and that they return a Subject filled-in with a Principal, for those users that are successfully authenticated.

Summary

Public Constructors
JMXPluggableAuthenticator(Map env)
Creates an instance of JMXPluggableAuthenticator and initializes it with a LoginContext.
Public Methods
Subject authenticate(Object credentials)
Authenticate the MBeanServerConnection client with the given client credentials.
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.management.remote.JMXAuthenticator

Public Constructors

public JMXPluggableAuthenticator (Map env)

Creates an instance of JMXPluggableAuthenticator and initializes it with a LoginContext.

Parameters
env the environment containing configuration properties for the authenticator. Can be null, which is equivalent to an empty Map.
Throws
SecurityException if the authentication mechanism cannot be initialized.

Public Methods

public Subject authenticate (Object credentials)

Authenticate the MBeanServerConnection client with the given client credentials.

Parameters
credentials the user-defined credentials to be passed in to the server in order to authenticate the user before creating the MBeanServerConnection. This parameter must be a two-element String[] containing the client's username and password in that order.
Returns
  • the authenticated subject containing a JMXPrincipal(username).
Throws
SecurityException if the server cannot authenticate the user with the provided credentials.