Package com.sun.identity.security
Class AdminDNAction
- java.lang.Object
-
- com.sun.identity.security.AdminDNAction
-
- All Implemented Interfaces:
PrivilegedAction
public class AdminDNAction extends Object implements PrivilegedAction
The class is used to perform privileged operations usingjava.security.AccessController.doPrivileged()when usingcom.iplanet.am.util.AdminUtilsto obtain Administrator DN. This class implements the interfacejava.security.PrivilegedActionwith a non-default constructor. This class should be used in order to perform the privileged operation ofcom.iplanet.am.util.AdminUtils.getAdminDN().This line of code: String adminDN = com.iplanet.am.util.AdminUtils.getAdminDN(); should be replaced with: String adminDN = (String) AccessController.doPrivileged( new AdminDNAction()); 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.
-
-
Constructor Summary
Constructors Constructor Description AdminDNAction()Default constructor
-
-
-
Method Detail
-
run
public Object run()
- Specified by:
runin interfacePrivilegedAction
-
-