# Cross-Domain Access Control Model in Industrial IoT Environment
## 3 Distributed Access Control Model Based on a Master-Slave Chain  
### Distributed Security Architecture Based on Master-Slave Chain  
The master-slave chain-based access control system is designed with a three-layer distributed security architecture, as depicted in Figure 1. The upper layer is the master chain network, serving as the trusted platform for each domain. The middle layer comprises the slave chain network, acting as a reliable access platform within the domain. The lower layer consists of IIoT devices, which provide the function of collecting and accessing resources. The three layers of the architecture work together to accomplish intra-domain and cross-domain access control.  
The dynamic selection mechanism of master chain nodes based on their reputation can ensure the security and reliability of the master chain more effectively. It does so by periodically selecting the node with the highest reputation among all the edge nodes in each domain to become the master chain node. Generally, more honest consensus nodes will have a better chance to become the main chain node to ensure the reliability of the master chain node. The details of the mechanism are discussed in Section 3.2. The slave chain is a reliable access platform within the domain, which records its resources' intra-domain access control processes and access control strategy. The edge nodes within the domain maintain it. Each domain is then composed of edge nodes and IIoT devices within the domain. The Identity Management Server (IMS) IMS provides intra-domain certificate management and issuance, role, attribute, and resource strategy database maintenance.  
Figure 1: System architecture.  
The resource strategy database stores the access control strategies for all resources in the domain. The blockchain can call the access strategy of resources through the resource strategy database to complete the process of matching attributes and help in access control.  
Intra-domain access control is the access control among different devices within the same domain. It is divided into three main steps:  
1. The device sends an intra-domain access request to the edge device;
2. After the edge device receives the request, it first checks the identity and then calls the access control smart contract to complete the matching process of attributes and strategies, and finally returns the access token;
3. The device completes the access control of resources through the access token.  
Cross-domain access control refers to access control among the devices of different domains. It is divided into five main steps:  
1. The device sends a cross-domain access control request to the edge device;
2. After receiving the request, the edge device first performs an identity check on the device and then sends the cross-domain access control request to the master chain node;
3. After receiving the request, the master chain node calls the cross-domain access smart contract to first check the node role information, then matches the attributes with the strategy, and finally, generates the access token;
4. After the master chain node generates the access token, it sends it to the device through the edge node;
5. The device completes the cross-domain access control process through the access token.