Class ServerInstanceAction

  • All Implemented Interfaces:
    PrivilegedAction

    public class ServerInstanceAction
    extends Object
    implements PrivilegedAction
    The class is used to perform privileged operations using AccessController.doPrivileged() when using com.iplanet.services.ldap.ServerInstance to obtain Admin 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.services.ldap.ServerInstance.getPasswd().
     
     This line of code: String encStr =
     com.iplanet.services.ldap.ServerInstance.getPasswd(); should be replaced
     with: String encStr = (String) AccessController.doPrivileged( new
     ServerInstanceAction(svrInstance)); 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 Detail

      • ServerInstanceAction

        public ServerInstanceAction​(ServerInstance si)
        Non default constructor to be used when a doPrivileged() is performed for the decryption operations.
        Parameters:
        si - ServerInstance object