## 4 Related Work
### Portability Core (PoCo)
#### 5.5.1 Personalised Behaviours  
In personalised behaviours, the communication between the PoCo and the CoAP networks uses the standard DTLS with client certificate authentication, and the communication between user applications and the PoCo uses SSL/TLS. Therefore, the communication channel on both sides can be encrypted, enabling user authentication, and location access control. Security and privacy problems in the IoT, such as applying security patches, physical attacks on the sensor, data leakage, side channel attacks and intrusive sensing are beyond the scope of this paper. To establish a relationship between CoAP networks and physical spaces, the system makes use of the user location to find the nearby infrastructure for each user. The location can be established by end users through the Near Field Communication (NFC) technology. NFC is a short-range identification technology which provides a secure and easy communication and is widely available in multiple devices such as smartphones, thereby it can be used in multiples devices without external hardware requirements. Once a location has been established, the PoCo gets the resources that the user has rights to through a DTLS connection, with client certificate authentication for the CoAP network in the case of a secure configuration. These resources are converted into behaviours for the user applications in the Appdaptivity flows. In a non-secure configuration, the PoCo just returns the available resources of the established location. Tracking user presence in real-time is a hard problem and is also beyond the scope of this paper. The secure configuration is done through access control lists (ACL) by the physical infrastructure, in this case by the CoAP++ framework; refer to this paper [34] for more information. Encrypted and read-only NFC tags only tell Appdaptivity that a certain user is in a certain location, which can also be done with other identification technologies. Nevertheless, NFC is an identification technology present in many today smartphones, which provides capabilities for security identification. In the case that a user has rights over the resources of this location; the user will receive the associated behaviours to these resources. Therefore, once the location has been established and the user has rights to that location, the authorisation is given indefinitely, i.e., if the user does not establish a new location he/she can move to other physical locations and will have the previously established logic location. Moreover, in the case that users want access to all the locations where he/she has rights in a CoAP network, the building flow give users the opportunity to interact with all their available locations, thus Appdaptivity is not location-strict. Therefore, in the case that a smartphone application is targeted such as a user application, end users can establish their locations through their smartphones and the NFC tags located in each physical space. When the location has been established, user applications automatically obtain the resources belonging to the location in the terms defined in the behaviours in PoCo, e.g., list of values in real-time, charts, and so on. As discussed, this also requires a configured location resource in each CoAP server to know each server location, but it can be done without a performance lost with EC-IoT [33]. An example of the communication process to interact with a light actuator in a physical location is presented in Figure 5, specifically the system has been deployed in local mode with access control enabled. The communication starts with a connection between an user application and the PoCo (1). Once the connection has been established, the user application starts to discover RDs in the network (2). When a new RD has been discovered, it is sent to the PoCo (3) and an observation to the resources and end points is established (4). From this moment on, end users can establish their location with the NFC tags of each physical Personalised Behavioural space.