Oracle Fusion Middleware
Oracle WebLogic Server 10.3.1 API Reference
11g Release 1 (10.3.1)

Part Number E13941-02

weblogic.management.security.authentication
Interface UserPasswordEditorMBean

All Known Subinterfaces:
UserEditorMBean

public interface UserPasswordEditorMBean

Provides two methods for changing a user's password. An Authentication provider MBean can optionally implement this MBean. The WebLogic Server Administration Console detects when an Authentication provider implements this MBean and automatically provides a tab for using these methods.

CSS v4 introduced a new Password Validaton Service to check password against a set of rules when doing changing password operations with authentication provider MBeans such as createUser, changeUserPassword and resetUserPassword. The rules can be specified through configuring Password Validation Provider into the security realm, for further information, see weblogic.management.security.RealmMBean.

All OOTB authentication providers in CSS will automatically call the Password Validation Service if their MBeans inherit UserPasswordEditorMBean interface. The service is also available for all those customized authentication providers whose MBeans inherit UserPasswordEditorMBean, to introduce the Password Validation Service into a customized authentication proivder, the following approach must be met:

1. In the initialize method of a customized provider implementation, must retrieve the Password Validation Service and register the service into a helper class such as weblogic.security.provider.authentication.AuthenticationSecurityHelper, the code might like as below:

 import com.bea.common.security.service.PasswordValidationService;
 import com.bea.common.security.legacy.ExtendedSecurityServices;
 import com.bea.common.security.internal.legacy.helper.PasswordValidationServiceConfigHelper;
 import weblogic.security.provider.authentication.AuthenticationSecurityHelper;
 ......
 ExtendedSecurityServices extendedSecurityServices = (ExtendedSecurityServices)securityServices;
 PasswordValidationService serivce = (PasswordValidationService)extendedSecurityServices.getServices().
                                           getService(PasswordValidationServiceConfigHelper.getServiceName(providerMBean.getRealm()));
 AuthenticationSecurityHelper.getInstance(providerMBean).registerPasswordValidationService(service);
 ......
 

2. In the createUser, changeUserPassword and(or) resetUserPassword methods of a customized authentication provider MBean, call the helper class to validate the new password to determine if the new password is valid. The code might be:

 import weblogic.security.provider.authentication.AuthenticationSecurityHelper;
 .....
 AuthenticationSecurityHelper.getInstance(providerMBean).validatePassword(userName,password);
 .....
 

Deprecation of MBeanHome and Type-Safe Interfaces

In addition to being used as a base class that provides functionality to security provider MBeans, JMX applications can use this class directly as a type-safe interface. When used as a type-safe interface, a JMX application imports this class and accesses it through weblogic.management.MBeanHome. As of 9.0, the MBeanHome interface and all type-safe interfaces for WebLogic Server MBeans are deprecated. Instead, JMX applications that interact with WebLogic Server MBeans should use standard JMX design patterns in which clients use the javax.management.MBeanServerConnection interface to discover MBeans, attributes, and attribute types at runtime.


Method Summary
 void changeUserPassword(String userName, String oldPassword, String newPassword)
          Used by a user to change his or her password.
 void resetUserPassword(String userName, String newPassword)
          Used by an administrator to change a user's password.
 

Method Detail

changeUserPassword

void changeUserPassword(String userName,
                        String oldPassword,
                        String newPassword)
                        throws NotFoundException,
                               InvalidParameterException
Used by a user to change his or her password.

Parameters:
userName - - The name of an existing user.
oldPassword - - The current password for the user.
newPassword - - The new password for the user. The Authentication provider determines the syntax requirements for passwords.
Throws:
NotFoundException
InvalidParameterException

resetUserPassword

void resetUserPassword(String userName,
                       String newPassword)
                       throws NotFoundException,
                              InvalidParameterException
Used by an administrator to change a user's password.

Parameters:
userName - - The name of an existing user.
newPassword - - The new password for the user. The Authentication provider determines the syntax requirements for passwords.
Throws:
NotFoundException
InvalidParameterException

Documentation is available at
http://download.oracle.com/docs/cd/E12839_01/web.1111/wls.htm
Copyright 1996, 2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server 10.3.1 API Reference
11g Release 1 (10.3.1)

Part Number E13941-02