com.ibm.itim.apps.pim
Class CredentialMO

java.lang.Object
  extended by com.ibm.itim.apps.pim.CredentialMO
All Implemented Interfaces:
java.io.Serializable

public class CredentialMO
extends java.lang.Object
implements java.io.Serializable

Managed object representing a credential of an account.

See Also:
Credential, Serialized Form

Constructor Summary
CredentialMO(PlatformContext platform, javax.security.auth.Subject subject, DistinguishedName name)
          This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.
 
Method Summary
 Request connect(AccountMO account, boolean resetPassword, boolean resetPasswordOnCheckin, java.util.Date scheduledTime, java.lang.String justification)
          This API connects a credential to an Account.
 void disconnect()
          This API disconnects the credential from the account.
 AccountMO getAccount()
          This API returns the account that is associated with this credential.
 CredentialLeaseMO getCredentialLease()
          This API returns the credential lease held by the authenticated user for this credential.
 Credential getData()
          This API returns a current snapshot of the credential.
 DistinguishedName getDistinguishedName()
          Returns the distinguished name of the managed object
 java.lang.String getPassword()
          This method gets the password for the credential.
 java.util.Collection<HistoricalPassword> getPasswordHistory()
          This API gets the password history for the credential.
 ServiceInfo getServiceInfo()
          This method gets the credential service for the credential.
 void registerPassword(java.lang.String password)
          This API registers the password for the credential.
 void remove()
          This API removes the credential from the vault.
 void update(Credential credential)
          This API updates the credential with the given credential value object.
 void update(Credential credential, ServiceInfo credService)
          This API updates the credential with the given credential value object and the credential service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialMO

public CredentialMO(PlatformContext platform,
                    javax.security.auth.Subject subject,
                    DistinguishedName name)
This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.

Parameters:
platform - specifies the PlatformContext that holds platform connection information.
subject - specifies the Subject that represents the authenticated caller.
name - specifies the DistinguishedName of the credential.
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Returns the distinguished name of the managed object

Returns:
DistinguishedName of the managed object.

getData

public Credential getData()
                   throws java.rmi.RemoteException,
                          ApplicationException
This API returns a current snapshot of the credential.

Returns:
the Credential object that holds attribute information.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
ApplicationException - This exception is thrown if the API cannot retrieve data.

getCredentialLease

public CredentialLeaseMO getCredentialLease()
                                     throws ApplicationException,
                                            AuthorizationException,
                                            java.rmi.RemoteException
This API returns the credential lease held by the authenticated user for this credential.

Returns:
CredentialLeaseMO which represents the credential lease held by the authenticated user. Returns NULL if there is no credential lease for this credential.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the authenticated user is not authorized to search for the lease.
ApplicationException - This exception is thrown if the API cannot obtain the credential lease.

remove

public void remove()
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This API removes the credential from the vault. If the credential is checked out, an ApplicationException is thrown.

Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
AuthorizationException - This exception is thrown if the user does not have the authority to remove the credential.
ApplicationException - This exception is thrown if the credential is checked out or if an error occurs when removing the credential.

connect

public Request connect(AccountMO account,
                       boolean resetPassword,
                       boolean resetPasswordOnCheckin,
                       java.util.Date scheduledTime,
                       java.lang.String justification)
                throws java.rmi.RemoteException,
                       AuthorizationException,
                       ApplicationException
This API connects a credential to an Account.

Parameters:
account - specifies the account that to be connected
resetPassword - This parameter indicates whether the password for the credential and the account should be reset after the credential is connected to the account.
resetPasswordOnCheckin - This parameter indicates whether the password should be reset when the credential is checked in. This parameter is only applicable when the credential is explicitly set to exclusive. If the credential is set to use the global setting, or not exclusive, or not shared, then this parameter is ignored.
scheduledTime - This parameter specifies the scheduled starting time of the process. If it is null, the process will start immediately. In case this method is invoked remotely, passing this parameter as the current date or time of the client machine is not a safe technique to use, since the date or time of the client machine might not be the same as the date or time of the Security Identity Manager server machine.
justification - This parameter specifies the justification for connecting the credential to the account. The justification will appear in audit trail.
Returns:
The API returns an object that represents the status of the operation. If the schedule time is set for the future, then the request getStatus() will return the current status at that point of time.
Throws:
AuthorizationException - This exception is thrown if the user does not have the authority to remove the credential.
ApplicationException - This exception is thrown if the credential is checked out or if an error occurs when removing the credential.
java.rmi.RemoteException

disconnect

public void disconnect()
                throws java.rmi.RemoteException,
                       AuthorizationException,
                       ApplicationException
This API disconnects the credential from the account. If the credential setting is set to change password during checkin, it will be disabled.

Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
AuthorizationException - This exception is thrown if the user does not have the authority to remove the credential.
ApplicationException - This exception is thrown if the credential is checked out or if an error occurs when removing the credential.

update

public void update(Credential credential)
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This API updates the credential with the given credential value object.

Parameters:
credential - specifies the Credential object that contains the changes that need to be made.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to change the credential.
ApplicationException - This exception is thrown if the API cannot change the credential. This might be caused by the account is removed by another client before this call. This exception can also be thrown if the credential is for a system user, and it is being changed from non-shared mode to shared mode.
java.lang.IllegalArgumentException - This exception is thrown if credential parameter is null or if the credential does not have a distinguished name.

update

public void update(Credential credential,
                   ServiceInfo credService)
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This API updates the credential with the given credential value object and the credential service. The credService parameter will be ignored if it is null or the credential is associated with an account. When the serviceInfo is specified and the credential is not associated with an account, the service UID is a required field that must be passed in. If the service UID is null or an empty string, then IllegalArgumentException is thrown.

Parameters:
credential - specifies the Credential object that contains the changes that are to be made.
credService - The credential service for the credential. This value is ignored if it is null or the credential is associated with an account.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to change the credential.
ApplicationException - This exception is thrown if the API cannot change the credential. This might occur if the account is removed by another client before this call. This exception can also be thrown if the credential is for a system user, and it is being changed from non-shared mode to shared mode.
java.lang.IllegalArgumentException - This exception is thrown for the following conditions. If the credential parameter is null or if the credential does not have a distinguished name. If the credService is not null but the service UID in credService is null or an empty string.
Since:
ISIM 6.1
See Also:
ServiceInfo

registerPassword

public void registerPassword(java.lang.String password)
                      throws java.rmi.RemoteException,
                             AuthorizationException,
                             ApplicationException
This API registers the password for the credential.

Parameters:
password - This parameter specifies the password that is set for the credentials.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to register the password for the credentials.
ApplicationException - This exception is thrown if the API cannot register the password for the credentials.
java.lang.IllegalArgumentException - This exception is thrown if the password parameter is null

getPasswordHistory

public java.util.Collection<HistoricalPassword> getPasswordHistory()
                                                            throws java.rmi.RemoteException,
                                                                   AuthorizationException,
                                                                   ApplicationException
This API gets the password history for the credential.

Returns:
This API returns the password history of the credential.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to get the password history for the credential.
ApplicationException - This exception is thrown if the API cannot retrieve the password history for the credential.
See Also:
HistoricalPassword

getPassword

public java.lang.String getPassword()
                             throws java.rmi.RemoteException,
                                    AuthorizationException,
                                    ApplicationException
This method gets the password for the credential.

Returns:
This method returns the password of the credential. The null will be returned if there is no password registered for the credential.
Throws:
java.rmi.RemoteException - This exception is thrown if this method cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to view the password. The user is not authorized to view the password when one of the following conditions is met:
1. The credential is required to be checked out to view the password, but the credential is not checked out by the user.
2. The credential is not required to be checked out to view the password, but the user is not authorized by the shared access policy.
3. The credential is not a shared credential.
ApplicationException - This exception is thrown if the API cannot retrieve the password for the credential.

getServiceInfo

public ServiceInfo getServiceInfo()
                           throws java.rmi.RemoteException,
                                  AuthorizationException,
                                  ApplicationException
This method gets the credential service for the credential.

Returns:
This method returns the credential service of the credential. If the credential is associated with an account, credential service for the account is returned. If the credential is not associated with any account, credential service for the credential is returned.
Throws:
java.rmi.RemoteException - This exception is thrown if this method cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to view the credential service for the credential.
The user is not authorized to view the credential service when the user does not have permission to read the credential's credential service (erAccount or erCVServiceURI attribute).
ApplicationException - This exception is thrown if the API cannot retrieve the credential service for the credential.

getAccount

public AccountMO getAccount()
                     throws java.rmi.RemoteException,
                            ApplicationException
This API returns the account that is associated with this credential.

Returns:
AccountMO that represents the account.
Throws:
java.rmi.RemoteException - This exception is thrown if the API is unable to communicate with platform.
ApplicationException - This exception is thrown if the API is unable to retrieve the account. The exception can possibly be caused by the account being removed by another client before this call.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.