JDK-8191314 : Deprecate RMIConnectorServer.CREDENTIAL_TYPES
  • Type: CSR
  • Component: core-svc
  • Sub-Component: javax.management
  • Priority: P2
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-11-15
  • Updated: 2017-11-21
  • Resolved: 2017-11-20
Related Reports
CSR :  
Description
Summary
-------

Restores and deprecates a constant RMIConnectorServer.CREDENTIALS_ TYPES that was added in JDK 9 and removed in JDK 10 without having been deprecated. 

Problem
-------

RMIConnectorServer.CREDENTIALS_ TYPES was removed from JDK 10 without deprecating.

Solution
--------

Restoring RMIConnectorServer.CREDENTIAL_TYPES. 
Marking RMIConnectorServer.CREDENTIAL_TYPES as deprecated because it is superseded by RMIConnectorServer.CREDENTIALS_FILTER_PATTERN.

Specification
-------------

         /**
    +     * Name of the attribute that specifies a list of class names acceptable
    +     * as parameters to the {@link RMIServer#newClient(java.lang.Object) RMIServer.newClient()}
    +     * remote method call.
    +     * <p>
    +     * This list of classes should correspond to the transitive closure of the
    +     * credentials class (or classes) used by the installed {@linkplain JMXAuthenticator}
    +     * associated with the {@linkplain RMIServer} implementation.
    +     * <p>
    +     * If the attribute is not set, or is null, then any class is
    +     * deemed acceptable.
    +     *
    +     * @deprecated Use {@link #CREDENTIALS_FILTER_PATTERN} with a
    +     * {@linkplain java.io.ObjectInputFilter.Config#createFilter
    +     * filter pattern} string instead.
    +     */
    +    @Deprecated(since="10", forRemoval=true)
    +    public static final String CREDENTIAL_TYPES =
    +            "jmx.remote.rmi.server.credential.types";
    +
    +    /**
         * Name of the attribute that specifies an
         * {@link ObjectInputFilter} pattern string to filter classes acceptable
         * for {@link RMIServer#newClient(java.lang.Object) RMIServer.newClient()}
Comments
Moving to approved.
20-11-2017

I will try to get this done as soon as possible.
20-11-2017

I'm not sure if it is appropriate to point this out here, but this CSR is blocking a high priority bugfix in the JVM and should be considered urgent.
20-11-2017

The change described in the solution section does not correspond to the current state of RMIConnectorServer: http://hg.openjdk.java.net/jdk/jdk/file/09ad9dd26857/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectorServer.java Pending the request.
17-11-2017