UserPasswordEditorMBean (Abstract)
Overview | Related MBeans | Attributes | Operations
Overview
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); .....
Fully Qualified Interface Name If you use the getMBeanInfo operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name:
weblogic.management.security.authentication.UserPasswordEditorMBean
Factory Methods No factory methods. Instances of this MBean are created automatically. Subtypes The following MBeans extend or implement this MBean type:
Operations
This section describes the following operations:
changeUserPassword
Used by a user to change his or her password.
Operation Name "changeUserPassword"
Parameters Object [] { userName, oldPassword, newPassword }
where:
userName is an object of type
java.lang.String that specifies:
- The name of an existing user.
oldPassword is an object of type
java.lang.String that specifies:
- The current password for the user.
newPassword is an object of type
java.lang.String that specifies:
- The new password for the user. The Authentication provider determines the syntax requirements for passwords.
Signature String [] { "java.lang.String", "java.lang.String", "java.lang.String" }
Returns void
Exceptions
weblogic.management.utils.NotFoundException
weblogic.management.utils.InvalidParameterException
isSet
Returns true if the specified attribute has been set explicitly in this MBean instance.
Operation Name "isSet"
Parameters Object [] { propertyName }
where:
propertyName is an object of type
java.lang.String that specifies:
property to check
Signature String [] { "java.lang.String" }
Returns boolean
Exceptions
java.lang.IllegalArgumentException
resetUserPassword
Used by an administrator to change a user's password.
Operation Name "resetUserPassword"
Parameters Object [] { userName, newPassword }
where:
userName is an object of type
java.lang.String that specifies:
- The name of an existing user.
newPassword is an object of type
java.lang.String that specifies:
- The new password for the user. The Authentication provider determines the syntax requirements for passwords.
Signature String [] { "java.lang.String", "java.lang.String" }
Returns void
Exceptions
weblogic.management.utils.NotFoundException
weblogic.management.utils.InvalidParameterException
unSet
Restore the given property to its default value.
Operation Name "unSet"
Parameters Object [] { propertyName }
where:
propertyName is an object of type
java.lang.String that specifies:
property to restore
Signature String [] { "java.lang.String" }
Returns void
Exceptions
java.lang.IllegalArgumentException
UnsupportedOperationException if called on a runtime implementation.
wls_getDisplayName
Operation Name "wls_getDisplayName"
Parameters null
Signature null
Returns String