# Security Architecture for Swarms of Autonomous Vehicles in Smart Farming
## 3 Results
### Security Architecture for Swarms of Autonomous Vehicles
#### 3.2.2 User or System Authentication
The browser checks within its database of trusted certificate authorities, and if the authority that issued the received certificate is within that database, the browser trusts the Mission Console. Then, the browser responds with handshake data encrypted with the public key, which is decrypted by the server using its private key. Once the authentication process finishes, the browser and server negotiate a one-time encryption key to be used during the session. One-time key confidentiality is protected by TLS. * Communication channel B: mutual authentication of the Mission Console and the SWARM Controller can be ensured by the X.509 certificates installed at both ends. To prove their identities, both the Mission Console (the REST client) and the SWARM Controller (the REST server) present their identities in the form of certificates. The client and server initiate a TLS handshake before the actual REST API messages are exchanged. In the case under study, the implementation can be based on the RSA algorithm provided by OpenSSL. Another option for basic REST Server authentication could be to use HTTP Basic Authentication, a method in which credentials (username and password) encoded in Base64 are sent directly in HTTP headers without encryption. This is a very simple authentication method, but since confidential data are transmitted in plain text, it should always be used in combination with HTTPS. * Communication channel C: VPN endpoints must be authenticated before a VPN tunnel is established. Two types of methods are commonly implemented by VPN, and these are either using pre-shared keys or digital certificates. Pre-shared keys are usually the default option, with VPN administrators being responsible for generating the key at configuration time. If the chosen option is certificate authentication, a possibility is to implement digital signature between the nodes. In the case under study, in order to guarantee the real-time settings needed by autonomous vehicles, it is recommended that the VPN nodes (e.g., the Hamachi VPN nodes) authenticate using pre-shared keys. * Communication channel D: access of users of the Mission Console to the Data Repository must be validated in order to ensure identity authentication and to prevent unauthorised databases usage. As in the case of communication channel B, mutual authentication of the Mission Console and the Data Repository can be ensured by X.509 certificates installed at both ends. Moreover, database user credentials can coincide with the username and password defined for operators in the Mission Console. This is useful to guarantee non-repudiation, as will be explained in Section 3.2.5. * Communication channel E: the authors of this study consider that middleware components can trust each other, as they can be deployed in a monitored Cloud. Thus, the SWARM Controller application can be granted access to the Data repository. Nevertheless, the credentials granted to the SWARM Controller should be generated by the Database Manager of the Cloud services provider and would only be valid if used inside the particular Cloud domain. The lack of extra security mechanisms ensures good responsiveness of access to the Data Repository, something essential from the point of view of management of autonomous vehicles that require real-time communication.