Administration Agent - Application Operations

These are the operations that are directly involved in Application¹ management and to perform these operations the service must be logged in as the DigitalFortress Application.
To check the other agent operations, please look at the Administration Agent definition.

1) Data Contracts

(Due to CodePlex limitations we're not allowed to show the same image as in Administration Agent. Please help us change it and vote in this workitem: Linking to images outside of the Wiki?)

2) Operations

2.1) Application CreateApplication(Application application, String password)

Description

This method is responsible for creating an Application¹ in the security repository with the given password.
This operation is only allowed for DigitalFortress.

Parameters

  • Application application - The application being created.
  • String password - The password is used for authenticating the given application against the services (Authentication, Authorization and Administration). Please advise that only a hash of the password will be saved in the Digital Fortress Security Repository, and as such there's no way of retrieving this password. You can reset it though.

Returns

  • Application - Returns the newly created application.

Dependencies

  • None.

Test Suite:

  1. Test successful creation. accept.gif
  2. Test creation of a null application, resulting in an expected fault (ApplicationRequiredFault). accept.gif
  3. Test creation of two applications with the same name, resulting in an expected fault (ApplicationAlreadyExistsFault). accept.gif
  4. Test creation of an application with no name, resulting in an expected fault (NameRequiredFault). accept.gif
  5. Test creation of an application with no password, resulting in an expected fault (PasswordRequiredFault). accept.gif
  6. Test creation of an application with no e-mail, resulting in an expected fault (EmailRequiredFault). accept.gif
  7. Test creation of an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.2) Int32 RetrieveApplicationCount()

Description

This method is responsible for retrieving the total number of Application¹ objects in the security repository.
This operation is only allowed for DigitalFortress.

Parameters

  • None.

Returns

  • Int32 - Returns the number of applications.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval. accept.gif
  2. Test retrieval of application count logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.3) Application RetrieveApplication(Guid applicationId)

Description

This method is responsible for retrieving an Application¹ in the security repository based on its unique id.
This operation is only allowed for DigitalFortress.

Parameters

  • Guid applicationId - The application id to be retrieved.

Returns

  • Application - Returns the retrieved application. Returns null if the id doesn't exist.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval. accept.gif
  2. Test retrieval of an application with Guid.Empty id, which returns null. accept.gif
  3. Test retrieval of an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.4) Application RetrieveApplicationByName(String name)

Description

This method is responsible for retrieving an Application¹ in the security repository based on its name.
This operation is only allowed for DigitalFortress.

Parameters

  • String name - The name of the application to be retrieved.

Returns

  • Application - Returns the retrieved application. Returns null if the application doesn't exist.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval. accept.gif
  2. Test retrieval of an application with an invalid name, which returns null. accept.gif
  3. Test retrieval of an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault).cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.5) Application[] RetrieveApplicationsByEmail(String email)

Description

This method is responsible for retrieving all the Application¹ entities in the security repository based on their e-mail.
This operation is only allowed for DigitalFortress.

Parameters

  • String email - The e-mail of the applications to be retrieved.

Returns

  • Application[] - Returns the retrieved applications array. Returns empty array if no applications were found.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval. accept.gif
  2. Test retrieval of an application with invalid e-mail, returning an empty array. accept.gif
  3. Test retrieval of an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.6) Application[] RetrieveAllApplications()

Description

This method is responsible for retrieving all the applications in the security repository.
This operation is only allowed for DigitalFortress.

Parameters

  • None.

Returns

  • Application[] - Returns all the applications. Returns an empty array if none is found.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval. accept.gif
  2. Test successful retrieval with no applications. accept.gif
  3. Test retrieval of all the applications logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.7) Application[] RetrieveSlicedApplications(Int32 currentPage, Int32 pageSize)

Description

This method is responsible for retrieving the applications in the security repository, in the given page with the given page size.
This operation is only allowed for DigitalFortress.

Parameters

  • Int32 currentPage - Current page.
  • Int32 pageSize - The number of items to return for the current page.

Returns

  • Application[] - Returns an array of the roles in the current application, in the given page.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval with at least 5 applications. Retrieve currentPage 1 with pageSize 3, and currentPage 2 with pageSize 3. In the first query the return must containt 3 applications, in the second query the return must contain 2 applications. accept.gif
  2. Test retrieval with pageSize equal to 0, resulting in an expected fault (InvalidPageSizeFault). accept.gif
  3. Test retrieval with currentPage equal to 0, resulting in an expected fault (InvalidCurrentPageFault). accept.gif
  4. Test retrieval of an invalid page. Using the first test case, try to retrieve page 3, resulting in an expected fault (PageOutOfRangeFault). accept.gif
  5. Test retrieval of the applications logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault). cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

2.8) Application RetrieveCurrentApplication() cancel.gif (Waiting Security Implementation - Discussion at Agent Authentication)

Description

This method is responsible for retrieving the currently logged Application¹.
This operation is public.

Parameters

  • None

Returns

  • Application - Returns the currently logged application.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful retrieval.

2.9) Application UpdateApplication(Application application)

Description

This method is responsible for updating an Application¹ in the security repository.
This method is only allowed for DigitalFortress or if the application being updated is equal to the one currently logged.

Parameters

  • Application application - The application being updated.

Returns

  • Application - Returns the updated application.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful updating.
  2. Test updating a null application, resulting in an expected fault (ApplicationRequiredFault).
  3. Test updating an application that does not exist (invalid applicationId), resulting in an expected fault (ApplicationNotFoundFault).
  4. Test updating an application to have the same name of an existing one, resulting in an expected fault (ApplicationAlreadyExistsFault).
  5. Test updating an application with no name, resulting in an expected fault (NameRequiredFault).
  6. Test updating an application with no e-mail, resulting in an expected fault (EmailRequiredFault).
  7. Test updating an application logged as an application that's not DigitalFortress or the same application being updated, resulting in an expected fault (OperationNotAllowedFault).

2.10) void DeleteApplication(Application application)

Description

This method is responsible for deleting an Application¹ from the security repository.
PLEASE ADVISE THAT ALL RELATED DATA WILL BE DELETED: USERS, ROLES, MEMBERSHIPS AND ASSOCIATIONS BETWEEN USERS AND ROLES.
This method is only allowed for DigitalFortress.

Parameters

  • Application application - The application being deleted.

Returns

  • void.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful deletion. (This test must verify that all users, roles, associations between users and roles, and memberships have been removed as well)
  2. Test deleting an application that does not exist (invalid applicationId), resulting in an expected fault (ApplicationNotFoundFault).
  3. Test deleting a null application, resulting in an expected fault (ApplicationRequiredFault).
  4. Test deleting an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault).

2.11) Application UpdateApplicationPassword(Application application, String oldPassword, String newPassword)

Description

This method is responsible for changing an Application¹'s password to the given password.
This method is only allowed for DigitalFortress or if the application being updated is equal to the one currently logged.

Parameters

  • Application application - The application being updated.
  • String oldPassword - The current password. Please advise that this password MUST match the current one, or else a fault will be returned.
  • String newPassword - The new password.

Returns

  • Application - Returns the updated application.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful updating.
  2. Test updating the password of a null application, resulting in an expected fault (ApplicationRequiredFault).
  3. Test updating the password of an application that doesn't exist, resulting in an expected fault (ApplicationNotFoundFault).
  4. Test updating the password using a wrong current password, resulting in an expected fault (CurrentPasswordDoesNotMatchFault).
  5. Test updating the password using a blank new password, resulting in an expected fault (PasswordRequiredFault).
  6. Test updating the password logged as an application that's not DigitalFortress or the same application being updated, resulting in an expected fault (OperationNotAllowedFault).

2.12) void ResetApplicationPassword(Guid applicationId)

Description

This method is responsible for reseting an Application¹'s password to a random password.
This method is only allowed for DigitalFortress or if the application being updated is equal to the one currently logged.
Please advise that the DigitalFortress application user never gets to see the newly generated password, which is sent to the registered application's e-mail.

Parameters

  • Guid applicationId - The application id being reset.

Returns

  • void.

Dependencies

  • 2.1 - Test successful creation.

Test Suite:

  1. Test successful reset. Verify that an e-mail is sent to the user.
  2. Test resetting the password of a Guid.Empty application Id, resulting in an expected fault (ApplicationRequiredFault).
  3. Test resetting the password of an application that doesn't exist, resulting in an expected fault (ApplicationNotFoundFault).
  4. Test resetting the password of an application logged as an application that's not DigitalFortress, resulting in an expected fault (OperationNotAllowedFault).

¹Please refer to the Data Contracts image for clarifications on this contract.

Last edited Jun 25, 2007 at 2:23 AM by Heynemann, version 31

Comments

No comments yet.