Step 2. A multi-domain system for data encapsulation
Let us add detail to step 1 by including the domain tree in the consideration.
Domains exist in a tree structure of arbitrary depth. Each domain has a parent domain. Only one domain has no parent: the master domain. The master domain is the root for all other domains. It has a special composition of entity types that differs from other domains. The master domain ensures the functioning of the domain tree and a number of centralized system management functions.
Any domain can contain child domains. Their composition is managed by the administrator of the current domain. When creating a child domain, the administrator allocates part of their domain’s licenses to it; thus quantitative licenses are distributed from the master domain across the entire tree. The master domain itself receives them from the license file. Domain names contain only lowercase Latin letters, digits, hyphens, underscores, and dots as separators. For example, domain.r2 can contain child domains a1.domain.r2, 123.domain.r2, and so on. At the same time, the master domain administrator, if the corresponding license capability exists, can assign arbitrary names to child domains. Child domains of the master domain belong to the category of first-level domains.
Case: an administrator of a first-level domain creates a child second-level domain and gives the child domain administrator a login and password in it.
Following the actions of step 1, administrator A creates child domain B. A database is created for it in DomainDB. What credentials should be provided to administrator B?
For administrator B to be able to do anything in domain B, domain B must authorize them and therefore contain their account. Administrator A cannot gain access to domain B because they are the administrator of domain A and are not an administrator in the newly created domain B.
Two independent approaches are available to solve this task:
-
Domain databases are not created from scratch but copied from the domain template database (DTDB) together with its contents. It is enough to create an admin-admin account in the DTDB, as is customary on equipment, and the created domain will contain an account with these default login and password. This account can be used to change its password, or to create a new account and delete this one.
-
Administrator A performs a CRUD request to create an account in the child domain using the /api/crud/v1/domainuser/create method. Thus administrator A can set arbitrary login and password for administrator B’s account. Administrator A can also perform other CRUD requests on user accounts of child domains.
Now WS can independently process requests from administrators of both domains: each administrator manages only the entities of their own domain (except for the domainuser case). If each of them, for example, creates another child domain, the domain tree scheme and the service sequence will be as follows (see figure)
DC owns information about all domains and their entities and provides access to it to the system’s internal services. This is the main purpose of this role.
| Term | Definition |
|---|---|
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
-
What is the root of the domain tree?
-
Which domain can contain child domains?
-
What variants exist for creating a user account in a child domain?
-
How can the domain google.com be created?
-
Next step: Step 3. A multi-server system
-
Previous step: Step 1. Making something useful work