public class DecryptAction extends Object implements PrivilegedAction
AccessController.doPrivileged()
when using
com.iplanet.am.util.AMPasswordUtil to decrypt 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.AMPasswordUtil.decrypt().
This line of code: String encStr =
com.iplanet.am.util.AMPasswordUtil.decrypt(str); should be replaced with:
String encStr = (String) AccessController.doPrivileged( new
DecryptAction(str)); 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 and Description |
|---|
DecryptAction(String svalue)
Non default constructor to be used when a
doPrivileged()
is performed for the decryption operations. |
protected String value
public DecryptAction(String svalue)
doPrivileged()
is performed for the decryption operations.svalue - Value of string to be encoded/decodedpublic Object run()
run in interface PrivilegedActionCopyright © 2010–2023 Open Identity Platform Community. All rights reserved.