# Security Architecture for Swarms of Autonomous Vehicles in Smart Farming
## 3 Results
### Security Architecture for Swarms of Autonomous Vehicles
#### 3.2.4 Protection against Unauthorised Users  
Access control or authorisation is a cybersecurity method that regulates which users (i.e., human beings, autonomous agents, etc.) can have access to resources in a computing environment. Although closely related to authentication, the purpose of authorisation is different. While authentication confirms the identity of users, authorisation assigns roles and permissions to users once they have been authenticated. Authorisation on its own is not sufficient, and it is also important to determine what actions, if any, authenticated users are authorised to perform. One of the most common access control models today is Role-Based Access Control (RBAC), which ensures that only authorised users are given access to certain resources. A role is associated with specific responsibilities, while a permission is an authorisation to carry out an action. A role can have multiple permissions associated with it. System administrators can create roles, can grant permissions to those roles and can assign users to those roles. A violation of role assignation could be detected by machine learning techniques, e.g., advance classifiers based on competitive learning [38]. In the case under study, various mechanisms are proposed to be implemented to control user access and role assignation:  
* Communication channel A: in this case, the LDAP server proposed would be responsible for granting access to the operator after the user has been authenticated. As explained in Section 3.2.2, LDAP servers include not only user identification information but also assigned groups and network access rights. The process starts when the user provides his/her credentials to the Mission Console for validation. Once validated, the user is granted access to the Mission Console according to the defined role. * Communication channel B: the management of user access to the REST API offered by the SWARM Controller can be addressed from different points of view: (a) restricting supported HTTP methods, so that connecting clients have access to the minimum capabilities required for the service only; (b) using HTTP security headers to specify the security-related details of HTTP communication, which provides a good method to protect a web application against common attacks such as Cross-Site Scripting (XSS) [39] and Clickjacking [40]; (c) validating permitted content types, specifying allowed types in both the Content-Type and the Accept header (including the charset is also a good practice); (d) validating input data so that any request that does not conform to the API specification is rejected; and (e) defining API keys that must be provided by clients in order to consume the API. This is common for monetised services. * Communication channel C: user authorisation is managed by a VPN. VPN authorisation is responsible for verifying that users have the authority to access a specified network, granting the requested access when appropriate. In the case under study, users (i.e., the SWARM Controller and all vehicles) must register in the VPN provider website to be granted credentials that guarantee access to the specific Hamachi private network to be deployed. * Communication channel D: authorisation of access to the Data Repository is a privilege provided by the database manager, who is responsible for defining which database operations a user can perform. Privileges can be granted to individual users, to groups or to all users. For example, in SQL databases, users can be granted read, insert, update or delete privileges. Privileges are stored in the database catalogues. As explained in the introduction to this section, one of the most common methods for authorisation management is RBAC, which consists of assigning each database record with a set of permissions linked to roles. The privileges of the users that are members of a role are defined by the role. In the case of the users of the Mission Console, they are granted database privileges either to view or to add new content to the Data Repository depending on their role.