public final class AccessControl
extends java.lang.Object
| Constructor and Description |
|---|
AccessControl(PAMService service,
APIRequestHandler rest) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
approvePasswordRequests(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String requesterName)
Approve the password request for account requested by user
|
boolean |
checkInasAdmin(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String requesterName)
Check in the password requested for account from user by admin
|
boolean |
checkInasUser(java.lang.String resourceName,
java.lang.String accountName)
Check in the password requested for account by user
|
java.lang.String |
checkOut(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String reason)
Check out the password requested for account
|
long |
getAccountId(java.lang.String resourceName,
java.lang.String accountName)
to get account id of particular resource
|
java.util.List<PasswordRequestDetails> |
getPasswordRequests()
Get the password requests waiting to be approved
|
java.util.List<PasswordRequestDetails> |
getPasswordRequests(java.lang.String reason,
long ticketId)
Get the password requests waiting to be approved
|
boolean |
rejectPasswordRequest(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String requesterName)
Reject the password request for account requested by user
|
java.lang.String |
requestPasswordApproval(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason)
Send request for password approval for an account
|
public AccessControl(PAMService service, APIRequestHandler rest) throws SDKRegistrationException
SDKRegistrationExceptionpublic java.lang.String requestPasswordApproval(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
resourceName - mandatory, not null name of resource to be requested for approvalaccountName - mandatory, not null name of account to be requested for approvalreason - reason for password requestSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic java.util.List<PasswordRequestDetails> getPasswordRequests() throws SDKConnectionException, SDKOperationFailedException
PasswordRequestDetailsSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messagepublic java.util.List<PasswordRequestDetails> getPasswordRequests(java.lang.String reason, long ticketId) throws SDKConnectionException, SDKOperationFailedException, SDKInvalidArgumentException
reason - mandatory,the reason for getting password requestticketId - pass the appropriate ticket id if ticketing system is enabled or pass -1RequestedEntitySDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if reason argument is null or emptypublic boolean rejectPasswordRequest(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String requesterName)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
accountName - mandatory,not null name of account for which access request was sent toresourceName - mandatory,not null name of reosurce for which access request was sent torequesterName - mandatory,not null name of user who requested password approvaltrue if password request has been rejectedSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic boolean approvePasswordRequests(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String requesterName)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
accountName - mandatory,not null name of account for which the access was requestresourceName - mandatory,not null name of user who requested password approvalrequesterName - mandatory,not null name of user who requested password approvalSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic boolean checkInasAdmin(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String requesterName)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
resourceName - mandatory,not null name of account whose password has to be checked inaccountName - mandatory,not null name of user who requested passwordrequesterName - mandatory,not null name of user who requested passwordSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic boolean checkInasUser(java.lang.String resourceName,
java.lang.String accountName)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
resourceName - mandatory,not null name of resource whose password has to be checked inaccountName - mandatory,not null name of account whose password has to be checked inSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic java.lang.String checkOut(java.lang.String accountName,
java.lang.String resourceName,
java.lang.String reason)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException,
SDKRegistrationException
accountName - mandatory,not null name of account whose password has to be checked outresourceName - mandatory,not null name of account whose password has to be checked outreason - reason for checkout, would be mandatory in case where admin demands a reasonSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedSDKRegistrationExceptionpublic long getAccountId(java.lang.String resourceName,
java.lang.String accountName)
throws SDKRegistrationException,
SDKConnectionException,
SDKInvalidArgumentException,
SDKOperationFailedException
resourceName - mandatory,not null,name of the resource the account belogs to.accountName - mandatory,not null,name of the accountSDKRegistrationExceptionSDKConnectionExceptionSDKInvalidArgumentExceptionSDKOperationFailedException