Class AdminPasswordAction

java.lang.Object
com.sun.identity.security.AdminPasswordAction
All Implemented Interfaces:
PrivilegedAction<String>

@SupportedAll public class AdminPasswordAction extends Object implements PrivilegedAction<String>
The class is used to perform privileged operations using AccessController.doPrivileged() when using com.iplanet.am.util.AdminUtils to obtain Administrator passwords. Ths class implements the interface PrivilegedAction with a non-default constructor. * This class should be used in order to perform the privileged operation of com.iplanet.am.util.AdminUtils.getAdminPassword().
 
 This line of code: String adminDN =
 com.iplanet.am.util.AdminUtils.getAdminDN(); should be replaced with: String
 adminDN = (String) AccessController.doPrivileged( new AdminPasswordAction());
 If this is not done and Java security permissions check is enabled, then the
 operation will fail and return a null everytime.
 
 Note: Java security permissions check for OpenAM can be enabled
 by setting the property com.sun.identity.security.checkcaller to
 true in AMConfig properties file.
 
 
  • Constructor Details

    • AdminPasswordAction

      public AdminPasswordAction()
      Default constructor
  • Method Details