# Secure Authentication and Credential Establishment in Narrowband IoT and 5G
## 4 The Use Case of Precise Agriculture
Moreover, cyber-criminals have already discovered the potential of exploiting vulnerabilities of IoT devices as tools to attack industrial sectors such as agriculture. Farmers especially are vulnerable to cyber-attacks because they do not have the knowledge and capacity to setup and maintain connected IoT devices in a secure and trustworthy manner. For these reasons, security is the biggest risk of IoT deployment in the agriculture sector. Regarding the features of precise agriculture, this use case presents an excellent environment for showing the importance of the proposed security solution for the deployment and secure communications of IoT devices with NB-IoT technology. In this environment, IoT devices are deployed to collect sensitive agriculture data that must be sent to data-driven decision support systems so that they can perform automatic actions that optimise the efficiency of critical resources (i.e., water, soil, and nutrients). In precise agriculture, the use of IoT technologies requires addressing security aspects related to the deployment and setup of the communications of constrained devices with low-power wireless technologies [40]. The proposed environment is a real pilot farm located in Santomera (Southeast of the Murcia Region, Spain). The environment is presented in Figure 3, where the locations of several deployed IoT devices are plotted. This screen-shot was captured from the data-driven agriculture platform for the precise irrigation of crops. The data-driven platform creates automatic actions regarding the gathered data from the IoT devices. For data gathering, IoT devices were deployed to monitor several features of agricultural crops, such as water consumption, soil moisture, and weather conditions. Each IoT device acts as a data source collecting agricultural information from the field and sends the corresponding data to the smart platform employing Internet protocols (i.e., CoAP). All data from IoT devices are accessible to end users through the web interface of the smart platform located in the cloud. Nevertheless, these data may be compromised by cyber-attacks in the case that security mechanisms are not integrated. Therefore, this specific agriculture scenario is used for the demonstration of the proposed security solution integrating a group of modules to allow the secure data communication between IoT devices and the data-driven platform. To reach that, the presented use case develops our bootstrapping solution integrating the LO-CoAP-EAP protocol in NB-IoT technology for the secure authentication and credential establishment. Below, the bootstrapping procedure is described to enable the secure joining of IoT devices when they are deployed in the network and application domains. This bootstrapping generates the needed credentials between the IoT device and the IoT controller using the LO-CoAP-EAP implementation, as shown in Figure 4. In the figure, multiple IoT devices are deployed to communicate with the IoT controller through an NB-IoT base station connected to a 4G/5G core network. The IoT controller is in charge of authenticating the new IoT devices and supporting the secure data communications with the agriculture platform through protected channels. The procedure consists of the following steps: first, an IoT device must be authenticated against the serving network to start the connection with the IoT controller before sending any data to the application domain. Once the IoT device is connected to the NB-IoT base station (i.e., gNB), the IoT device begins the authentication using the bootstrapping protocol with the IoT controller through the NB-IoT gNB (Stage 1.A). In the case, the IoT device belongs  
Figure 3: Screen-shot of a precise agriculture platform. to a local organization, and the IoT controller will connect the local AAA server using the RADIUS protocol (Stage 1.B), as abovementioned. Otherwise, for external organizations, the IoT controller will go to the global AAA server of the IoT device organization (Stage 1.C), as described in our previous papers [10; 30].