# A Trustworthy Communication Hub for Cyber-Physical Systems
## 5 Solutions of the CPS Communication Hub
### Trust Checking Services for the Information-Based Interaction  
The trust checking service is required in order to ensure that information and use of resources are allowed only for the authorized parties, and nobody else. The trust checking procedure of the CPS hub is visualized in Figure 16, and shortly clarified in the following. Figure 15: Information sharing using the publish/subscribe service of the CPS hub. The first step connects the owners to the CPS hub, authentication of the owner, and registration of the presence of the physical resources of the owners. These procedures shall happen as clarified in the Section 5.2 and Figure 13 (XMPP connect), and Section 5.4 and Figure 15 (MQTT connect). After this step, the presence of the physical resources (X@CPShub/A, Y@CPShub/B) is registered as resources of the communication spaces of the owners (X@CPShub and Y@CPShub) in the CPS hub. As a result, the trust checker of the CPS hub knows the identities and presence of the referred resources. In the second step, the trust relationship between the owners (X@CPShub and Y@CPShub) is created using the \"buddy subscription\" procedure; see Section 3.3 and Figure 14. In the case of Figure 16, a resource of the party (X@CPShub/A) subscribes to the acceptance from the other party for the communication with its resource (Y@CPShub/B). If the acceptance agreement is approved by Y, then the procedure is also executed in the other direction. After successful execution of the referred buddy subscription, the related owners (X and Y in Figure 16) have made an agreement that they can interact with each others' resources. As the result, the trust checker of CPS hub has real-time information on the status of agreements between parties, the _grid of agreements_. In the third step, a resource (Y@CPShub/B in the case of Figure 16) subscribes to the information published by some other resource (X@CPShub/A/topic, in this example case). The resource needs to know in one way or another that X is publishing the referred kind of information (\"topic\") in order to enable its subscription. In addition, any resource (like X@CPShub/A, in this example case) can publish information at any time. However, when a resource subscribes to the specific information topic (X@CPShub/A/topic, in this example case), the trust checker will check whether or not the delivery of the information content is allowed for the subscriber. The trust checker of the CPS hub will perform the check based on all the information that it has from the preceeding steps, that is, the identities and presence of the referred resources, grid of agreements, and the level of trust-related issues. In addition, the security/access control policies of the owners (X and Y, in this case) may be checked using an external authorization service such as, for example, SAFAX [23]. For example, an owner may define that a specific information topic can be delivered to other defined owners only in specific situations, like, for example, in an alarm caused by traffic accident or so on. The access control rules defined by the owner can be quite complex, consisting of information about, for example, situation, time, information, and subscriber. As the results, the trust checker of the CPS hub is able to make a decision of whether or not the delivery of the information content is allowed for the subscriber. If the conclusion is that it is allowed, then the information (X@CPShub/A/topic, in this case) is delivered to the subscriber (Y@CPShub/B, in this case). After the trust checking has been executed in an acceptable manner, then the resources may interact and agree separately in the applied data plane, which will be used for end-to-end interaction between the referred resources. After the data plane negotiation, the CPS hub may be bypassed  
Figure 16: Trust checking procedure of the CPS hub. from the communication chain for optimization reasons. In addition, the resources themselves usually have specific security related procedures and authorization required to enable the use of the referred resources.