Package com.sun.identity.security
Class ServerInstanceAction
- java.lang.Object
-
- com.sun.identity.security.ServerInstanceAction
-
- All Implemented Interfaces:
PrivilegedAction
public class ServerInstanceAction extends Object implements PrivilegedAction
The class is used to perform privileged operations usingAccessController.doPrivileged()when usingcom.iplanet.services.ldap.ServerInstanceto obtain Admin passwords. Ths class implements the interfacePrivilegedActionwith a non-default constructor. This class should be used in order to perform the privileged operation ofcom.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.checkcallerto true in AMConfig properties file.
-
-
Field Summary
Fields Modifier and Type Field Description protected Debugdebugprotected ServerInstancesInstance
-
Constructor Summary
Constructors Constructor Description ServerInstanceAction(ServerInstance si)Non default constructor to be used when a doPrivileged() is performed for the decryption operations.
-
-
-
Field Detail
-
debug
protected Debug debug
-
sInstance
protected ServerInstance sInstance
-
-
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
-
-
Method Detail
-
run
public Object run()
- Specified by:
runin interfacePrivilegedAction
-
-