Step 1. Making something useful work

Let us consider the simplest system running on a single server. It runs one instance of the platform (the program).

Case: a domain administrator calls an API method to create another user’s account.
ws dc

The web server (the WS role) is an application of the «Incoplax» platform that opens an HTTP port on the server to serve the API and processes incoming API requests. An HTTP request arrives, is processed, a response is sent, and the connection is closed. The main data format in all APIs is JSON.

The bulk of WS's useful actions are performed only after authorization (the "security" quality attribute). Authorization can be performed by a separate API request, creating a session based on cookies, or the authorization parameters can be specified in each API request to the system: login and password. The system must know in advance that this user exists. It knows about the user through the user account entity (user), which is contained in one of the domains. Thus, to execute the API, the user must specify their domain, login, and password.

A domain administrator is a special user whose account is assigned a role allowing them to execute requests for managing domain entities, in particular viewing, creating, deleting, and modifying (CRUD) accounts of other domain users.

seq ws dc simple

or in more detail

seq ws dc

So:

  1. The domain administrator makes an HTTP request to the server with the installed system on the HTTP port opened by the web server. They send it to the account management page (/api/crud/v1/user/create). In the API request, they specify the domain, login, password, and other parameters of the specific API method (in this example, data).

  2. WS checks whether the specified account exists in the domain by querying the domain center (the DC role).

  3. If the account has a role allowing it to execute requests for managing domain entities, WS authorizes the request and passes it to the domain center for execution. Otherwise, an error response is returned to the API request.

  4. The domain center checks the request parameters and performs the CRUD operation of creating a user account in the administrator’s domain. If the parameters are incorrect, an error response is returned to the API request (containing the reason). Then it

    1. stores the account in its RAM,

    2. sends a request to add the user to the users table in the DB of this domain connected to the domain center,

    3. records the operation in the change history table of the same DB, mentioning all [modified] fields.

Child domains are created in a similar way. The complicating difference, important at this stage, is that creating a domain includes creating a new database in DomainDB. Accordingly, the request takes longer and has more error variants.

Table 1. Terms used
Term Definition

WS

!

DC

!

Domain Database (DomainDB)

!

Access role (Role)

!

User

!

CRUD

!

Domain DB

!

Domain entities

!

Change history table

!

Users table

!

Review questions
  1. Which role serves web API requests?

  2. What authorization methods exist for executing requests?

  3. What data must be specified for authorization?

  4. Which access role must a user have to create a new user account?

  5. Which role performs the account creation operation?