public class ServerInstanceAction extends Object implements PrivilegedAction
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.
Modifier and Type | Field and Description |
---|---|
protected Debug |
debug |
protected ServerInstance |
sInstance |
Constructor and Description |
---|
ServerInstanceAction(ServerInstance si)
Non default constructor to be used when a doPrivileged() is performed for
the decryption operations.
|
protected Debug debug
protected ServerInstance sInstance
public ServerInstanceAction(ServerInstance si)
si
- ServerInstance objectpublic Object run()
run
in interface PrivilegedAction
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.