diff options
author | Robert Gemmell <robbie@apache.org> | 2010-01-06 22:04:43 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2010-01-06 22:04:43 +0000 |
commit | 2a58f6125dde16a132ac89f7b34778dbc58b4986 (patch) | |
tree | eb1ac2f69bdc61b8372385709cbd339ebca9702c /qpid/java/management/common | |
parent | ead585d36cf7c2a9d5f2e6cd50998660bae46923 (diff) | |
download | qpid-python-2a58f6125dde16a132ac89f7b34778dbc58b4986.tar.gz |
QPID-2322: Add new createUser and setPassword methods using String for passwords. Position these after the older now-deprecated char[] methods within the UserManagement interface to manipulate the MBeanInfo generated, resulting in overwriting the OperationData of the deprecated method on the old 0.5 management console and forcing use of these newer methods rather than the incompatible char[] based methods. Remove previously added compatibility check as it is no longer required. Update current management console to use the new String based methods when available.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@896693 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/management/common')
2 files changed, 45 insertions, 1 deletions
diff --git a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java index 7bc0e717b8..c6f7829e59 100644 --- a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java +++ b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java @@ -42,7 +42,7 @@ public interface ServerInformation * Qpid JMX API 1.1 can be assumed. */ int QPID_JMX_API_MAJOR_VERSION = 1; - int QPID_JMX_API_MINOR_VERSION = 6; + int QPID_JMX_API_MINOR_VERSION = 7; /** diff --git a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java index 4a43071c3b..d83d534428 100644 --- a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java +++ b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java @@ -45,18 +45,37 @@ public interface UserManagement * set password for user. * * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied. + * + * @deprecated since Qpid JMX API 1.7 * * @param username The username to create * @param password The password for the user * * @return The result of the operation */ + @Deprecated @MBeanOperation(name = "setPassword", description = "Set password for user.", impact = MBeanOperationInfo.ACTION) boolean setPassword(@MBeanOperationParameter(name = "username", description = "Username")String username, + //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients @MBeanOperationParameter(name = "passwd", description = "Password")char[] password); /** + * Set password for a given user. + * + * @since Qpid JMX API 1.7 + * + * @param username The username to create + * @param password The password for the user + * + * @return The result of the operation + */ + @MBeanOperation(name = "setPassword", description = "Set password for user.", + impact = MBeanOperationInfo.ACTION) + boolean setPassword(@MBeanOperationParameter(name = "username", description = "Username")String username, + @MBeanOperationParameter(name = "password", description = "Password")String password); + + /** * set rights for users with given details * * @param username The username to create @@ -78,6 +97,8 @@ public interface UserManagement * * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied. * + * @deprecated since Qpid JMX API 1.7 + * * @param username The username to create * @param password The password for the user * @param read The set of permission to give the new user @@ -86,15 +107,38 @@ public interface UserManagement * * @return The result of the operation */ + @Deprecated @MBeanOperation(name = "createUser", description = "Create new user from system.", impact = MBeanOperationInfo.ACTION) boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username, + //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients @MBeanOperationParameter(name = "passwd", description = "Password")char[] password, @MBeanOperationParameter(name = "read", description = "Administration read")boolean read, @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write, @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin); /** + * Create users with given details. + * + * @since Qpid JMX API 1.7 + * + * @param username The username to create + * @param password The password for the user + * @param read The set of permission to give the new user + * @param write The set of permission to give the new user + * @param admin The set of permission to give the new user + * + * @return The result of the operation + */ + @MBeanOperation(name = "createUser", description = "Create a new user.", + impact = MBeanOperationInfo.ACTION) + boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username, + @MBeanOperationParameter(name = "password", description = "Password")String password, + @MBeanOperationParameter(name = "read", description = "Administration read")boolean read, + @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write, + @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin); + + /** * View users returns all the users that are currently available to the system. * * @param username The user to delete |