com.sun.identity.security
Class AdminDNAction
java.lang.Object
|
+--com.sun.identity.security.AdminDNAction
- All Implemented Interfaces:
- java.security.PrivilegedAction
- public class AdminDNAction
- extends java.lang.Object
- implements java.security.PrivilegedAction
The class is used to perform privileged operations using
java.security.AccessController.doPrivileged()
when using com.iplanet.am.util.AdminUtils
to obtain Admin DN. This class implements the interface
java.security.PrivilegedAction
with a non-default constructor.
This class should be used in order to perform the privileged operation of
com.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 IS can be enabled by setting the
property com.sun.identity.security.checkcaller
to true in
AMConfig properties file.
Constructor Summary |
AdminDNAction()
Non default constructor to be used when a doPrivileged()
is performed for the decryption operations. |
Method Summary |
java.lang.Object |
run()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdminDNAction
public AdminDNAction()
- Non default constructor to be used when a doPrivileged()
is performed for the decryption operations.
run
public java.lang.Object run()
- Specified by:
run
in interface java.security.PrivilegedAction